From 14b972b114ac02d83ad1bd7e1dd5f48b948607c1 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 27 May 2017 12:54:39 -0700 Subject: ray: normalize direction missed in 28d8022 Need to normalize the direction when we step the y axis and @ start. --- src/modules/ray/ray_camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/ray/ray_camera.c') 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); } -- cgit v1.2.3