19 lines
No EOL
422 B
GLSL
19 lines
No EOL
422 B
GLSL
#version 330 core
|
|
out vec4 FragColor;
|
|
in vec2 texCoord;
|
|
flat in int textureIndex;
|
|
|
|
uniform sampler2DArray tileTexture;
|
|
|
|
void main()
|
|
{
|
|
if (texCoord.x == 0.0 && texCoord.y == 0.0)
|
|
{
|
|
FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
|
}
|
|
else
|
|
{
|
|
FragColor = texture(tileTexture, vec3(texCoord.xy, textureIndex));
|
|
}
|
|
//FragColor = vec4(mod(tileindex / float(tilesperrow), 1.0), mod(tileindex / float(tilesperrow), 1.0), 0.0, 1.0);
|
|
} |