Skip to main content
gamedev.net
🔒 Locked

Stencil Buffer Reflection Problem

Started by MarcusMaximus Apr 1, 2004 at 11:02 PM 2 replies 350+ views
Original Post
MarcusMaximus
MarcusMaximus
If any1 saw my other post, you''ll know that im making a terrain demo. In this demo, im trying to get water that reflects the land that sticks up above it. However, when I run it, I can get it to reflect a whole bunch of different views of the land underneath but am unable to get it to reflect the land above. Can any1 help? -Mark
-Mark
_the_phantom_
_the_phantom_
without details of how you are currently doing it the best i can say is treat it like any other reflection (see the NeHe code), define the area you want to reflect in and use the stencil buffer to draw the upside down image so it only fills that area and then if you have a water effect blend it over the top
MarcusMaximus
MarcusMaximus
Woah... ok i figured out how to reflect it right but theres another problem... its actually displaying another landscape under the one i made... its the inverted one supposed to be invisible? whats goin on???

-Mark
-Mark
jaba
jaba
Can be a problem with the normals? try glFrontFace(GL_CCW); or glFrontFace(GL_CW);

Topic Locked

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

Sign in to reply to this topic.