diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-16 17:58:39 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-08-16 17:58:39 +0400 |
commit | 36c530dec917d548de24d5c31ed77a2ab565ed05 (patch) | |
tree | 9c53cb01702c328d7fd7aca49bf7bb75aec81822 /source/blender/compositor | |
parent | a59777c33fe2356bec9223b9f736dcc98bfa874d (diff) |
Remove ifdef-ed code, it's still in SVn anyway.
Diffstat (limited to 'source/blender/compositor')
-rw-r--r-- | source/blender/compositor/operations/COM_MapUVOperation.cpp | 29 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp | 27 |
2 files changed, 0 insertions, 56 deletions
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp index 1cea8e84219..a9b6ad3edc1 100644 --- a/source/blender/compositor/operations/COM_MapUVOperation.cpp +++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp @@ -71,41 +71,12 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample dy = 0.5f * (uv_u + uv_d); -#if 0 - /* more adaptive sampling, red and green (UV) channels */ - this->m_inputUVProgram->read(uv_a, x - 1, y - 1, COM_PS_NEAREST); - this->m_inputUVProgram->read(uv_b, x - 1, y + 1, COM_PS_NEAREST); - uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f; - uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f; - uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f; - uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f; - - dx += 0.25f * (uv_l + uv_r); - dy += 0.25f * (uv_u + uv_d); - - this->m_inputUVProgram->read(uv_a, x + 1, y - 1, COM_PS_NEAREST); - this->m_inputUVProgram->read(uv_b, x + 1, y + 1, COM_PS_NEAREST); - uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f; - uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f; - uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f; - uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f; - - dx += 0.25f * (uv_l + uv_r); - dy += 0.25f * (uv_u + uv_d); -#endif - /* UV to alpha threshold */ const float threshold = this->m_alpha * 0.05f; float alpha = 1.0f - threshold * (dx + dy); if (alpha < 0.f) alpha = 0.f; else alpha *= inputUV[2]; -#if 0 - /* should use mipmap */ - dx = min(dx, 0.2f); - dy = min(dy, 0.2f); -#endif - /* EWA filtering */ u = inputUV[0] * this->m_inputColorProgram->getWidth(); v = inputUV[1] * this->m_inputColorProgram->getHeight(); diff --git a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp index 8e30a99b2a0..c90e915fcd5 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp @@ -93,35 +93,8 @@ BLI_INLINE void resolveUVAndDxDy(const float x, const float y, const float corne dy = 0.5f * (uv_u + uv_d); -#if 0 - /* more adaptive sampling, red and green (UV) channels */ - ok1 = resolveUV(x - 1, y - 1, corners, uv_a); - ok2 = resolveUV(x - 1, y + 1, corners, uv_b); - uv_l = ok1 ? fabsf(inputUV[0] - uv_a[0]) : 0.f; - uv_r = ok2 ? fabsf(inputUV[0] - uv_b[0]) : 0.f; - uv_u = ok1 ? fabsf(inputUV[1] - uv_a[1]) : 0.f; - uv_d = ok2 ? fabsf(inputUV[1] - uv_b[1]) : 0.f; - - dx += 0.25f * (uv_l + uv_r); - dy += 0.25f * (uv_u + uv_d); - - ok1 = resolveUV(x + 1, y - 1, corners, uv_a); - ok2 = resolveUV(x + 1, y + 1, corners, uv_b); - uv_l = ok1 ? fabsf(inputUV[0] - uv_a[0]) : 0.f; - uv_r = ok2 ? fabsf(inputUV[0] - uv_b[0]) : 0.f; - uv_u = ok1 ? fabsf(inputUV[1] - uv_a[1]) : 0.f; - uv_d = ok2 ? fabsf(inputUV[1] - uv_b[1]) : 0.f; - - dx += 0.25f * (uv_l + uv_r); - dy += 0.25f * (uv_u + uv_d); - - /* should use mipmap */ - *dx_r = min(dx, 0.2f); - *dy_r = min(dy, 0.2f); -#else *dx_r = dx; *dy_r = dy; -#endif *u_r = inputUV[0]; *v_r = inputUV[1]; |