Skip to main content
gamedev.net
🔒 Locked

reflections

Started by Khaos Dragon Jul 10, 2004 at 12:41 PM 1 replies 650+ views
Original Post
Khaos Dragon
Khaos Dragon
I have been thinking of ways to do reflections and I was wondering if something like this would be feasible. In this example, there is a mirror in the scene which should be reflective. 1) use the law of incident angles between the person and mirror and raytrace to determine the direction/angle at which the scene is represented relative to the mirror. 2) establish the projection matrix with viewpoint at the mirror and looking in the direction determined by raytracing 3) render scene, but don't flush or swap buffers. Instead, somehow copy the buffer to a texture object. 4) reestablish projection matrix with viewpoint at the player and the direction the player is facing. Texture the texture object to the polygon of the mirror, and redraw the scene, this time swapping buffers.
Yann L
Yann L
Read this for a short overview over planar reflection techniques.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.