Hey, I am trying to import a texture to use as a mask, but when I import it I get these super thin white lines on the edges / corners: https://i.imgur.com/U6DMVLU.png
Anyone know how to fix this? It’s a simple Black / White image, no alpha channel or anything. Thanks!
I’m not a technical artist or a graphics programmer so someone else is probably more qualified to answer this but my understanding is that it’s essentially a combination of two things:
Texture space simply repeats when it goes outside the 0-1 range. So 0-1 is effectively the same as 1-2, 3-4, 4-5, etc. Including negative numbers.
Textures get filtered by effectively interpolating between neighboring pixels so that they can be rendered at any size without pixelation.
When you combine these two things, what happens is that when you get to the top/sides of a texture, you start to get edge bleeding from the other side as it is trying to interpolate from texels outside the 0-1 range.
In order to solve this we clamp the texture space to the 0-1 range, so anything larger than 1 gets clamped to 1, and anything below 0 gets clamped to 0. So instead of the texture repeating, the edge pixels just get stretched to infinity.