solstice-solver

Solver library of the solstice app
git clone git://git.meso-star.com/solstice-solver.git
Log | Files | Refs | README | LICENSE

commit e02b19f0af176de48d9cd7885cddad9b0c89c211
parent 914667a15a06f3d1ee3eda15cc44a4759d735748
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 28 Feb 2017 15:32:14 +0100

Fix a precision issue in the RT of the punched surface

Diffstat:
Msrc/ssol_scene.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/ssol_scene.c b/src/ssol_scene.c @@ -428,6 +428,8 @@ hit_filter_function /* No ray data => nothing to filter */ if(!ray_data) return 0; + /* Handle numerical imprecision */ + if(hit->distance <= rdata->range_min) return 1; /* Retrieve the intersected instance and shaded shape */ inst = *htable_instance_find(&rdata->scn->instances_rt, &hit->prim.inst_id); @@ -458,7 +460,7 @@ hit_filter_function /* No projection is found => the ray does not intersect the quadric */ return 1; } - if(dst <= rdata->range_min) { + if((float)dst <= rdata->range_min) { /* Handle RT numerical imprecision, the hit is below the lower bound * of the ray range. */ return 1;