From 4a1ce71fd9b13255064dcdbea8a59ae98303bf22 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Thu, 5 Sep 2013 10:45:19 +0000 Subject: Extend mode option for MemoryBuffer reading in compositor. This will allow proper interpolation of pixel values when using wrapping in the Translate node. Implemented in inline functions, so won't cause overhead if constant values are passed (as happens with most calls using the default argument). --- .../compositor/operations/COM_ProjectorLensDistortionOperation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp') diff --git a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp index 5cc02a1ed65..e8b900b9a85 100644 --- a/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp @@ -55,11 +55,11 @@ void ProjectorLensDistortionOperation::executePixel(float output[4], int x, int const float v = (y + 0.5f) / height; const float u = (x + 0.5f) / width; MemoryBuffer *inputBuffer = (MemoryBuffer *)data; - inputBuffer->readCubic(inputValue, (u * width + this->m_kr2) - 0.5f, v * height - 0.5f); + inputBuffer->readBilinear(inputValue, (u * width + this->m_kr2) - 0.5f, v * height - 0.5f); output[0] = inputValue[0]; inputBuffer->read(inputValue, x, y); output[1] = inputValue[1]; - inputBuffer->readCubic(inputValue, (u * width - this->m_kr2) - 0.5f, v * height - 0.5f); + inputBuffer->readBilinear(inputValue, (u * width - this->m_kr2) - 0.5f, v * height - 0.5f); output[2] = inputValue[2]; output[3] = 1.0f; } -- cgit v1.2.3