I’d like to create a hole in some parts of a rendered image so that I can see what’s behind that hole. Unfortunately I can’t create the hole within the geometry (for some special reasons). Also I cannot use the scissor test because the geometry can be quiete complex. So I thought I could use the stencil test to do that. However I didn’t found any solution to it.
Let me try to explain better what I’d like to do. Let’s say I render a house from within that house. I’m in some room and seeing at a wall of this room where’s there’s a ‘door’. I’m also rendering what’s behind the wall and the door, but of course, this is not seenable unless the door is not rendered (erased).
Now, let’s say the user makes an action so that the door should be ‘erased’ from the drawing. But I cannot effectively erase this door from the geometry just because it is full part of the wall and the only thing I can know is where the door is and what is its aspect. (now for more information: that door might be purely virtual so that I can move it all along the wall, just in order to see what’s behind this imaginative door). Also, that wall might be very detailed: it’s not a pure simple quad and can have a lot of relief.
Now, when the door is ‘erased’, then we will be able to see what’s behind the wall (probably the other rooms of the house).
Well, I found a solution but that works only for pure flat walls, so this does not really help me in this sense.
Are there any ways to do so ? Maybe an efficient one (avoiding multipass could be very nice).
Hope this is understandable.