NORSPEC-187 Directional ambient work in progress.

meow-7.2.2
Dave Parks 2013-05-17 12:19:08 -05:00
parent f18fd226c3
commit e6c2a76529
1 changed files with 9 additions and 1 deletions

View File

@ -296,7 +296,7 @@ void main()
float da = max(dot(norm.xyz, sun_dir.xyz), 0.0);
vec4 diffuse = texture2DRect(diffuseRect, tc);
vec3 col;
float bloom = 0.0;
@ -310,6 +310,14 @@ void main()
calcAtmospherics(pos.xyz, ambocc);
col = atmosAmbient(vec3(0));
float ambient = min(abs(dot(norm.xyz, sun_dir.xyz)), 1.0);
ambient *= 0.5;
ambient *= ambient;
ambient = (1.0-ambient);
col *= ambient;
col += atmosAffectDirectionalLight(max(min(da, scol) * 2.6, diffuse.a));
col *= diffuse.rgb;