summaryrefslogtreecommitdiffstats
path: root/libdimension/reflective.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-02-25 22:03:11 -0500
committerTavian Barnes <tavianator@gmail.com>2010-02-25 22:03:11 -0500
commit40b180db2833e4e6ef835a463ca15ff865ce0d18 (patch)
treeebb3f808374d653cd150852e252e68b9addca8d0 /libdimension/reflective.c
parentb27ad82573bc70d84bc4213ba00771f4746b36bc (diff)
downloaddimension-40b180db2833e4e6ef835a463ca15ff865ce0d18.tar.xz
Point the normal vectors away from the object.
Diffstat (limited to 'libdimension/reflective.c')
-rw-r--r--libdimension/reflective.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libdimension/reflective.c b/libdimension/reflective.c
index 9667072..726bf8d 100644
--- a/libdimension/reflective.c
+++ b/libdimension/reflective.c
@@ -37,7 +37,7 @@ dmnsn_reflective_finish_fn(const dmnsn_finish *finish,
dmnsn_vector ray, dmnsn_vector normal)
{
dmnsn_reflection_params *params = finish->ptr;
- double reflection = pow(dmnsn_vector_dot(ray, normal), params->falloff);
+ double reflection = pow(fabs(dmnsn_vector_dot(ray, normal)), params->falloff);
return dmnsn_color_illuminate(
dmnsn_color_gradient(params->min, params->max, reflection),