- Home /
Textures in texture atlas are "leaking" when moving camera
Hey guys! I wanted to convert all my materials into one texture atlas to reduce draw calls. I made all the meshes an set up all the uvs. In theory, it would be perfect, but when I moved the camera a row of pixels leaked from the neighbour textures and caused unwanted jitter (a black texture was next to a blue and a green one, and the sides of it would flash to green or blue when moving the camera). The texture atlas has Pixel filter mode, Clamp wrap mode, the size is 128x128 pixels and the format is RGBA24.
Screenshot:
This texture is in the top-left corner, with a grey texture above and a blue, with fading opacity from 50 to 0, texture.
David
Can you make a screenshot? It seems quite obvious that leaking will appear in Point-filter mode, but please make a screenshot to be certain.
So he really picks one pixel on both sides. Have you tried shifting your UV map one pixel to the left and to the bottom?
It doesn't pick one pixel from the texture atlas, but it's one pixel on the camera, the texture atlas is 128x128 pixels containing 64 images like that one.
Well...the padding would typically be the same color as the texture itself...you simply repeat the last/first row/column of pixels a couple of times.
The smaller the texture, the bigger is the effect of bleeding. It is always there, though. At the edges of your UVs you will always see the color of the neighboring pixels.
Answer by DavidDebnar · May 08, 2012 at 08:46 PM
Pifliks comments helped me a lot, but he didn't make an answer, so I am just giving him the credit this way.
"Well...the padding would typically be the same color as the texture itself...you simply repeat the last/first row/column of pixels a couple of times. The smaller the texture, the bigger is the effect of bleeding. It is always there, though. At the edges of your UVs you will always see the color of the neighboring pixels." - Piflik
Answer by Piflik · May 03, 2012 at 12:08 PM
Like the padding around the UV shells on standard textures you need some space between two parts of a texture atlas. It might look good up close, but with mipmapping you will always get bleeding at the edges, if you pack the textures too tight.
I tried turning mipmapping off, but it didn't help. I will try to go for the spacing.
Your answer
Follow this Question
Related Questions
Assigning UV Map to model at runtime 0 Answers
Texturing a icosphere 0 Answers
Will a low-resolution texture atlas cause these mip-mapping artifacts? 0 Answers
Identical material with different textures 0 Answers
Rotating Textures 0 Answers