1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-20 23:09:42 +00:00

Actually use specular shininess parameter instead of hardcoded value.

This commit is contained in:
AnyOldName3 2019-03-15 17:44:52 +00:00
parent 7bbf0b5249
commit 5b2691e744

View file

@ -78,5 +78,5 @@ vec3 getSpecular(vec3 viewNormal, vec3 viewDirection, float shininess, vec3 matS
if (NdotL < 0.0)
return vec3(0.,0.,0.);
vec3 halfVec = normalize(lightDir - viewDirection);
return pow(max(dot(viewNormal, halfVec), 0.0), 128.) * gl_LightSource[0].specular.xyz * matSpec;
return pow(max(dot(viewNormal, halfVec), 0.0), shininess) * gl_LightSource[0].specular.xyz * matSpec;
}