Newbie: How to pass 2 numbers down to fragementShader

 attribute float aParticlesX;
 attribute float aParticlesY;

should be

 uniform float aParticlesX;
 uniform float aParticlesY;

and you can reference the uniforms directly in the fragment shader… you don’t have to pass them as varyings since they aren’t going to change (“vary”) across the triangle… since they are coming from a uniform. (which is applied (“uniformly”) to the whole drawcall)

2 Likes