summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-08-01 15:07:51 -0700
committerEric Anholt <eric@anholt.net>2009-08-01 15:07:51 -0700
commiteccbad857dafd0ac41c5eb02a29a780f687aa423 (patch)
tree7221bda0a593be3e68e98d88c35ccdd26925a2fa
parentbaed6f2e32a809380c6cdbce1a63ab9a10d775b4 (diff)
Don't include shadow in ambient calculations.
-rw-r--r--glass.frag4
1 files changed, 2 insertions, 2 deletions
diff --git a/glass.frag b/glass.frag
index 3810c52..43a319d 100644
--- a/glass.frag
+++ b/glass.frag
@@ -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;