23 lines
456 B
GLSL
23 lines
456 B
GLSL
#version 400 core
|
|
out vec4 FragColor;
|
|
|
|
in vec2 TexCoord;
|
|
in vec4 VertexColour;
|
|
|
|
uniform sampler2D texSampler;
|
|
uniform vec4 u_overrideColour;
|
|
|
|
void main() {
|
|
if (u_overrideColour.a > 0.0) {
|
|
FragColor = u_overrideColour;
|
|
return;
|
|
}
|
|
|
|
// sample the texture
|
|
vec4 texColour = texture(texSampler, TexCoord) * VertexColour;
|
|
|
|
if (texColour.a < 0.1) discard;
|
|
|
|
//FragColor = vec4(0.6, 0.0, 1.0, 1.0);
|
|
FragColor = texColour;
|
|
} |