2015-09-17 11:04:25 -04:00
|
|
|
const float invAtlasSize = 1.0 / 1024;
|
|
|
|
vec4 atlasTexture() {
|
2016-03-20 16:17:21 -04:00
|
|
|
vec2 tPos = vTextureOffset;
|
2016-04-05 17:40:35 -04:00
|
|
|
tPos = clamp(tPos, vec2(0.1), vTextureInfo.zw - 0.1);
|
2016-03-20 16:17:21 -04:00
|
|
|
tPos += vTextureInfo.xy;
|
|
|
|
tPos *= invAtlasSize;
|
|
|
|
return texture(textures, vec3(tPos, vAtlas));
|
2016-03-26 07:40:53 -04:00
|
|
|
}
|