diff options
-rw-r--r-- | source/blender/compositor/operations/COM_MapUVOperation.cpp | 5 | ||||
-rw-r--r-- | source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp index 1fa484ea2b6..1cea8e84219 100644 --- a/source/blender/compositor/operations/COM_MapUVOperation.cpp +++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp @@ -71,6 +71,7 @@ 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); @@ -91,6 +92,7 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample 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; @@ -98,10 +100,11 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample 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(); diff --git a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp index 9bbf45682f2..8e30a99b2a0 100644 --- a/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp +++ b/source/blender/compositor/operations/COM_PlaneTrackWarpImageOperation.cpp @@ -93,6 +93,7 @@ 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); @@ -117,6 +118,10 @@ BLI_INLINE void resolveUVAndDxDy(const float x, const float y, const float corne /* 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]; @@ -163,7 +168,7 @@ void PlaneTrackWarpImageOperation::executePixel(float output[4], float x, float u *= this->m_pixelReader->getWidth(); v *= this->m_pixelReader->getHeight(); - this->m_pixelReader->read(current_color, u, v, dx, dy, COM_PS_BICUBIC); + this->m_pixelReader->read(current_color, u, v, dx, dy, COM_PS_NEAREST); premul_to_straight_v4(current_color); add_v4_v4(color_accum, current_color); } |