1 in vec3 fragmentPosition;
2 in vec2 fragmentTextureCoordinates;
3 in float fragmentTextureIndex;
9 uniform vec3 cameraPos;
11 #if TEXURE_BATCH_UNITS > 1
12 uniform sampler2D textures[8];
14 uniform sampler2D texture0;
19 #if TEXURE_BATCH_UNITS > 1
20 vec4 texel = texture(textures[int(fragmentTextureIndex + 0.5)], fragmentTextureCoordinates);
22 vec4 texel = texture(texture0, fragmentTextureCoordinates);
25 outColor = texel * vec4(fragmentColor, 1.0);
26 outColor.rgb = mix(outColor.rgb, fogColor, clamp(length(fragmentPosition - cameraPos) / VIEW_DISTANCE, 0.0, 1.0));
28 if (outColor.a == 0.0)