diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-01-20 12:46:21 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-01-20 13:02:35 +0300 |
commit | 02fad7dca4adc5e248440c98293cdf713f25d39d (patch) | |
tree | d7fa2006fe00f04453645612edb437369409a1a2 /source/blender/compositor/operations/COM_RenderLayersProg.cpp | |
parent | bffd824800d34166d617e4f6c22880d1583d880c (diff) |
Fix T42844: Compositor scale offset
Different interpolation methods in compositor could lead to 0.5 pixel offset in
final renders. This is because of some inconsistency in integer coordinates
which might mean pixel corner or pixel center.
Should be all fine now.
Diffstat (limited to 'source/blender/compositor/operations/COM_RenderLayersProg.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_RenderLayersProg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp index f1990453fc6..8e778e44a79 100644 --- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp +++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp @@ -104,11 +104,11 @@ void RenderLayersBaseProg::doInterpolation(float output[4], float x, float y, Pi } case COM_PS_BILINEAR: - BLI_bilinear_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y); + BLI_bilinear_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x - 0.5f, y - 0.5f); break; case COM_PS_BICUBIC: - BLI_bicubic_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x, y); + BLI_bicubic_interpolation_fl(this->m_inputBuffer, output, width, height, this->m_elementsize, x - 0.5f, y - 0.5f); break; } } |