revert change to the slf file

This commit is contained in:
samcake 2015-10-09 17:40:36 -07:00
parent 297c3c9ed0
commit 3d607f406f

View file

@ -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);