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

Comparing ray/src/gen/mkillum2.c (file contents):
Revision 2.25 by greg, Thu Dec 6 19:40:43 2007 UTC vs.
Revision 2.28 by greg, Thu Dec 13 07:03:37 2007 UTC

# Line 139 | Line 139 | srcsamps(                      /* sample sources from this surface positi
139                          if (i < 0)
140                                  continue;       /* must not be important */
141                          sr.rno = i;
142 <                        d = getBSDF_incrad(il->sd, i);
143 <                        d = 1.0/(PI*d*d);
142 >                        d = 1.0/getBSDF_incohm(il->sd, i);
143                  } else {
144                          if (v[2] >= -FTINY)
145                                  continue;       /* only sample transmission */
# Line 151 | Line 150 | srcsamps(                      /* sample sources from this surface positi
150                          j = d*nazi + 0.5;
151                          if (j >= nazi) j = 0;
152                          sr.rno = i*nazi + j;
153 <                        d = nalt*nazi/PI;
153 >                        d = nalt*nazi/PI * -v[2];
154                  }
155                  d *= si.dom;                    /* solid angle correction */
156                  scalecolor(sr.rcoef, d);
# Line 393 | Line 392 | my_face(               /* make an illum face */
392                  nalt = sqrt(il->sd->nout/PI) + .5;
393                  nazi = PI*nalt + .5;
394                  redistribute(il->sd, nalt, nazi, u, v, fa->norm, xfm);
395 +                if (!il->sampdens)
396 +                        il->sampdens = nalt*nazi/PI + .999;
397          }
398                                  /* write out the face and its distribution */
399          if (average(il, distarr, n)) {
# Line 586 | Line 587 | my_ring(               /* make an illum ring */
587                  nalt = sqrt(il->sd->nout/PI) + .5;
588                  nazi = PI*nalt + .5;
589                  redistribute(il->sd, nalt, nazi, u, v, co->ad, xfm);
590 +                if (!il->sampdens)
591 +                        il->sampdens = nalt*nazi/PI + .999;
592          }
593                                  /* write out the ring and its distribution */
594          if (average(il, distarr, n)) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines