Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-09-05 14:45:19 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-09-05 14:45:19 +0400
commit4a1ce71fd9b13255064dcdbea8a59ae98303bf22 (patch)
tree4748f2418a3a4a6d0f86b53f2475f2b74449c87c /source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp
parent96c668b1dd8c5b30796e10f068b8f7d082aef10c (diff)
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).
Diffstat (limited to 'source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_ProjectorLensDistortionOperation.cpp4
1 files changed, 2 insertions, 2 deletions
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;
}