Hi community
[DirectX] Particle Systems - Compute Shader
Looks pretty good - how about a description of your rendering setup? Are you using append/consume buffers? Are the particles living forever or are they dynamically created and destroyed?
Hi Jason
I am using 2 ID3D11Buffer where I store information for all the particles (positions and velocities). Particles are living forever, they are created once.
Those buffers are binded through an Unordered Resource View to Compute Shader and through a Shader Resource View to Vertex Shader.
I use a Draw call with the number of particles. SV_VertexID is used in the shader to identify what particle should I process in a Vertex Shader in particular.
Particles are represented as points and expanded in a quad that face the camera, inside Geometry Shader.
I plan to use Append/Consume buffer in the future to create/destroy particles dinamically
Thanks!