diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-09-05 14:45:19 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-09-05 14:45:19 +0400 |
commit | 4a1ce71fd9b13255064dcdbea8a59ae98303bf22 (patch) | |
tree | 4748f2418a3a4a6d0f86b53f2475f2b74449c87c /source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp | |
parent | 96c668b1dd8c5b30796e10f068b8f7d082aef10c (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_ScreenLensDistortionOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp index fb996f2abaf..d1060224444 100644 --- a/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp +++ b/source/blender/compositor/operations/COM_ScreenLensDistortionOperation.cpp @@ -103,7 +103,7 @@ void ScreenLensDistortionOperation::executePixel(float output[4], int x, int y, d = 1.0f / (1.0f + sqrtf(t)); const float nx = (u * d + 0.5f) * width - 0.5f; const float ny = (v * d + 0.5f) * height - 0.5f; - buffer->readCubic(color, nx, ny); + buffer->readBilinear(color, nx, ny); tc[0] += (1.0f - tz) * color[0], tc[1] += tz * color[1]; dr++, dg++; } @@ -121,7 +121,7 @@ void ScreenLensDistortionOperation::executePixel(float output[4], int x, int y, d = 1.0f / (1.0f + sqrtf(t)); const float nx = (u * d + 0.5f) * width - 0.5f; const float ny = (v * d + 0.5f) * height - 0.5f; - buffer->readCubic(color, nx, ny); + buffer->readBilinear(color, nx, ny); tc[1] += (1.0f - tz) * color[1], tc[2] += tz * color[2]; dg++, db++; } |