diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-19 12:30:03 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-19 12:30:03 +0400 |
commit | a14febc70a0f8cb1ec8082600104a6629b0a20ee (patch) | |
tree | d94b228031835ad2cde2333bc4e5618afb7bc93a | |
parent | 1dc19975c076dccba6054a3961f92c8baf9f1e65 (diff) |
Fix issue with EWA filtering in compositor which disabled alpha
It was caused by wrong copy-paste thing, which replaced check
"whether alpha channel is enabled" with "whether alpha channel
is not zero" (which is always zero in accumulator).
Compositor always works with RGBA, so no need to do any special
checks here.
TODO: Maybe MapUV ode shall ignore alpha channel?
-rw-r--r-- | source/blender/compositor/intern/COM_MemoryBuffer.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.cpp b/source/blender/compositor/intern/COM_MemoryBuffer.cpp index 357a4c1d4c0..4bebf004a89 100644 --- a/source/blender/compositor/intern/COM_MemoryBuffer.cpp +++ b/source/blender/compositor/intern/COM_MemoryBuffer.cpp @@ -335,8 +335,7 @@ void MemoryBuffer::readEWA(float result[4], float fx, float fy, float dx, float float tc[4]; const float wt = EWA_WTS[(Q < 0.f) ? 0 : (unsigned int)Q]; read(tc, clipuv(u, width), clipuv(v, height)); - madd_v3_v3fl(result, tc, wt); - result[3] += result[3] ? tc[3] * wt : 0.f; + madd_v4_v4fl(result, tc, wt); d += wt; } Q += DQ; @@ -346,9 +345,5 @@ void MemoryBuffer::readEWA(float result[4], float fx, float fy, float dx, float // d should hopefully never be zero anymore d = 1.f / d; - result[0] *= d; - result[1] *= d; - result[2] *= d; - // clipping can be ignored if alpha used, texr->ta already includes filtered edge - result[3] = result[3] ? result[3] * d : 1.f; + mul_v4_fl(result, d); } |