Jump to content
  • Advertisement
Sign in to follow this  
IceSynth

Rendering Problem...

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

I have been trying to add water to a landscape engine I am making, but I am getting a strange effect when I render it. Does anyone have any idea what this is and where I can find information on how to fix it? http://hcmd.no-ip.org/users/chris/HostedImages/EternalLiberty5_1_A2_CMP.jpg

Share this post


Link to post
Share on other sites
Advertisement
You mean, why does your water look like striped taffy... or why there is a sawtooth shape at the edge?

Share this post


Link to post
Share on other sites
Why there is a sawtooth at the edge. I put a random texture on the water because the normal one was mostly transparent.

The land is made up of a 32x32 grid, and the water is one large plane.

Share this post


Link to post
Share on other sites
Don't just increase z-buffer precision. It's not ok that this happens with a 16-bit z-buffer. Move the near clipping plane further and this will drastically improve z precision.

Share this post


Link to post
Share on other sites
The precision is biased towards the near plane. So moving the far plane closer increases the precision of the z-buffer a bit, while moving the near plane towards the far plane greatly increases the precision of the z-buffer.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It's somewhat complicated but go through the math properly and you will see the problem. In any case, push the near plane as far from the camera as you can before it starts clipping into objects. This will leave more bits for actual Z values instead of wasting them on the air 1mm from the camera. Precision is higher closer to the camera so you can really waste a LOT of bits by putting the near plane too close to 0.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!