[Bf-blender-cvs] [6b256a7] master: Fix subpixel precision in transform node

Sergey Sharybin noreply at git.blender.org
Thu Jun 5 18:09:37 CEST 2014


Commit: 6b256a7cd82655ac96034fee7d05a202c8b131cb
Author: Sergey Sharybin
Date:   Thu Jun 5 22:05:05 2014 +0600
https://developer.blender.org/rB6b256a7cd82655ac96034fee7d05a202c8b131cb

Fix subpixel precision in transform node

The node was using sampler from the callee node and passed
it to the input nodes. Since the fact that compositor output
node uses NEAREST interpolation (why it uses nearest is the
whole separate story) it's not possible to have subpixel
precision in such cases:

  <image> -> <translate> -> <output>

For now solving by hard-coding translate node to use BILINEAR
interpolation. It can't become worse in this node anyway and
the sampling pipeline is to be re-visited from scratch.

===================================================================

M	source/blender/compositor/operations/COM_TranslateOperation.cpp

===================================================================

diff --git a/source/blender/compositor/operations/COM_TranslateOperation.cpp b/source/blender/compositor/operations/COM_TranslateOperation.cpp
index 64da954..191388a 100644
--- a/source/blender/compositor/operations/COM_TranslateOperation.cpp
+++ b/source/blender/compositor/operations/COM_TranslateOperation.cpp
@@ -59,7 +59,7 @@ void TranslateOperation::executePixelSampled(float output[4], float x, float y,
 	float originalXPos = x - this->getDeltaX();
 	float originalYPos = y - this->getDeltaY();
 
-	this->m_inputOperation->readSampled(output, originalXPos, originalYPos, sampler);
+	this->m_inputOperation->readSampled(output, originalXPos, originalYPos, COM_PS_BILINEAR);
 }
 
 bool TranslateOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output)




More information about the Bf-blender-cvs mailing list