Minor modification of foreground processing code in the defocus node.
authorAlfredo de Greef <eeshlo@yahoo.com>
Tue, 20 Mar 2007 06:50:39 +0000 (06:50 +0000)
committerAlfredo de Greef <eeshlo@yahoo.com>
Tue, 20 Mar 2007 06:50:39 +0000 (06:50 +0000)
Now uses a fixed value instead of a value based on the closest object.
Should eliminate sudden jumps in blur amount from frame to frame when used
in animations.

source/blender/blenkernel/intern/node_composite.c

index 2ad849cc69a5597087ab1c7700f5ec2ac1852bb5..a01ae0690d0b63fee31014ec411c3df835505792 100644 (file)
@@ -3456,8 +3456,9 @@ static void defocus_blur(CompBuf* new, CompBuf* img, CompBuf* zbuf, float inpval
                }
                
                // fast blur...
-               IIR_gauss(crad, 2.f*maxfgc);
-               IIR_gauss(wts, 2.f*maxfgc);
+               wt = aperture*128.f;
+               IIR_gauss(crad, wt);
+               IIR_gauss(wts, wt);
                
                // find new maximum to scale it back to original
                // (could skip this, not strictly necessary, in general, difference is quite small, but just in case...)