Overview
This sample demonstrates a high-performance particle system implemented using DirectX 11. It leverages compute shaders for particle simulation and geometry shaders for efficient rendering of particles. The system supports a wide range of particle behaviors, including emitter types, forces, collisions, and material properties.
Features
- Compute Shader-based Simulation: Efficiently update particle states on the GPU.
- Geometry Shader Rendering: Dynamically generate particle geometry on the fly.
- Flexible Emitters: Configurable particle sources with various emission patterns.
- Force Fields and Interactions: Simulate complex physical behaviors.
- Collision Detection: Basic particle-to-particle and particle-to-world collision.
- Dynamic Parameter Control: Adjust simulation parameters in real-time.
Sample Code
Below is a snippet demonstrating the core compute shader logic for updating particle velocity based on forces:
How to Use
To run this sample, you will need a DirectX 11 compatible graphics card and the Windows SDK installed. The project is typically built using Visual Studio.
1. Download the sample code.
2. Open the solution file in Visual Studio.
3. Build and run the project.
Experiment with the various parameters exposed in the application's UI to observe different particle behaviors.
Download Sample Code