summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-04-17 12:34:12 -0400
committerTavian Barnes <tavianator@gmail.com>2010-04-17 12:34:12 -0400
commitbafe01580d1470f703a95a434b38998843440cd0 (patch)
tree29709d7e5fa98d7a417ef393d5cc022d7d83ac62
parent8fbe3e7d3325089baf551096983217b4963c789b (diff)
downloaddimension-bafe01580d1470f703a95a434b38998843440cd0.tar.xz
Don't render transparent shadows with transparency off.
-rw-r--r--libdimension/raytrace.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdimension/raytrace.c b/libdimension/raytrace.c
index 9ef54e1..59ad1b3 100644
--- a/libdimension/raytrace.c
+++ b/libdimension/raytrace.c
@@ -299,7 +299,8 @@ dmnsn_raytrace_light_ray(const dmnsn_raytrace_state *state,
shadow_state.reclevel = reclevel;
dmnsn_raytrace_pigment(&shadow_state);
- if (shadow_state.pigment.filter || shadow_state.pigment.trans) {
+ if ((state->scene->quality & DMNSN_RENDER_TRANSLUCENCY)
+ && (shadow_state.pigment.filter || shadow_state.pigment.trans)) {
color = dmnsn_color_filter(color, shadow_state.pigment);
shadow_ray.x0 = dmnsn_line_point(shadow_ray, shadow_caster.t);
shadow_ray.n = dmnsn_vector_sub(light->x0, shadow_ray.x0);