Fixed normal transformation

This commit is contained in:
Lorenzo Torres 2025-08-06 17:51:03 +02:00
parent defdf051ec
commit 8b5f33ee3f
4 changed files with 9 additions and 7 deletions

View file

@ -32,6 +32,7 @@ void main() {
vec3 reflectDir = reflect(-lightDir, norm);
float spec = pow(max(dot(viewDir, reflectDir), 0.0), 2);
vec3 specular = lightSpecular * spec * vec3(texture(diffuseSampler, TexCoords));
//vec3 specular = lightSpecular * spec * vec3(1.0, 1.0, 1.0);
vec3 result = (ambient + diffuse + specular);
outColor = vec4(result, 1.0);