diff options
Diffstat (limited to 'source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp index 716646e9c36..d21fc62abd7 100644 --- a/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp +++ b/source/blender/compositor/operations/COM_DisplaceSimpleOperation.cpp @@ -31,21 +31,21 @@ DisplaceSimpleOperation::DisplaceSimpleOperation() : NodeOperation() this->addInputSocket(COM_DT_VALUE); this->addOutputSocket(COM_DT_COLOR); - this->inputColorProgram = NULL; - this->inputVectorProgram = NULL; - this->inputScaleXProgram = NULL; - this->inputScaleYProgram = NULL; + this->m_inputColorProgram = NULL; + this->m_inputVectorProgram = NULL; + this->m_inputScaleXProgram = NULL; + this->m_inputScaleYProgram = NULL; } void DisplaceSimpleOperation::initExecution() { - this->inputColorProgram = this->getInputSocketReader(0); - this->inputVectorProgram = this->getInputSocketReader(1); - this->inputScaleXProgram = this->getInputSocketReader(2); - this->inputScaleYProgram = this->getInputSocketReader(3); + this->m_inputColorProgram = this->getInputSocketReader(0); + this->m_inputVectorProgram = this->getInputSocketReader(1); + this->m_inputScaleXProgram = this->getInputSocketReader(2); + this->m_inputScaleYProgram = this->getInputSocketReader(3); - width_x4 = this->getWidth() * 4; - height_x4 = this->getHeight() * 4; + this->m_width_x4 = this->getWidth() * 4; + this->m_height_x4 = this->getHeight() * 4; } @@ -61,17 +61,17 @@ void DisplaceSimpleOperation::executePixel(float *color, float x, float y, Pixel float p_dx, p_dy; /* main displacement in pixel space */ float u, v; - this->inputScaleXProgram->read(inScale, x, y, sampler, inputBuffers); + this->m_inputScaleXProgram->read(inScale, x, y, sampler, inputBuffers); float xs = inScale[0]; - this->inputScaleYProgram->read(inScale, x, y, sampler, inputBuffers); + this->m_inputScaleYProgram->read(inScale, x, y, sampler, inputBuffers); float ys = inScale[0]; /* clamp x and y displacement to triple image resolution - * to prevent hangs from huge values mistakenly plugged in eg. z buffers */ - CLAMP(xs, -width_x4, width_x4); - CLAMP(ys, -height_x4, height_x4); + CLAMP(xs, -this->m_width_x4, this->m_width_x4); + CLAMP(ys, -this->m_height_x4, this->m_height_x4); - this->inputVectorProgram->read(inVector, x, y, sampler, inputBuffers); + this->m_inputVectorProgram->read(inVector, x, y, sampler, inputBuffers); p_dx = inVector[0] * xs; p_dy = inVector[1] * ys; @@ -82,15 +82,15 @@ void DisplaceSimpleOperation::executePixel(float *color, float x, float y, Pixel CLAMP(u, 0.f, this->getWidth() - 1.f); CLAMP(v, 0.f, this->getHeight() - 1.f); - this->inputColorProgram->read(color, u, v, sampler, inputBuffers); + this->m_inputColorProgram->read(color, u, v, sampler, inputBuffers); } void DisplaceSimpleOperation::deinitExecution() { - this->inputColorProgram = NULL; - this->inputVectorProgram = NULL; - this->inputScaleXProgram = NULL; - this->inputScaleYProgram = NULL; + this->m_inputColorProgram = NULL; + this->m_inputVectorProgram = NULL; + this->m_inputScaleXProgram = NULL; + this->m_inputScaleYProgram = NULL; } bool DisplaceSimpleOperation::determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output) |