diff --git a/src/graphics/opengl/shaders/gl21/fs_normal.glsl b/src/graphics/opengl/shaders/gl21/fs_normal.glsl index 77402258..1aeffcbe 100644 --- a/src/graphics/opengl/shaders/gl21/fs_normal.glsl +++ b/src/graphics/opengl/shaders/gl21/fs_normal.glsl @@ -84,8 +84,8 @@ void main() { LightParams light = uni_Light[i]; - vec3 lightDirection = normalize(light.Position.xyz); - vec3 reflectAxis = normalize(lightDirection + camera); + vec3 lightDirection = light.Position.xyz; + vec3 reflectAxis = normalize(normalize(lightDirection) + camera); float diffuseComponent = clamp(dot(normal, lightDirection), 0.0f, 1.0f); float specularComponent = pow(clamp(dot(normal, reflectAxis), 0.0f, 1.0f), 10.0f); diff --git a/src/graphics/opengl/shaders/gl33/fs_normal.glsl b/src/graphics/opengl/shaders/gl33/fs_normal.glsl index 7b498723..be58f4fd 100644 --- a/src/graphics/opengl/shaders/gl33/fs_normal.glsl +++ b/src/graphics/opengl/shaders/gl33/fs_normal.glsl @@ -83,8 +83,8 @@ void main() for (int i = 0; i < uni_LightCount; i++) { - vec3 lightDirection = normalize(uni_Light[i].Position.xyz); - vec3 reflectAxis = normalize(lightDirection + camera); + vec3 lightDirection = uni_Light[i].Position.xyz; + vec3 reflectAxis = normalize(normalize(lightDirection) + camera); ambient += uni_Light[i].Ambient; diffuse += clamp(dot(normal, lightDirection), 0.0f, 1.0f)