DirectX SDK |
This topic pertains only to application development in C++. See Direct3D Immediate Mode Visual Basic Samples.
The Fireworks sample implements a system of particles simulating a fireworks explosion. Particles are popular in games to show effects like smoke, sparks, and explosions.
Source: (SDK root)\Samples\Multimedia\D3dim\Src\Fireworks
Executable: (SDK root)\Samples\Multimedia\D3dim\Bin\Fireworks.exe
Press F1 to see available commands, or choose from the menu.
The fireworks explosion is simulated by using a system of particles; each particle is rendered with a partially transparent texture map of a sphere. The position and color of each particle are governed by parameterized equations and are updated in each frame.