Bokeh blur in the blur node is wronlgy calculated.
authorJeroen Bakker <j.bakker@atmind.nl>
Tue, 12 Jul 2011 19:21:38 +0000 (19:21 +0000)
committerJeroen Bakker <j.bakker@atmind.nl>
Tue, 12 Jul 2011 19:21:38 +0000 (19:21 +0000)
when using the node on a single white pixel on black background, the output should look like as the bokeh image.
being a round image, but it looked like a donut.

the make_gausstab used dist/rad and bokeh used (dist/rad)*2 - 1
I changed it to reflect the correct bokeh circular image

source/blender/nodes/intern/CMP_nodes/CMP_blur.c

index 2b33126b3a769bfc30d6d0726df9ea20594cabff..718578a921b3a691e361cdafc45fa1800aa7b37b 100644 (file)
@@ -387,7 +387,7 @@ static void bokeh_single_image(bNode *node, CompBuf *new, CompBuf *img, float fa
                        float dist= sqrt(fj*fj + fi*fi);
                        
                //*dgauss= hexagon_filter(fi, fj);
-                       *dgauss= RE_filter_value(nbd->filtertype, 2.0f*dist - 1.0f);
+                       *dgauss= RE_filter_value(nbd->filtertype, dist);
 
                        val+= *dgauss;
                }