fix color

This commit is contained in:
2026-02-13 23:46:21 +01:00
parent 733a8c0237
commit 96646b0b8c

View File

@@ -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;