From 3d607f406f99a349504b32aedbfacef4d5ec296d Mon Sep 17 00:00:00 2001 From: samcake Date: Fri, 9 Oct 2015 17:40:36 -0700 Subject: [PATCH] revert change to the slf file --- libraries/render-utils/src/DeferredGlobalLight.slh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libraries/render-utils/src/DeferredGlobalLight.slh b/libraries/render-utils/src/DeferredGlobalLight.slh index 351a178968..983b8002f7 100755 --- a/libraries/render-utils/src/DeferredGlobalLight.slh +++ b/libraries/render-utils/src/DeferredGlobalLight.slh @@ -41,7 +41,7 @@ struct SphericalHarmonics { vec4 evalSphericalLight(SphericalHarmonics sh, vec3 direction ) { - vec3 dir = direction.xyz; // we don;t understand why yet but we need to use z as vertical axis? + vec3 dir = direction.xzy; // we don;t understand why yet but we need to use z as vertical axis? const float C1 = 0.429043; const float C2 = 0.511664; @@ -125,10 +125,7 @@ vec3 evalSkyboxGlobalColor(mat4 invViewMat, float shadowAttenuation, vec3 positi vec4 fragEyeVector = invViewMat * vec4(-position, 0.0); vec3 fragEyeDir = normalize(fragEyeVector.xyz); - vec3 mapVal = evalSkyboxLight(fragNormal, 0).xyz; - vec3 shVal = evalSphericalLight(ambientSphere, fragNormal).xyz; - vec3 ambientLight = (normal.x > 0 ? mapVal : shVal) * getLightAmbientIntensity(light); - vec3 color = diffuse.rgb * ambientLight; + vec3 color = diffuse.rgb * evalSphericalLight(ambientSphere, fragNormal).xyz * getLightAmbientIntensity(light); vec4 shading = evalFragShading(fragNormal, -getLightDirection(light), fragEyeDir, specular, gloss);