Texture replace on object interaction

Hey,

I am fairly new and just wanted a little bit of advice,

I am trying to create an effect where the light of a torch (currently a volumetric object) replaces the texture of the asset it is over. For example the scene is black and white and when he torch is shone across the room, colour is exposed.

I mocked up a quick effect sample in photoshop below.

I just wondered if anyone could offer any advice on how to go about this.

Thank you for your time.

I’d say you’d do that as a post processing effect instead of switching all the textures to grayscale. You’d just render the whole scene in color and turn parts to grayscale afterwards.

If it’s a circle on the screen, you can use a simple post processing effect.

If it’s a 3D volume, you’ll first have to mark the pixels that fall in the volume using the stencil buffer.