Using WebGL 1 (OpenGL ES 2.0), I am making a particle pool with spritesheet animations with
gl.POINTS. When necessary, the points are called to specific positions by the application, finish their lifetime and then disappear, becoming ready to be called again to a different position in the future.
My question is: What is the better way to make the point disappear?
discardin Fragment Shader based on some attribute
- Move vertex outside of clip space, like
gl_Position = vec4(1,1,1,0);
Which method is more efficient? Or maybe there is a better one?
Im not really sure how either of these two affects the pipeline/GPU, so Im humbly asking for help