PDA

View Full Version : Mirrors



09-06-2002, 02:26 AM
Hi,

One simple question:
How to make a mirror in room?

MickeyMouse
09-06-2002, 06:01 AM
orthogonal mirror is very simple
say you want mirror parallel to XY plane, that's one of general 2 solutions I know (without stencil buffer):

1. draw everything with inversed Z coordinate, thus if your whole mirror has all Z coordinates = some_z you need to replace z coordinate of your objects with
(-z + 2*some_z)
2. clean z-buffer
3. draw alpha-blended poly over the mirror
4. draw everything

hope it helps

Jan
09-07-2002, 12:56 AM
Go to http://nehe.gamedev.net/
There is a very good tutorial about mirrors (Using the stencil buffer).

Jan.

cwc36
09-08-2002, 06:15 PM
viewport also is a solution method