Fix texture seams (Fixes #23)
This commit is contained in:
parent
c73b9d48b2
commit
c21a740077
|
@ -1,7 +1,7 @@
|
|||
const float invAtlasSize = 1.0 / 1024;
|
||||
vec4 atlasTexture() {
|
||||
vec2 tPos = vTextureOffset;
|
||||
tPos = mod(tPos, vTextureInfo.zw);
|
||||
tPos = clamp(tPos, vec2(0.1), vTextureInfo.zw - 0.1);
|
||||
tPos += vTextureInfo.xy;
|
||||
tPos *= invAtlasSize;
|
||||
return texture(textures, vec3(tPos, vAtlas));
|
||||
|
|
Loading…
Reference in New Issue