diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-05 18:21:55 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-05 18:21:55 +0300 |
commit | 6e1ea04ada2a4f1bcc2ac2df1b1f411756582643 (patch) | |
tree | 0c87ae1f30ccee108a595c2de8adbc1a7567bbbf /source | |
parent | 73d0749a59b7a8cbfbafdf9b2567978bf4855ce1 (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/compositor/operations/COM_RenderLayersProg.cpp | 13 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_RenderLayersProg.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index 4c6d5c24781..27936c21545 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 554e27eb579..f73d9de3e27 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 { |