diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-21 15:16:00 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-02-21 15:16:56 +0300 |
commit | ae086225daea14890cad1273d6a68d1daf7399b3 (patch) | |
tree | 74c53bc130a255f6d7b9f0a62db0d08081ff6357 | |
parent | f6c11062bc500df2b7d9ed9e83283ef5648716cb (diff) |
Fix compositor using edge repeat policy when it shouldn't
Was easy to notice when alpha-overing smaller image with blur on
the bigger frame.
-rw-r--r-- | source/blender/compositor/intern/COM_MemoryBuffer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h index f9e2dd87d05..a8e34543e08 100644 --- a/source/blender/compositor/intern/COM_MemoryBuffer.h +++ b/source/blender/compositor/intern/COM_MemoryBuffer.h @@ -259,6 +259,12 @@ public: float u = x; float v = y; this->wrap_pixel(u, v, extend_x, extend_y); + if ((extend_x != COM_MB_REPEAT && (u < 0.0f || u >= this->m_width)) || + (extend_y != COM_MB_REPEAT && (v < 0.0f || v >= this->m_height))) + { + zero_v4(result); + return; + } BLI_bilinear_interpolation_wrap_fl( this->m_buffer, result, this->m_width, this->m_height, this->m_num_channels, u, v, extend_x == COM_MB_REPEAT, extend_y == COM_MB_REPEAT); |