Sign in to follow this  

Texture projection (reflective water)

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this