• Advertisement
Sign in to follow this  

Reflections

This topic is 2966 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

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
Advertisement
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
Sign in to follow this  

  • Advertisement