Texture projection (reflective water)

Started by
-1 comments, last by Ray1234 18 years, 6 months ago
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

This topic is closed to new replies.

Advertisement