mirror of
https://github.com/OpenMW/openmw.git
synced 2025-05-30 09:11:32 +00:00
fix red lighting with PVL in mac-os
This commit is contained in:
parent
1f724cc336
commit
055cc35208
2 changed files with 8 additions and 3 deletions
|
@ -72,6 +72,7 @@ uniform float distortionStrength;
|
|||
|
||||
#if !PER_PIXEL_LIGHTING
|
||||
centroid varying vec3 passLighting;
|
||||
centroid varying vec3 passDiffuseLighting;
|
||||
centroid varying vec3 passSpecular;
|
||||
centroid varying vec3 shadowDiffuseLighting;
|
||||
centroid varying vec3 shadowSpecularLighting;
|
||||
|
@ -220,7 +221,9 @@ vec2 screenCoords = gl_FragCoord.xy / screenRes;
|
|||
float shadowing = unshadowedLightRatio(-passViewPos.z);
|
||||
vec3 lighting, specular;
|
||||
#if !PER_PIXEL_LIGHTING
|
||||
lighting = passLighting + shadowDiffuseLighting * shadowing;
|
||||
lighting = passDiffuseLighting * diffuseColor.xyz + passLighting;
|
||||
clampLightingResult(lighting);
|
||||
lighting += shadowDiffuseLighting * diffuseColor.xyz * shadowing;
|
||||
specular = passSpecular + shadowSpecularLighting * shadowing;
|
||||
#else
|
||||
#if @specularMap
|
||||
|
|
|
@ -53,6 +53,7 @@ varying vec2 glossMapUV;
|
|||
|
||||
#if !PER_PIXEL_LIGHTING
|
||||
centroid varying vec3 passLighting;
|
||||
centroid varying vec3 passDiffuseLighting;
|
||||
centroid varying vec3 passSpecular;
|
||||
centroid varying vec3 shadowDiffuseLighting;
|
||||
centroid varying vec3 shadowSpecularLighting;
|
||||
|
@ -150,10 +151,11 @@ void main(void)
|
|||
#if !PER_PIXEL_LIGHTING
|
||||
vec3 diffuseLight, ambientLight, specularLight;
|
||||
doLighting(viewPos.xyz, viewNormal, gl_FrontMaterial.shininess, diffuseLight, ambientLight, specularLight, shadowDiffuseLighting, shadowSpecularLighting);
|
||||
passLighting = getDiffuseColor().xyz * diffuseLight + getAmbientColor().xyz * ambientLight + getEmissionColor().xyz * emissiveMult;
|
||||
passLighting = getAmbientColor().xyz * ambientLight + getEmissionColor().xyz * emissiveMult;
|
||||
passDiffuseLighting = diffuseLight;
|
||||
passSpecular = getSpecularColor().xyz * specularLight * specStrength;
|
||||
clampLightingResult(passLighting);
|
||||
shadowDiffuseLighting *= getDiffuseColor().xyz;
|
||||
clampLightingResult(passDiffuseLighting);
|
||||
shadowSpecularLighting *= getSpecularColor().xyz * specStrength;
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue