CommandBuffers and Particle Systems

Hello,

I’ve seen this issue raised a few times, but never with a satisfactory answer.

I’m currently in the middle of writing a custom render pipeline, using CommandBuffers and calls to DrawRenderer(). My game is mostly comprised of SpriteRenderers and ParticleSystemRenderers, both of which I want to pass to DrawRenderer().

The SpriteRenderers work exactly as I’d expect. The ParticleSystemRenderer… no so much. Nothing gets rendered, and no geometry gets pushed to the hardware that I can see in the Frame Debugger.

The only slight progress I’ve managed to set the emitter’s RenderMode to Mesh, call BakeMesh() on its renderer, and then use CommandBuffer.DrawMesh(). There are numerous problems to still overcome down this path and it seems like a very heavyweight operation to be doing in my rendering code.

I really can’t get much traction on understanding what’s going on here, the SRP is still very much a black box. Any one else have any luck rendering a ParticleSystem via CommandBuffers?

I have the same issue…did you fixed it

Same issue here. I use the same approach with baking the particles to mesh/ render mesh.
A bug report has been sent by one of the users using my asset, the vegetation engine.

1 Like

Have the same issue…did anyone fixed it?

Yes, looks like you need to use Camera.SetupCurrent before rendering the particles.

7885165--1003330--upload_2022-2-10_12-5-26.png

I tried this, but doesnt work:(

Works fine for me on all render pipelines? Are you using command buffers?

Just one command buffer. I add the command buffer to a custom camera not scene camera, I don’t know if that has any impact.