[Bf-blender-cvs] [ae08622] master: Fix compositor using edge repeat policy when it shouldn't
Sergey Sharybin
noreply at git.blender.org
Sun Feb 21 13:17:22 CET 2016
Commit: ae086225daea14890cad1273d6a68d1daf7399b3
Author: Sergey Sharybin
Date: Sun Feb 21 13:16:00 2016 +0100
Branches: master
https://developer.blender.org/rBae086225daea14890cad1273d6a68d1daf7399b3
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.
===================================================================
M source/blender/compositor/intern/COM_MemoryBuffer.h
===================================================================
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h b/source/blender/compositor/intern/COM_MemoryBuffer.h
index f9e2dd8..a8e3454 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);
More information about the Bf-blender-cvs
mailing list