Hi,
I’m currently using ScriptableRenderContext.DrawRenderers
in custom ScriptableRenderPass to render some opaque objects (filtered by layer) twice - with a different shader than normal.
And it works fine:
- First all objects are rendered in standard Unity pipeline.
- And then they are rendered for a second time by a ScriptableRenderPass.
Now what I’d like to do, is to render these objects twice - but both times by different ScriptableRenderPasses - skipping normal Unity rendering process. However to use DrawRenderers they must be already present on the scene (as GameObjects, with Renderers and so), which results in rendering them automatically by Unity render pipeline - what I’d like to avoid.
I could remove them from scene and render each mesh manually, but this would break SRP Batching, which is critical for me - thus limit to DrawRenderers.
I tried removing them from camera Culling Mask, but this also removes them from culling results and makes invisible for custom passes. Is there any way to do this?