Sign in to follow this  
Geometrian

Reflections

Recommended Posts

Hi, So, I've got some objects and some water. The water is represented by a single quad. I want the objects to appear reflected in the water. The camera and the objects are both above water. I'm representing waves by a perturbed surface normal (I'm currently doing this procedurally, but the effect is the same as a normalmap). A shader uses the perturbed normals to look into an environment cubemap to reflect the sky. However, note that this approach does not work for close objects, such as the airplane depicted below. My solution to this is to draw the objects inverted and under the surface of the water. This works nicely until waves are added. Again, the airplane reflection is done as described before--by drawing an inverted image below the water. Notice that it is not distorted by the waves. When I add more objects, this effect will become more noticeable. I would like the image to be distorted by the waves. Help? Thanks, -G

Share this post


Link to post
Share on other sites
Yup. That is the standard way. You reflect your camera matrix around the water plane, then render anything you want reflected into a texture. Then you use that texture as lookup for your reflections while doing your regular render pass

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