Remove ifdef-ed code, it's still in SVn anyway.

This commit is contained in:
Sergey Sharybin 2013-08-16 13:58:39 +00:00
parent a59777c33f
commit 36c530dec9
2 changed files with 0 additions and 56 deletions

@ -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();

@ -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];