mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-03 09:49:40 +00:00
Merge branch 'osgshadow-test-vdsm-mesa-optimised-shader-2' into osgshadow-test-vdsm
This commit is contained in:
commit
f3fc888ab9
1 changed files with 3 additions and 3 deletions
|
@ -44,12 +44,12 @@ vec4 doLighting(vec3 viewPos, vec3 viewNormal, vec4 vertexColor, out vec3 shadow
|
|||
vec3 diffuseLight, ambientLight;
|
||||
perLight(ambientLight, diffuseLight, 0, viewPos, viewNormal, diffuse, ambient);
|
||||
#if PER_PIXEL_LIGHTING
|
||||
lightResult.xyz += ambientLight + diffuseLight * shadowing;
|
||||
lightResult.xyz += diffuseLight * shadowing - diffuseLight; // This light gets added a second time in the loop to fix Mesa users' slowdown, so we need to negate its contribution here.
|
||||
#else
|
||||
shadowDiffuse = diffuseLight;
|
||||
lightResult.xyz += ambientLight;
|
||||
lightResult.xyz -= shadowDiffuse; // This light gets added a second time in the loop to fix Mesa users' slowdown, so we need to negate its contribution here.
|
||||
#endif
|
||||
for (int i=1; i<MAX_LIGHTS; ++i)
|
||||
for (int i=0; i<MAX_LIGHTS; ++i)
|
||||
{
|
||||
perLight(ambientLight, diffuseLight, i, viewPos, viewNormal, diffuse, ambient);
|
||||
lightResult.xyz += ambientLight + diffuseLight;
|
||||
|
|
Loading…
Reference in a new issue