Jump to content
  • Advertisement
Sign in to follow this  
Ray1234

Texture projection (reflective water)

This topic is 4736 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've nearly completed my water reflection code in my engine, but I've run into a bit of a snag. I've been playing around with it all day and just finally got it to actually show up at all. After a bit of tweaking, I can get it to actually look like a reflection. The only problem is that the texture coordinates being generated are a bit skewed. If you imagine the screen as a quad, the entire bottom segment is shifted about 15% to the left, and the sides are angled to match. This, of course, completely ruins the illusion of a reflection whenever there's something close/intersecting the water because it's offset and doesn't look right at all. I've been playing with texture matrices all day and I'm sick of them and projective texturing. Here's a screenshot of my problem to help better describe the effect I'm getting. Screenshot I've searched everywhere on Google and on this site and have tried dozens upon dozens of combinations of matrix multiplies trying to get it right and nothing works. Anyone have any suggestions? Thanks, Ray

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!