Hi! I’d like to implement stencil based mirror in my program. The mirror will be a simple quad. I found lots of tutorials on the net about mirrors, but they are all using a mirror which is in the x,z plane. I want to use a mirror which can face any direction freely, so I think the solutions described in those tutorials won’t work for me. So here is how I plan to do it:
First I’ll set up stencil test and draw mirror mask into stencil buffer. Then I’ll mirror the camera’s position and direction to the plane of the mirror-quad. After that I’ll render the scene (onto the face of the mirror). Finally I’ll disable stencil test and draw the scene again using the original camera position and direction.
My question is that will this work or is there a better solution?
[This message has been edited by Catman (edited 03-17-2003).]