[Bf-blender-cvs] [8fd6879] master: Fix T39700: Plane deform still works forever
Sergey Sharybin
noreply at git.blender.org
Mon Apr 14 19:59:32 CEST 2014
Commit: 8fd6879b88273ded24ab647ee76a116efb4a18c2
Author: Sergey Sharybin
Date: Mon Apr 14 23:58:02 2014 +0600
https://developer.blender.org/rB8fd6879b88273ded24ab647ee76a116efb4a18c2
Fix T39700: Plane deform still works forever
Clamped the EWA sampling region to buffer size now. Solves the issue,
but needs more tests to be sure weights are correct.
===================================================================
M source/blender/compositor/intern/COM_MemoryBuffer.cpp
===================================================================
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
index 7499173..aa2a547 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp
@@ -295,7 +295,12 @@ void MemoryBuffer::readEWA(float result[4], const float uv[2], const float deriv
zero_v4(result);
return;
}
- /* TODO(sergey): Consider clamping u1/v1/u2/v2 to the m_rect. */
+
+ /* Clamp sampling rectagle to the buffer dimensions. */
+ u1 = max_ii(u1, m_rect.xmin);
+ u2 = min_ii(u2, m_rect.xmax);
+ v1 = max_ii(v1, m_rect.ymin);
+ v2 = min_ii(v2, m_rect.ymax);
float DDQ = 2.0f * A;
float U = u1 - U0;
More information about the Bf-blender-cvs
mailing list