Question

I have a 512X512 texture which holds a number of images that i want to use in my application. After adding the image data to the texture i save the texture coords for the individual images. Later i apply these on some quads that i am drawing. The texture has mipmapping activated.

When i take a screenshot of the rendered scene at exactly the same instance in two different runs of the applications, i notice that there are differences in the image only among those quads textured using this mipmapped texture. Can mipmapping cause such an issue?

Was it helpful?

Solution

My best guess is that it has to do with precisions in your shader. Check out this problem that I had (and fought with for a while) and my solution:

opengl texture mapping off by 5-8 pixels

It probably is a combination of mimapping's automatic scaling of your texture atlas and the precision hints in your shader code.

Also see the other linked question:

Why is a texture coordinate of 1.0 getting beyond the edge of the texture?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top