diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_GammaOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GammaOperation.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/compositor/operations/COM_GammaOperation.cpp b/source/blender/compositor/operations/COM_GammaOperation.cpp index 40c2ee0a1d4..326031c5984 100644 --- a/source/blender/compositor/operations/COM_GammaOperation.cpp +++ b/source/blender/compositor/operations/COM_GammaOperation.cpp @@ -37,7 +37,7 @@ void GammaOperation::initExecution() this->m_inputGammaProgram = this->getInputSocketReader(1); } -void GammaOperation::executePixel(float *color, float x, float y, PixelSampler sampler) +void GammaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) { float inputValue[4]; float inputGamma[4]; @@ -46,11 +46,11 @@ void GammaOperation::executePixel(float *color, float x, float y, PixelSampler s this->m_inputGammaProgram->read(inputGamma, x, y, sampler); const float gamma = inputGamma[0]; /* check for negative to avoid nan's */ - color[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0]; - color[1] = inputValue[1] > 0.0f ? powf(inputValue[1], gamma) : inputValue[1]; - color[2] = inputValue[2] > 0.0f ? powf(inputValue[2], gamma) : inputValue[2]; + output[0] = inputValue[0] > 0.0f ? powf(inputValue[0], gamma) : inputValue[0]; + output[1] = inputValue[1] > 0.0f ? powf(inputValue[1], gamma) : inputValue[1]; + output[2] = inputValue[2] > 0.0f ? powf(inputValue[2], gamma) : inputValue[2]; - color[3] = inputValue[3]; + output[3] = inputValue[3]; } void GammaOperation::deinitExecution() |