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.
This commit is contained in:
Sergey Sharybin 2015-03-05 20:21:55 +05:00
parent 73d0749a59
commit 6e1ea04ada
Notes: blender-bot 2023-02-14 09:24:58 +01:00
Referenced by issue #43894, Wrong alpha with bilateral blur node
2 changed files with 14 additions and 0 deletions

View File

@ -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)

View File

@ -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 {