diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_ImageOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ImageOperation.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/compositor/operations/COM_ImageOperation.cpp b/source/blender/compositor/operations/COM_ImageOperation.cpp index c15bb1dc5e6..4ec5643c0bb 100644 --- a/source/blender/compositor/operations/COM_ImageOperation.cpp +++ b/source/blender/compositor/operations/COM_ImageOperation.cpp @@ -107,32 +107,32 @@ void BaseImageOperation::determineResolution(unsigned int resolution[2], unsigne } } -void ImageOperation::executePixel(float *color, float x, float y, PixelSampler sampler) +void ImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) { if (this->m_imageBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) { - zero_v4(color); + zero_v4(output); } else { switch (sampler) { case COM_PS_NEAREST: - neareast_interpolation_color(this->m_buffer, NULL, color, x, y); + neareast_interpolation_color(this->m_buffer, NULL, output, x, y); break; case COM_PS_BILINEAR: - bilinear_interpolation_color(this->m_buffer, NULL, color, x, y); + bilinear_interpolation_color(this->m_buffer, NULL, output, x, y); break; case COM_PS_BICUBIC: - bicubic_interpolation_color(this->m_buffer, NULL, color, x, y); + bicubic_interpolation_color(this->m_buffer, NULL, output, x, y); break; } } } -void ImageAlphaOperation::executePixel(float *color, float x, float y, PixelSampler sampler) +void ImageAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) { float tempcolor[4]; if (this->m_imageBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) { - color[0] = 0.0f; + output[0] = 0.0f; } else { tempcolor[3] = 1.0f; @@ -147,17 +147,17 @@ void ImageAlphaOperation::executePixel(float *color, float x, float y, PixelSamp bicubic_interpolation_color(this->m_buffer, NULL, tempcolor, x, y); break; } - color[0] = tempcolor[3]; + output[0] = tempcolor[3]; } } -void ImageDepthOperation::executePixel(float *color, float x, float y, PixelSampler sampler) +void ImageDepthOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) { if (this->m_depthBuffer == NULL || x < 0 || y < 0 || x >= this->getWidth() || y >= this->getHeight() ) { - color[0] = 0.0f; + output[0] = 0.0f; } else { int offset = y * this->m_width + x; - color[0] = this->m_depthBuffer[offset]; + output[0] = this->m_depthBuffer[offset]; } } |