13-02-2021, 08:26 PM
(This post was last modified: 13-02-2021, 08:30 PM by josemendez.)
(13-02-2021, 04:31 AM)corel Wrote: Hi,
Is it possible to have multiple renderer passes in URP specific to separate emitters? I aim aiming to have distinct fluids in a scene with different refraction and blending modes, but I can't seem to find where to select specific emitters in the obi fluid renderer feature. I thought this was possible using the standard pipeline when the renderer script was attached to a camera, apologies if I've missed something obvious.
Cheers!
Hi there,
From within a URP Renderer feature there's no way to access scene objects, other than use FindObjectsOfType() or filter by layer/tag. The reason for this is that renderer features are project assets, and as such, they're not tied to any scene in particular and they can't hold references to GameObjects. I know this is less than ideal, but it's just how URP works . You can't specify individual renderers as you can in the built-in pipeline, so you're limited to a single fluid material. Note you can still change fluid color using the particle renderer, or individual per-particle colors.
In the built-in pipeline you could just place a script in any object in the scene, get references to objects that should be rendered in a special way and just latch onto the render pipeline to render these objects. This isn't possible in URP as of now. See: https://forum.unity.com/threads/srp-rend...sk.988202/
Quote:It is not possible to get a list of the objects that are going to be rendered, as this would currently be too inefficient. If you are drawing using DrawRenderers, you can use the FilteringSettings.renderingLayerMask