diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc')
-rw-r--r-- | source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc index 5af992c8809..2d04c22533b 100644 --- a/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc +++ b/source/blender/compositor/operations/COM_AlphaOverPremultiplyOperation.cc @@ -25,33 +25,33 @@ AlphaOverPremultiplyOperation::AlphaOverPremultiplyOperation() this->flags.can_be_constant = true; } -void AlphaOverPremultiplyOperation::executePixelSampled(float output[4], - float x, - float y, - PixelSampler sampler) +void AlphaOverPremultiplyOperation::execute_pixel_sampled(float output[4], + float x, + float y, + PixelSampler sampler) { - float inputColor1[4]; - float inputOverColor[4]; + float input_color1[4]; + float input_over_color[4]; float value[4]; - inputValueOperation_->readSampled(value, x, y, sampler); - inputColor1Operation_->readSampled(inputColor1, x, y, sampler); - inputColor2Operation_->readSampled(inputOverColor, x, y, sampler); + input_value_operation_->read_sampled(value, x, y, sampler); + input_color1_operation_->read_sampled(input_color1, x, y, sampler); + input_color2_operation_->read_sampled(input_over_color, x, y, sampler); /* Zero alpha values should still permit an add of RGB data */ - if (inputOverColor[3] < 0.0f) { - copy_v4_v4(output, inputColor1); + if (input_over_color[3] < 0.0f) { + copy_v4_v4(output, input_color1); } - else if (value[0] == 1.0f && inputOverColor[3] >= 1.0f) { - copy_v4_v4(output, inputOverColor); + else if (value[0] == 1.0f && input_over_color[3] >= 1.0f) { + copy_v4_v4(output, input_over_color); } else { - float mul = 1.0f - value[0] * inputOverColor[3]; + float mul = 1.0f - value[0] * input_over_color[3]; - output[0] = (mul * inputColor1[0]) + value[0] * inputOverColor[0]; - output[1] = (mul * inputColor1[1]) + value[0] * inputOverColor[1]; - output[2] = (mul * inputColor1[2]) + value[0] * inputOverColor[2]; - output[3] = (mul * inputColor1[3]) + value[0] * inputOverColor[3]; + output[0] = (mul * input_color1[0]) + value[0] * input_over_color[0]; + output[1] = (mul * input_color1[1]) + value[0] * input_over_color[1]; + output[2] = (mul * input_color1[2]) + value[0] * input_over_color[2]; + output[3] = (mul * input_color1[3]) + value[0] * input_over_color[3]; } } |