summaryrefslogtreecommitdiffstats
path: root/libdimension/raytrace.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-12-11 17:22:26 -0500
committerTavian Barnes <tavianator@gmail.com>2010-12-11 17:22:26 -0500
commit7c65ec1794105b6fd0f0c4f6b0e87e160c07736c (patch)
treecfa34af69625d94fac9be2dc4e632a8e3f04a40d /libdimension/raytrace.c
parent16d25a964b90c7902606c06c8a26676820288517 (diff)
downloaddimension-7c65ec1794105b6fd0f0c4f6b0e87e160c07736c.tar.xz
Reset the ior to 1.0 for every ray.
Diffstat (limited to 'libdimension/raytrace.c')
-rw-r--r--libdimension/raytrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdimension/raytrace.c b/libdimension/raytrace.c
index 9d330ab..c91b74c 100644
--- a/libdimension/raytrace.c
+++ b/libdimension/raytrace.c
@@ -202,7 +202,6 @@ dmnsn_raytrace_scene_impl(dmnsn_progress *progress, dmnsn_scene *scene,
.parent = NULL,
.scene = scene,
.prtree = prtree,
- .ior = 1.0
};
/* Iterate through each pixel */
@@ -217,6 +216,7 @@ dmnsn_raytrace_scene_impl(dmnsn_progress *progress, dmnsn_scene *scene,
/* Shoot a ray */
state.reclevel = scene->reclimit;
+ state.ior = 1.0;
dmnsn_color color = dmnsn_raytrace_shoot(&state, ray);
dmnsn_set_pixel(scene->canvas, x, y, color);