diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2013-11-19 14:06:16 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2013-11-19 14:06:16 +0400 |
commit | c566e408e42836c136d8818cbea93ce870be09ea (patch) | |
tree | c0b4a027241247558fd5b87786f8e362cb98ef8d /source/blender/compositor/operations/COM_DisplaceOperation.cpp | |
parent | 3c662efee33be215092255dd23e4f4f0dc71b502 (diff) |
Cleanup: Renamed compositor executePixel functions and their 'read' wrappers in SocketReader.
Distinguish the 3 different methods for acquiring pixel color values (executePixel, executePixelSampled, executePixelFiltered).
This makes it easier to keep track of the different sampling methods (and works nicer with IDEs that do code parsing).
Differential Revision: http://developer.blender.org/D7
Diffstat (limited to 'source/blender/compositor/operations/COM_DisplaceOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_DisplaceOperation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_DisplaceOperation.cpp b/source/blender/compositor/operations/COM_DisplaceOperation.cpp index 1723da11f21..17692bd18ef 100644 --- a/source/blender/compositor/operations/COM_DisplaceOperation.cpp +++ b/source/blender/compositor/operations/COM_DisplaceOperation.cpp @@ -64,9 +64,9 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data) float dxt, dyt; float u, v; - this->m_inputScaleXProgram->read(inScale, x, y, COM_PS_NEAREST); + this->m_inputScaleXProgram->readSampled(inScale, x, y, COM_PS_NEAREST); float xs = inScale[0]; - this->m_inputScaleYProgram->read(inScale, x, y, COM_PS_NEAREST); + this->m_inputScaleYProgram->readSampled(inScale, x, y, COM_PS_NEAREST); float ys = inScale[0]; /* clamp x and y displacement to triple image resolution - @@ -74,7 +74,7 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data) CLAMP(xs, -this->m_width_x4, this->m_width_x4); CLAMP(ys, -this->m_height_x4, this->m_height_x4); - this->m_inputVectorProgram->read(inVector, x, y, COM_PS_NEAREST); + this->m_inputVectorProgram->readSampled(inVector, x, y, COM_PS_NEAREST); p_dx = inVector[0] * xs; p_dy = inVector[1] * ys; @@ -83,9 +83,9 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data) v = y - p_dy + 0.5f; /* calc derivatives */ - this->m_inputVectorProgram->read(inVector, x + 1, y, COM_PS_NEAREST); + this->m_inputVectorProgram->readSampled(inVector, x + 1, y, COM_PS_NEAREST); d_dx = inVector[0] * xs; - this->m_inputVectorProgram->read(inVector, x, y + 1, COM_PS_NEAREST); + this->m_inputVectorProgram->readSampled(inVector, x, y + 1, COM_PS_NEAREST); d_dy = inVector[1] * ys; /* clamp derivatives to minimum displacement distance in UV space */ @@ -96,7 +96,7 @@ void DisplaceOperation::executePixel(float output[4], int x, int y, void *data) dyt = signf(dyt) * max_ff(fabsf(dyt), DISPLACE_EPSILON) / this->getHeight(); /* EWA filtering (without nearest it gets blurry with NO distortion) */ - this->m_inputColorProgram->read(output, u, v, dxt, dyt, COM_PS_NEAREST); + this->m_inputColorProgram->readFiltered(output, u, v, dxt, dyt, COM_PS_NEAREST); } void DisplaceOperation::deinitExecution() |