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-06-12 08:23:21 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-06-12 08:23:21 +0400
commitac5a735e3fe9fe29e38e3a20c20da87b27feb112 (patch)
tree52059f3dbc9827eb498abe772e763e541b3b3608 /source/blender/compositor/operations/COM_BokehBlurOperation.cpp
parent7977078227d6da77e294dd860f4685387f0bae56 (diff)
* FIX for
- [#31777] Border Crop gives black - [#31768] Crash when connecting a Math node to a translate node in Tiles comp - [#31638] View node in new node compo system crashes when inside a group * make sure a very fast vignette can be made by using a EliipseMask + Fast Gaussian blur
Diffstat (limited to 'source/blender/compositor/operations/COM_BokehBlurOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_BokehBlurOperation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
index 71a87dce2a7..b4811c89dc5 100644
--- a/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehBlurOperation.cpp
@@ -86,6 +86,7 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
float overallmultiplyerr = 0;
float overallmultiplyerg = 0;
float overallmultiplyerb = 0;
+ float overallmultiplyera = 0;
MemoryBuffer *inputBuffer = (MemoryBuffer*)data;
float *buffer = inputBuffer->getBuffer();
int bufferwidth = inputBuffer->getWidth();
@@ -115,16 +116,18 @@ void BokehBlurOperation::executePixel(float *color, int x, int y, MemoryBuffer *
tempColor[0] += bokeh[0] * buffer[bufferindex];
tempColor[1] += bokeh[1] * buffer[bufferindex+1];
tempColor[2] += bokeh[2]* buffer[bufferindex+2];
+ tempColor[3] += bokeh[3]* buffer[bufferindex+3];
overallmultiplyerr += bokeh[0];
overallmultiplyerg += bokeh[1];
overallmultiplyerb += bokeh[2];
+ overallmultiplyera += bokeh[3];
bufferindex +=offsetadd;
}
}
color[0] = tempColor[0] * (1.0f / overallmultiplyerr);
color[1] = tempColor[1] * (1.0f / overallmultiplyerg);
color[2] = tempColor[2] * (1.0f / overallmultiplyerb);
- color[3] = 1.0f;
+ color[3] = tempColor[3] * (1.0f / overallmultiplyera);
}
else {
inputProgram->read(color, x, y, COM_PS_NEAREST, inputBuffers);