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_GlareGhostOperation.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_GlareGhostOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_GlareGhostOperation.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/compositor/operations/COM_GlareGhostOperation.cpp b/source/blender/compositor/operations/COM_GlareGhostOperation.cpp index c4f8b3a0ddb..8854be52ded 100644 --- a/source/blender/compositor/operations/COM_GlareGhostOperation.cpp +++ b/source/blender/compositor/operations/COM_GlareGhostOperation.cpp @@ -83,11 +83,11 @@ void GlareGhostOperation::generateGlare(float *data, MemoryBuffer *inputTile, No for (x = 0; x < gbuf->getWidth(); x++) { u = ((float)x + 0.5f) / (float)gbuf->getWidth(); s = (u - 0.5f) * sc + 0.5f, t = (v - 0.5f) * sc + 0.5f; - tbuf1->readCubic(c, s * gbuf->getWidth(), t * gbuf->getHeight()); + tbuf1->readBilinear(c, s * gbuf->getWidth(), t * gbuf->getHeight()); sm = smoothMask(s, t); mul_v3_fl(c, sm); s = (u - 0.5f) * isc + 0.5f, t = (v - 0.5f) * isc + 0.5f; - tbuf2->readCubic(tc, s * gbuf->getWidth() - 0.5f, t * gbuf->getHeight() - 0.5f); + tbuf2->readBilinear(tc, s * gbuf->getWidth() - 0.5f, t * gbuf->getHeight() - 0.5f); sm = smoothMask(s, t); madd_v3_v3fl(c, tc, sm); @@ -108,7 +108,7 @@ void GlareGhostOperation::generateGlare(float *data, MemoryBuffer *inputTile, No np = (n << 2) + p; s = (u - 0.5f) * scalef[np] + 0.5f; t = (v - 0.5f) * scalef[np] + 0.5f; - gbuf->readCubic(c, s * gbuf->getWidth() - 0.5f, t * gbuf->getHeight() - 0.5f); + gbuf->readBilinear(c, s * gbuf->getWidth() - 0.5f, t * gbuf->getHeight() - 0.5f); mul_v3_v3(c, cm[np]); sm = smoothMask(s, t) * 0.25f; madd_v3_v3fl(tc, c, sm); |