diff --git a/res/shaders/simple.frag b/res/shaders/simple.frag index 8ec72d5..3710125 100644 --- a/res/shaders/simple.frag +++ b/res/shaders/simple.frag @@ -21,7 +21,7 @@ uniform int normalMapped; out vec4 fragColor; -const vec3 baseColor = vec3(1.0); +vec3 baseColor = vec3(1.0); const float ambientStrength = 0.1; const float specularStrength = 0.5; const float shininess = 32.0; @@ -56,7 +56,8 @@ void main() V = TBN * V; // use textures for normal mapped geometry - vec3 result = ambientStrength * (bool(normalMapped) ? vec3(texture(diffuseSampler, textureCoordinates)) : baseColor); + baseColor = bool(normalMapped) ? vec3(texture(diffuseSampler, textureCoordinates)) : baseColor; + vec3 result = ambientStrength * baseColor; for (int i = 0; i < 1; i++) { vec3 toLight = lights[i].position - worldPosition;