ddnet/data/shader/tile.frag

25 lines
422 B
GLSL
Raw Normal View History

2020-08-19 05:05:51 +00:00
#ifdef TW_TILE_TEXTURED
#ifdef TW_TILE_3D_TEXTURED
uniform sampler3D gTextureSampler;
#else
uniform sampler2DArray gTextureSampler;
#endif
#endif
2020-08-19 05:05:51 +00:00
uniform vec4 gVertColor;
2020-08-19 05:05:51 +00:00
#ifdef TW_TILE_TEXTURED
noperspective in vec3 TexCoord;
#endif
2017-09-27 10:15:30 +00:00
2020-08-19 05:05:51 +00:00
out vec4 FragClr;
void main()
{
2020-08-19 05:05:51 +00:00
#ifdef TW_TILE_TEXTURED
vec4 TexColor = texture(gTextureSampler, TexCoord.xyz);
2020-08-19 05:05:51 +00:00
FragClr = TexColor * gVertColor;
#else
FragClr = gVertColor;
#endif
}