[Bf-blender-cvs] [6e1ea04] master: Fix T43894: Wrong alpha with bilateral blur node
Sergey Sharybin
noreply at git.blender.org
Thu Mar 5 16:27:26 CET 2015
Commit: 6e1ea04ada2a4f1bcc2ac2df1b1f411756582643
Author: Sergey Sharybin
Date: Thu Mar 5 20:21:55 2015 +0500
Branches: master
https://developer.blender.org/rB6e1ea04ada2a4f1bcc2ac2df1b1f411756582643
Fix T43894: Wrong alpha with bilateral blur node
The issue was caused by AO operation reporting it's a color operation
(which means it's expected to output RGBA) but internally it's RGB
only in the render engine, which caused some memory to be uninitialized.
===================================================================
M source/blender/compositor/operations/COM_RenderLayersProg.cpp
M source/blender/compositor/operations/COM_RenderLayersProg.h
===================================================================
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
index 4c6d5c2..27936c2 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -193,6 +193,19 @@ RenderLayersAOOperation::RenderLayersAOOperation() : RenderLayersBaseProg(SCE_PA
this->addOutputSocket(COM_DT_COLOR);
}
+
+void RenderLayersAOOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
+{
+ float *inputBuffer = this->getInputBuffer();
+ if (inputBuffer == NULL) {
+ zero_v3(output);
+ }
+ else {
+ doInterpolation(output, x, y, sampler);
+ }
+ output[3] = 1.0f;
+}
+
/* ******** Render Layers Alpha Operation ******** */
RenderLayersAlphaProg::RenderLayersAlphaProg() : RenderLayersBaseProg(SCE_PASS_COMBINED, 4)
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.h b/source/blender/compositor/operations/COM_RenderLayersProg.h
index 554e27e..f73d9de 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.h
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.h
@@ -105,6 +105,7 @@ public:
class RenderLayersAOOperation : public RenderLayersBaseProg {
public:
RenderLayersAOOperation();
+ void executePixelSampled(float output[4], float x, float y, PixelSampler sampler);
};
class RenderLayersAlphaProg : public RenderLayersBaseProg {
More information about the Bf-blender-cvs
mailing list