diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-06-11 12:28:04 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-06-11 12:28:04 +0400 |
commit | 8a5252c1cb178cd2d57656375804c04a85e88e1b (patch) | |
tree | 1a9902020dc30b6192cbab68eccb611e03f89a93 /source/blender | |
parent | 31c8f4fbd39374532af0033779f5853e4be7a528 (diff) |
* 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- :)
Diffstat (limited to 'source/blender')
4 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/compositor/nodes/COM_BlurNode.cpp b/source/blender/compositor/nodes/COM_BlurNode.cpp index d9cf2c2fef0..b27b6323f49 100644 --- a/source/blender/compositor/nodes/COM_BlurNode.cpp +++ b/source/blender/compositor/nodes/COM_BlurNode.cpp @@ -45,9 +45,6 @@ void BlurNode::convertToOperations(ExecutionSystem *graph, CompositorContext * c 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); diff --git a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp index e522d334d8b..07cc07880e7 100644 --- a/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianBokehBlurOperation.cpp @@ -131,10 +131,11 @@ void GaussianBokehBlurOperation::executePixel(float *color, int x, int y, Memory 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]; diff --git a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp index 2eb51b4577f..a7e443838a9 100644 --- a/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianXBlurOperation.cpp @@ -93,12 +93,13 @@ void GaussianXBlurOperation::executePixel(float *color, int x, int y, MemoryBuff 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]; diff --git a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp index 28e8e548530..c7da43fc20f 100644 --- a/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp +++ b/source/blender/compositor/operations/COM_GaussianYBlurOperation.cpp @@ -91,10 +91,11 @@ void GaussianYBlurOperation::executePixel(float *color, int x, int y, MemoryBuff 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]; |