Dynamically changing part of a texture v2

After my massive success at getting my question answered really well really quickly - I have another, related question (original post for context - Dynamically changing _part_ of a texture - Questions & Answers - Unity Discussions). In that question I asked if I could put a static colour (in that case, purple) over another, and have it work like a torch - getting closer decreases the size, and further away increases it.

I now have a far more ambitious idea.
How can I use this torch to show something completely different to the background it is on? - not like putting a colour over the top of it, but rather a different scene.

I’ll try to explain with a terrible image.


  • The wall acts as the ‘normal’ view, and the circle is where the beam of the torch touches the wall - where it touches displays another image (in this case the party scene inside).

I have the wall as the background/normal image. Flash it with the ‘magic torch’ and it suddenly shows a completely different image ‘underneath’, in the exact shape of the where the torch ‘touches’ the wall. Bigger further away, and smaller closer up. It also needs to work with different angles and all that jazz.

I eventually want to do this with objects too, changing them on ‘torch’ hit but atm, I’m contented with showing a different image underneath.

Thanks in advance, you lovely, lovely people.
Sorry for being rubbish

Sorry for the terrible picture, again.

simply u can draw a background (partyscene) first (below), and then draw a wall second (at front). to make a wall transparent you can use shader like this

shader with transparent lit area

use a simple light to make wall transparent in area and size you need, under the transparent (lighted) wall you’ll see another picture.

perfectly to use shader with image replacement depending on lights 8) but this shader you need find or write.