ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/ambcomp.c
(Generate patch)

Comparing ray/src/rt/ambcomp.c (file contents):
Revision 2.68 by greg, Thu Oct 23 18:19:14 2014 UTC vs.
Revision 2.69 by greg, Thu Dec 4 05:26:28 2014 UTC

# Line 235 | Line 235 | samp_hemi(                             /* sample indirect hemisphere */
235          d = 1.0/(n*n);
236          scalecolor(hp->acoef, d);
237                                          /* make tangent plane axes */
238 <        hp->uy[0] = 0.5 - frandom();
239 <        hp->uy[1] = 0.5 - frandom();
240 <        hp->uy[2] = 0.5 - frandom();
241 <        for (i = 3; i--; )
242 <                if ((-0.6 < r->ron[i]) & (r->ron[i] < 0.6))
243 <                        break;
244 <        if (i < 0)
238 >        if (!getperpendicular(hp->ux, r->ron))
239                  error(CONSISTENCY, "bad ray direction in samp_hemi");
246        hp->uy[i] = 1.0;
247        VCROSS(hp->ux, hp->uy, r->ron);
248        normalize(hp->ux);
240          VCROSS(hp->uy, r->ron, hp->ux);
241                                          /* sample divisions */
242          for (i = hp->ns; i--; )

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines