Jump to content
  • Advertisement
Sign in to follow this  
Richy2k

Water Rendering over a height map.

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

Someone suggested I just render a large quad over the scene, but this creates some nasty artifacts (z-fighting). Are there any other reasonable methods I could go for to render water, well, just a large quad as such over terrain?

Share this post


Link to post
Share on other sites
Advertisement
Why does that work? I would guess there would still be z-fighting unless the water quads were split as small as the pairs of terrain triangles.

Share this post


Link to post
Share on other sites
Exactly... The big quad suffers from floating point inaccuracy when it's clipped against the view frustum. Interpolating the depth across the whole screen might also make any inaccuracy more visible. Typically the polygon appears to move up and down as you move/rotate the camera. The small quads are perfectly correct at each vertex and clipping them against the frustum involves smaller numbers which are more accurate. You'll still get z-fighting if the z-buffer doesn't have enough depth resolution, but a 24-bit z-buffer is pretty forgiving.

Share this post


Link to post
Share on other sites
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!