ddnet/data/shader/prim.frag

17 lines
302 B
GLSL
Raw Normal View History

#version 330
uniform int isTextured;
uniform sampler2D textureSampler;
noperspective in vec2 texCoord;
noperspective in vec4 vertColor;
2017-09-13 16:49:43 +00:00
out vec4 FragClr;
void main()
{
if(isTextured == 1) {
vec4 tex = texture(textureSampler, texCoord);
2017-09-13 16:49:43 +00:00
FragClr = tex * vertColor;
}
2017-09-13 16:49:43 +00:00
else FragClr = vertColor;
}