diff options
author | Eric Anholt <eric@anholt.net> | 2009-08-01 15:07:51 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-08-01 15:07:51 -0700 |
commit | eccbad857dafd0ac41c5eb02a29a780f687aa423 (patch) | |
tree | 7221bda0a593be3e68e98d88c35ccdd26925a2fa | |
parent | baed6f2e32a809380c6cdbce1a63ab9a10d775b4 (diff) |
Don't include shadow in ambient calculations.
-rw-r--r-- | glass.frag | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -46,7 +46,7 @@ void main() float v_dot_h = dot(v, h); float s = .7; float d = 1 - s; - float Ii = 0.9 * shadow; /*intensity of incoming light */ + float Ii = 0.9; /*intensity of incoming light */ float Iia = .1 * Ii; /*intensity of ambient light */ float cos2_alpha = n_dot_h * n_dot_h; @@ -97,7 +97,7 @@ void main() gl_FragColor = n_dot_l * step(0, n_dot_l) * vec4(material_color.xyz * - ((Rd * d + Rs * s) * Ii), + ((Rd * d + Rs * s) * Ii * shadow), material_color.w) + Iia * Ra * material_color.xyzw; |