Rendering particle effects
DroidBlaster needs a background to make it more pleasant-looking. As the action is located in space, what about a falling star to give an impression of speed?
Such an effect can be simulated in several ways. One possible choice consists of showing a particle effect, where each particle corresponds to a star. OpenGL provides such a feature through Point Sprites. A point sprite is a special kind of element that requires only one vertex to draw a sprite. Combined with a whole vertex buffer, many sprites can be drawn at the same time efficiently.
Point sprites are usable with vertex and fragment shaders. To be even more efficient, we can use their power to process particle movement directly inside the shaders. Thus, we will ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access