Point sprites
Common techniques in many 3D applications and games are particle effects. A particle effect is a generic term for any special effect created by rendering groups of particles (displayed as points, textured quads, or repeated geometry), typically with some simple form of physics simulation acting on the individual particles. They can be used for simulating smoke, fire, bullets, explosions, water, sparks, and many other effects that are difficult to represent as a single geometric model.
One very efficient way of rendering the particles is to use point sprites. Typically, if you render vertices with the POINTS
primitive
type each vertex will be rendered as a single pixel on the screen. A point sprite is an extension of the POINTS
primitive rendering where each point is provided a size and textured in the shader.
A point sprite is created by setting the gl_PointSize
value in the vertex shader. It can be set to either a constant value or a value calculated from shader inputs. If...