Revision: 47725
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47725
Author:   jbakker
Date:     2012-06-11 08:28:04 +0000 (Mon, 11 Jun 2012)
Log Message:
-----------
 * Blur node had some irregularities at the edge of the screen
 only visible when doing large size blurs.
 also solved the catcom/mitch filter that didn't work at low/medium quality

 PS never use BokehBlur Gausian filter as it is 99%+ identicat as non bokeh <= 
top for sergey- :)

Modified Paths:
--------------
    trunk/blender/source/blender/compositor/nodes/COM_BlurNode.cpp
    
trunk/blender/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
    
trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
    
trunk/blender/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp

Modified: trunk/blender/source/blender/compositor/nodes/COM_BlurNode.cpp
===================================================================
--- trunk/blender/source/blender/compositor/nodes/COM_BlurNode.cpp      
2012-06-11 08:15:37 UTC (rev 47724)
+++ trunk/blender/source/blender/compositor/nodes/COM_BlurNode.cpp      
2012-06-11 08:28:04 UTC (rev 47725)
@@ -45,9 +45,6 @@
        
        CompositorQuality quality = context->getQuality();
        
-       if (data->filtertype == R_FILTER_MITCH || data->filtertype == 
R_FILTER_CATROM) {
-               quality = COM_QUALITY_HIGH;
-       }
        if (data->filtertype == R_FILTER_FAST_GAUSS) {
                FastGaussianBlurOperation *operationfgb = new 
FastGaussianBlurOperation();
                operationfgb->setData(data);

Modified: 
trunk/blender/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
       2012-06-11 08:15:37 UTC (rev 47724)
+++ 
trunk/blender/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp
       2012-06-11 08:28:04 UTC (rev 47725)
@@ -131,10 +131,11 @@
        maxy = min(maxy, inputBuffer->getRect()->ymax);
        maxx = min(maxx, inputBuffer->getRect()->xmax);
 
-       int index = 0;
+       int index;
        int step = QualityStepHelper::getStep();
        int offsetadd = QualityStepHelper::getOffsetAdd();
        for (int ny = miny ; ny < maxy ; ny +=step) {
+               index = ((ny-y)+this->rady) * (this->radx*2+1) + 
(minx-x+this->radx);
                int bufferindex = ((minx - 
bufferstartx)*4)+((ny-bufferstarty)*4*bufferwidth);
                for (int nx = minx ; nx < maxx ; nx +=step) {
                        float multiplyer = gausstab[index];

Modified: 
trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
   2012-06-11 08:15:37 UTC (rev 47724)
+++ 
trunk/blender/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp
   2012-06-11 08:28:04 UTC (rev 47725)
@@ -93,12 +93,13 @@
        maxy = min(maxy, inputBuffer->getRect()->ymax);
        maxx = min(maxx, inputBuffer->getRect()->xmax);
 
-       int index = 0;
+       int index;
        int step = getStep();
        int offsetadd = getOffsetAdd();
        int bufferindex = ((minx - 
bufferstartx)*4)+((miny-bufferstarty)*4*bufferwidth);
        for (int nx = minx ; nx < maxx ; nx +=step) {
-               float multiplyer = gausstab[index++];
+               index = (nx-x)+this->rad;
+               float multiplyer = gausstab[index];
                tempColor[0] += multiplyer * buffer[bufferindex];
                tempColor[1] += multiplyer * buffer[bufferindex+1];
                tempColor[2] += multiplyer * buffer[bufferindex+2];

Modified: 
trunk/blender/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
===================================================================
--- 
trunk/blender/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
   2012-06-11 08:15:37 UTC (rev 47724)
+++ 
trunk/blender/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp
   2012-06-11 08:28:04 UTC (rev 47725)
@@ -91,10 +91,11 @@
        maxx = min(maxx, inputBuffer->getRect()->xmax);
 
        int step = getStep();
-       int index = 0;
+       int index;
        for (int ny = miny ; ny < maxy ; ny +=step) {
+               index = (ny-y)+this->rad;
                int bufferindex = ((minx - 
bufferstartx)*4)+((ny-bufferstarty)*4*bufferwidth);
-               float multiplyer = gausstab[index++];
+               float multiplyer = gausstab[index];
                tempColor[0] += multiplyer * buffer[bufferindex];
                tempColor[1] += multiplyer * buffer[bufferindex+1];
                tempColor[2] += multiplyer * buffer[bufferindex+2];

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to