Skip to content

Commit

Permalink
fix(rpict,rtrace,rvu,rcontrib): Went back to previous behind test
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregungory committed Nov 11, 2024
1 parent bd998fa commit 8fca372
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/rt/ambient.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
static const char RCSid[] = "$Id: ambient.c,v 2.124 2024/11/06 20:16:58 greg Exp $";
static const char RCSid[] = "$Id: ambient.c,v 2.125 2024/11/11 19:01:55 greg Exp $";
/*
* ambient.c - routines dealing with ambient (inter-reflected) component.
*
Expand Down Expand Up @@ -458,16 +458,15 @@ sumambient( /* get interpolated ambient value */
if (delta_r2 >= maxangle*maxangle)
continue;
/*
* Original ray behind test
* Modified ray behind test
*/
d = 0.0;
for (j = 0; j < 3; j++)
d += (r->rop[j] - av->pos[j])*(r->ron[j] + uvw[2][j]);
d *= 0.5;
VSUB(ck0, r->rop, av->pos);
d = DOT(ck0, uvw[2]);
if (d < -minarad*ambacc)
continue;
/* Pre-empt following test if we can */
if (fabs(d) >= av->rad[0]*ambacc)
d /= av->rad[0];
delta_t2 = d*d;
if (delta_t2 >= ambacc*ambacc)
continue;
/*
* Elliptical radii test based on Hessian
Expand Down

0 comments on commit 8fca372

Please sign in to comment.