summaryrefslogtreecommitdiff
path: root/src/modules/ray/ray_camera.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-05-27 12:54:39 -0700
committerVito Caputo <vcaputo@pengaru.com>2017-05-27 12:58:19 -0700
commit14b972b114ac02d83ad1bd7e1dd5f48b948607c1 (patch)
tree43bb9d2d86867f2aa1fe6625c1f4c5a439047803 /src/modules/ray/ray_camera.c
parent9ec2d061958458ff430073905397c2cb0df85a87 (diff)
ray: normalize direction missed in 28d8022
Need to normalize the direction when we step the y axis and @ start.
Diffstat (limited to 'src/modules/ray/ray_camera.c')
-rw-r--r--src/modules/ray/ray_camera.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/ray/ray_camera.c b/src/modules/ray/ray_camera.c
index 5910094..8a06aa3 100644
--- a/src/modules/ray/ray_camera.c
+++ b/src/modules/ray/ray_camera.c
@@ -81,5 +81,5 @@ void ray_camera_frame_begin(ray_camera_t *camera, fb_fragment_t *fragment, ray_r
frame->cur_e = ray_3f_lerp(&frame->ne, &frame->se, frame->y_alpha);
ray->origin = camera->position;
- ray->direction = frame->cur_w;
+ ray->direction = ray_3f_normalize(&frame->cur_w);
}
© All Rights Reserved