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

Comparing ray/src/rt/normal.c (file contents):
Revision 2.51 by greg, Thu Dec 8 17:56:38 2005 UTC vs.
Revision 2.52 by greg, Fri May 7 15:44:52 2010 UTC

# Line 156 | Line 156 | dirnorm(               /* compute source contribution */
156                                                  /* roughness + source */
157                  dtmp = np->alpha2 + omega*(1.0/PI);
158                                                  /* gaussian */
159 <                dtmp = exp((2.*DOT(np->prdir,ldir)-2.)/dtmp) /
160 <                                        (PI*np->pdot*dtmp);
159 >                 dtmp = exp((2.*DOT(np->prdir,ldir)-2.)/dtmp)/(PI*dtmp);
160                                                  /* worth using? */
161                  if (dtmp > FTINY) {
162                          copycolor(ctmp, np->mcolor);
163 <                        dtmp *= np->tspec * omega;
163 >                        dtmp *= np->tspec * omega * sqrt(-ldot/np->pdot);
164                          scalecolor(ctmp, dtmp);
165                          addcolor(cval, ctmp);
166                  }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines