Fixes for movie distortion node

- Somehow this node was using nearest interpolation which seems have been
  passed from compositor node. It was using b-spline interpolation with
  old compositor implementation. Now forced this node to use bilinear
  interpolation, which should be close enough.

- Operation should be marked as complex it seems, otherwise area of
  interest wouldn't make any affect on it's behavior.
This commit is contained in:
Sergey Sharybin 2012-11-10 04:59:32 +00:00
parent f6a110d6ea
commit 819ca0accc

@ -49,7 +49,9 @@ MovieDistortionOperation::MovieDistortionOperation(bool distortion) : NodeOperat
this->m_movieClip = NULL; this->m_movieClip = NULL;
this->m_cache = NULL; this->m_cache = NULL;
this->m_distortion = distortion; this->m_distortion = distortion;
setComplex(true);
} }
void MovieDistortionOperation::initExecution() void MovieDistortionOperation::initExecution()
{ {
this->m_inputOperation = this->getInputSocketReader(0); this->m_inputOperation = this->getInputSocketReader(0);
@ -105,10 +107,10 @@ void MovieDistortionOperation::executePixel(float output[4], float x, float y, P
if (this->m_cache != NULL) { if (this->m_cache != NULL) {
float u, v; float u, v;
this->m_cache->getUV(&this->m_movieClip->tracking, x, y, &u, &v); this->m_cache->getUV(&this->m_movieClip->tracking, x, y, &u, &v);
this->m_inputOperation->read(output, u, v, sampler); this->m_inputOperation->read(output, u, v, COM_PS_BILINEAR);
} }
else { else {
this->m_inputOperation->read(output, x, y, sampler); this->m_inputOperation->read(output, x, y, COM_PS_BILINEAR);
} }
} }