Jump to content
  • Advertisement
Sign in to follow this  
Imprecision

Texture artifacts

This topic is 2438 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, I get some artifacts on my texture when it's applied on a small chunk:

unbenannt-208z3y.png
(Normally there would be a sharp edge between blue and brown)

Does someone know why this happens and how to solve it ?

Share this post


Link to post
Share on other sites
Advertisement
Hi,

seems like z-fighting. Are you drawing the same mesh several times?

What are the near/far plane values written on your screen shot? Are they near/far plane values used for your projection matrix?

Cheers!

Share this post


Link to post
Share on other sites
No, its definatly not z-fighting caused by two chunks. It seems that the texture wrapping runs out of precision.

The values on the screenshot are the near /far- planes of the chunks. I calculate it on how close I'm to the surface, because the accuracy gets lost when i take 0.0000001 to 10000. The closer I get to the surface the smaller are the values for the planes.

Share this post


Link to post
Share on other sites
How many times do you wrap your texture? There is a limitation for the maximum texture coordinate values.
Also, your near and far plane values seem very very low.

Best regards!

Share this post


Link to post
Share on other sites
Single-precision floating point (which GPU's use for rendering) only has an precision of up to seven decimal places or so. 0.0000001 is at the very edge of the precision limit, which explains the patterns you are seeing. You simply can't go any closer without switching to double-precision which is not well supported by mainstream 3D API's currently.

Why do you need to get so close to your texture?

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!