star-vx

Structuring voxels for ray-tracing
git clone git://git.meso-star.fr/star-vx.git
Log | Files | Refs | README | LICENSE

commit bd80b3731ca4a491cf230105912c7935a0173fef
parent 74c1765f9d40275df7b9008688fe6480cfea3660
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Sat, 15 Sep 2018 11:03:50 +0200

Fix how the ray origin was transformed in normalized bitree space

Diffstat:
Msrc/svx_bintree_trace_ray.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/svx_bintree_trace_ray.c b/src/svx_bintree_trace_ray.c @@ -112,7 +112,7 @@ bintree_trace_ray ASSERT(rcp_btreesz > 0); /* Transform the ray origin in [0, 1] space */ - org = (float)(ray_org[iaxis] - btree->tree_low[0]) * rcp_btreesz; + org = (float)(ray_org[iaxis] - btree->tree_low[iaxis]) * rcp_btreesz; /* Transform the direction in the normalized bintree space */ dir = (float)(ray_dir[iaxis] * rcp_btreesz); /* Define if the 1D ray direction is roughly null */