Is this section still active? There doesn’t seem to be much traffic…
I’ve got an odd problem trying to get compute based rendering with an append buffer to work.
The code is essentially:
- DispatchCompute to generate particles
- CopyCounterValue from append buffer into indirect draw buffer
- DispatchCompute to multiply vertex count by 3
- DrawProceduralIndirect to draw particles, with the vertex shader generating 3 triangle vertices for each buffer vertex.
I’m doing this process twice in a row to render two particle systems. The first vertex count returned is 0, the second about 10% higher than expected. The actual buffer data generated by the compute shader looks as expected. Do I need to add any extra synchronisation to make sure the DispatchCompute completes before the CopyCounterValue copies the value?
Right now I’m not sure if this is my code problem, a driver problem, or a Unity problem. The events in a RenderDoc capture look reasonable.
I am using Unity 2021.3.16f1 with RTX 3050 Ti laptop GPU.