Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2012-07-31 16:36:08 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-07-31 16:36:08 +0400
commite7e7972cd6b9bc22b4378b19db0b796ffd56fbb8 (patch)
tree05ef4f0ff2e37d49576663eaa7a4d511fb5ef104 /source/blender/compositor/operations/COM_BokehBlurOperation.cpp
parent8c2550eed731cad11149da47c628cac1d8e4c67a (diff)
Fixed [#32226] Black cadioptric lenses in CPU BokehBlur node
Diffstat (limited to 'source/blender/compositor/operations/COM_BokehBlurOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index ef28d55dbc8..a3d685de9a6 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -94,9 +94,14 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, void *data)
int bufferstartx = inputBuffer->getRect()->xmin;
int bufferstarty = inputBuffer->getRect()->ymin;
int pixelSize = this->m_size * this->getWidth() / 100.0f;
- if (pixelSize==0) {
- this->m_inputProgram->read(color, x, y, COM_PS_NEAREST);
- return;
+ zero_v4(color_accum);
+
+ if (pixelSize<2) {
+ this->m_inputProgram->read(color_accum, x, y, COM_PS_NEAREST);
+ multiplier_accum[0] = 1.0f;
+ multiplier_accum[1] = 1.0f;
+ multiplier_accum[2] = 1.0f;
+ multiplier_accum[3] = 1.0f;
}
int miny = y - pixelSize;
int maxy = y + pixelSize;
@@ -107,7 +112,6 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, void *data)
maxy = min(maxy, inputBuffer->getRect()->ymax);
maxx = min(maxx, inputBuffer->getRect()->xmax);
- zero_v4(color_accum);
int step = getStep();
int offsetadd = getOffsetAdd();