2014-12-19 21:09:58 -08:00
|
|
|
/*
|
|
|
|
* Copyright 2014 Stanlo Slasinski. All rights reserved.
|
2016-01-01 00:11:04 -08:00
|
|
|
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
2014-12-19 21:09:58 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
uniform vec4 u_params[3];
|
|
|
|
|
2015-05-01 19:52:11 -07:00
|
|
|
#define threadGroupUpdateSize 512
|
|
|
|
|
2014-12-19 21:09:58 -08:00
|
|
|
#define u_timeStep u_params[0].x
|
|
|
|
#define u_dispatchSize floatBitsToUint(u_params[0].y)
|
|
|
|
#define u_gravity u_params[0].z
|
|
|
|
#define u_damping u_params[0].w
|
|
|
|
|
|
|
|
#define u_particleIntensity u_params[1].x
|
|
|
|
#define u_particleSize u_params[1].y
|
|
|
|
#define u_baseSeed floatBitsToUint(u_params[1].z)
|
|
|
|
#define u_particlePower u_params[1].w
|
|
|
|
|
|
|
|
#define u_initialSpeed u_params[2].x
|
|
|
|
#define u_initialShape floatBitsToUint(u_params[2].y)
|
|
|
|
#define u_maxAcceleration u_params[2].z
|