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:
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
|
@ -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)
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue