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

Comparing ray/src/rt/rpict.c (file contents):
Revision 2.80 by schorsch, Sun Apr 27 17:22:49 2008 UTC vs.
Revision 2.81 by greg, Mon May 11 21:46:31 2009 UTC

# Line 700 | Line 700 | pixvalue(              /* compute pixel value */
700                                                  /* optional depth-of-field */
701          if (dblur > FTINY && vdist > FTINY) {
702                  double  vc, dfh, dfv;
703 <                                                /* PI/4. square/circle conv. */
704 <                dfh = PI/4.*dblur*(.5 - frandom());
705 <                dfv = PI/4.*dblur*(.5 - frandom());
703 >                                                /* square/circle conv. */
704 >                dfh = vc = frandom();
705 >                dfv = frandom();
706 >                dfh *= .5*dblur*sqrt(1. - .5*dfv*dfv);
707 >                dfv *= .5*dblur*sqrt(1. - .5*vc*vc);
708                  if (ourview.type == VT_PER || ourview.type == VT_PAR) {
709                          dfh /= sqrt(ourview.hn2);
710                          dfv /= sqrt(ourview.vn2);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines