Hi Mark,

Thanks for finding (and fixing!) this bug, which I inadvertently introduced while changing the square sampling to disk sampling. I've checked the change into CVS, which should show up in the HEAD in a day or two.

Cheers,
-Greg

From: Mark Stock <[email protected]>
Date: May 14, 2010 8:25:23 PM PDT

I was playing with the -pd option in rpict in Apr 27th HEAD and noticed that the blurred portion of the image was always skewed to the up and left. See the following movie:

http://markjstock.org/transfer/dofblur_test.mov

I think this change would fix it:

--- rpict.c_orig        2009-05-11 17:46:31.000000000 -0400
+++ rpict.c_new 2010-05-14 23:09:33.000000000 -0400
@@ -701,8 +701,8 @@
        if (dblur > FTINY && vdist > FTINY) {
                double  vc, dfh, dfv;
                                                /* square/circle conv. */
-               dfh = vc = frandom();
-               dfv = frandom();
+               dfh = vc = 2.*frandom() - 1.;
+               dfv = 2.*frandom() - 1.;
                dfh *= .5*dblur*sqrt(1. - .5*dfv*dfv);
                dfv *= .5*dblur*sqrt(1. - .5*vc*vc);
                if (ourview.type == VT_PER || ourview.type == VT_PAR) {

Mark

_______________________________________________
Radiance-dev mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-dev

Reply via email to