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
|
2017-09-12 18:05:05 +00:00
|
|
|
|
2020-08-19 05:05:51 +00:00
|
|
|
uniform vec4 gVertColor;
|
2017-09-12 18:05:05 +00:00
|
|
|
|
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;
|
2017-09-12 18:05:05 +00:00
|
|
|
void main()
|
|
|
|
{
|
2020-08-19 05:05:51 +00:00
|
|
|
#ifdef TW_TILE_TEXTURED
|
2020-08-22 06:09:10 +00:00
|
|
|
vec4 TexColor = texture(gTextureSampler, TexCoord.xyz);
|
2020-08-19 05:05:51 +00:00
|
|
|
FragClr = TexColor * gVertColor;
|
|
|
|
#else
|
|
|
|
FragClr = gVertColor;
|
|
|
|
#endif
|
2017-11-09 10:31:13 +00:00
|
|
|
}
|