I'm trying to gauge the effect of MSAA on scenes with lots of particles in Unity.
To do that, I'd need to:
Draw all non-particle objects in the scene with 8x MSAA
Use the resolved depth buffer from the previous pass to render all the non-occluded particle systems onto a smaller render target.
Alpha Blend the color buffer of (2) with (1)
I'm looking at the post-processing effects to get a sense of what i might need to do, but none of them use the depth buffer from a previous pass to affect the depth test of other objects in the scene (in this case, the particles). They instead post-process the depth buffer as a whole and modulate the existing color buffer.
Is is possible to do what I'm trying in Unity? I'm reading up on Replacement Shaders, but I'm wondering how I can pass one cameras' depth buffer to another camera (that renders the non-occluded particles to a non-msaa RT).
(This was originally posted on the Unity forums, but I didn't get any reply. Hopefully, SO will help!)
I did checkout the "high speed off screen particles in unity" articles (on the same topic - some of the important links in it don't work anymore x(