Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How to stop edge artifacts when using a spritesheet / textureatlas

$
0
0

As the title says, i'm using one big texture and using tex coords for each face of a block. However there are some artifacts along the edges of each face. I've been trying to figure out this problem for a while now. I've tried offsetting the texture index by a small margin which slightly fixed the problem but at a far enough render distance the problem appears again.

and a closer view:

Here is my code that handles where to get the coordinates from the texture atlas. https://github.com/Xenthera/AlphaBlock/blob/testBranch/src/com/bobby/TextureManager.java

Also to get the texture to appear crisp i'm disabling texture sampling.

Here's what it looks like with texture sampling which is curious because you can still see the "artifact" being interpolated across the edge of the face.

Help :P


Viewing all articles
Browse latest Browse all 2896

Trending Articles