2022-10-31 00:51:51 -04:00
|
|
|
#version 330 core
|
|
|
|
|
|
|
|
out vec4 FragColor;
|
|
|
|
in vec2 outUv;
|
|
|
|
in vec3 outNormal;
|
|
|
|
|
|
|
|
uniform sampler2D tex;
|
2022-11-13 13:03:48 -05:00
|
|
|
uniform int useWhite;
|
2022-10-31 00:51:51 -04:00
|
|
|
|
|
|
|
const vec3 lightDir = vec3(1.0, 1.0, 1.0);
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
vec4 textureColor = texture(tex, outUv);
|
|
|
|
//FragColor = vec4(textureColor.rgb, 1.0f);
|
2022-11-13 13:03:48 -05:00
|
|
|
if (useWhite == 0)
|
|
|
|
FragColor = vec4(vec3(1.0, 0.0f, 0.0f) * dot(lightDir, outNormal), 1.0f);
|
|
|
|
else
|
|
|
|
FragColor = vec4(1.0);
|
2022-10-31 00:51:51 -04:00
|
|
|
}
|