Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About Oniikuma

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks a lot for your advice! It's helped a great deal and I have everything working now.
  2. Thanks for the link, @LandonJerre, it’s just what I was looking for! I made a few modifications to my particle system to exploit the fixed number of active particles. I use a single RWStructuredBuffer<Particle> to update each particle’s state each frame and an SRV to the particle buffer for the vertex shader to use once updated. As I have a fixed index buffer and particle count, can I use DrawIndexed() (as it says in the slides) instead of DrawIndexedIndirect(), or does this require copying vertex data back to the CPU?
  3. Hi, I am fairly inexperienced in DX11 and I am trying to implement a particle system that is handled purely on the GPU. To keep things simple, the particle system will have a fixed number of particles that, once dead, will be respawned at the emitter location. As such, I only have a single compute shader that updates each particle. Based on the method outlined in 'Practical Rendering and Computation in Direct3D 11', an AppendStructuredBuffer<Particle> and a ConsumeStructuredBuffer<Particle> are bound to the compute shader, so that last frame's particles can be consumed, updated and appended, ready for the next frame. As I want to minimise the data flowing back to the CPU, I want to make a call to DrawIndexedInstancedIndirect(), feeding the particle data directly from the compute shader to the vertex shader. In the vertex shader, the particle will be expanded to a quad billboard (I am trying to avoid the geometry shader for performance) and sent to the pixel shader for rasterization. As a side-effect, the primitive topology will be set to TRIANGLELIST. I am using DrawIndexedInstancedIndirect() rather than DrawInstancedIndirect() as the number of particles and, by extension, the index buffer will remain fixed. However, I am unclear on how to implement indirect draw calls and have the following questions: - How can I pass the updated particle data from the compute shader to the vertex shader without sending the data back to the CPU? As I understand, the vertex shader cannot read from the AppendStructuredBuffer that was written to by the compute shader. - How do I generate vertices without a vertex buffer bound to the input assembler? I know that vertices are identified with the semantic SV_VertexID, but I have no input layout bound to the input assembler. Any help would be greatly appreciated, as I am not very confident with indirect drawing in DX11 and I cannot find any beginner-friendly resources to point me in the right direction.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!