removing the atmosphere effect from the directional lighting

This commit is contained in:
Sam Gateau 2015-03-10 10:24:16 -07:00
parent c1a0d767c9
commit da16baf0ca

View file

@ -51,7 +51,6 @@ uniform SphericalHarmonics ambientSphere;
// Everything about light
<@include model/Light.slh@>
<@include model/Atmosphere.slh@>
// The view Matrix
uniform mat4 invViewMat;
@ -91,14 +90,6 @@ vec3 evalAmbienSphereGlobalColor(float shadowAttenuation, vec3 position, vec3 no
color += vec3(diffuse + shading.rgb) * shading.w * shadowAttenuation * getLightColor(light) * getLightIntensity(light);
vec3 fragPos = vec3(invViewMat * vec4(position, 1.0));
vec3 cameraPos = invViewMat[3].xyz;
vec3 lightPos = 10000.0 * getLightDirection(light);
Atmosphere atmo = getAtmosphere();
vec4 atmoColor = evalAtmosphereContribution(atmo, fragPos, cameraPos, lightPos);
return color;
}