Excluding objects from a Fullscreen shader

Hey there,

I have used multiple types of fullscreen shaders over the past few projects but I wonder if there is any way to achieve fullscreen shaders to only effect some specific layer/objects. I don’t want to setup overlay camera modes because I am in XR, makes my job harder.

Anyone have any idea?

If you are willing to go that route you can render yourself a mask by rendering the objects you’d like to omit with a fully white shader to an otherwise black rendertexture and use that rendertexture in your fullscreen materials.
There should be many tutorials on how to render objects to an offscreen render texture using renderer features and a layermask (but none of them is probably 100% up to date ^^).
The additional render texture and the rendertexture switch might not be super cheap on mobile devices so beware, and profile after setting it up.

Makes bunch of sense as a workaround. Anything else comes to mind?

depends on how the rest of your rendering looks.

In some mobile vr projects people move the full screen effects into the object shaders to avoid the additional overdraw from full screen draw. Coincidentally this would give you per object control too. But doing goes over the bounds of the objects using the screen texture obviously becomes impossible that way.

Depending on how your rendering is structured you might be able to render the full screen effect and then afterwards render the objects that you want to omit. Either render them a second time if you need them before too or just once afterwards.