Setting some sort of global material for a camera

Hi all,

Is there an easy way to render all objects seen by a camera using a specific material? All other cameras would use the renderers’ normal materials.

I could script this, but for some reason I thought there was something in UnityEngine that did this for me. I couldn’t find it.

Thanks,
-Jon

Maybe you’re thinking of this? It’s scripted, but easy…

–Eric

Nope, that’s not what I was thinking of, but thanks. I’ll have to write something a lot more sophisticated than that.

Cheers,
-Jon

Right now you have to script this manually. We want to add such functionality (essentially “hijack shaders this way!”) in the future because we know it would be really useful for some effects.

I’ve used Projectors for this - On a conceptual level, a Projector basically renders all geometry seen by a Camera and the projector’s FOV with a specific material. If you just make your projector large enough, that can be a nice way to get it done.