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_MapUVOperation.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_MapUVOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_MapUVOperation.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/compositor/operations/COM_MapUVOperation.cpp b/source/blender/compositor/operations/COM_MapUVOperation.cpp index a9b6ad3edc1..289b447dec7 100644 --- a/source/blender/compositor/operations/COM_MapUVOperation.cpp +++ b/source/blender/compositor/operations/COM_MapUVOperation.cpp @@ -40,7 +40,7 @@ void MapUVOperation::initExecution() this->m_inputUVProgram = this->getInputSocketReader(1); } -void MapUVOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void MapUVOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { float inputUV[4]; float uv_a[4], uv_b[4]; @@ -50,22 +50,22 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample float uv_l, uv_r; float uv_u, uv_d; - this->m_inputUVProgram->read(inputUV, x, y, sampler); + this->m_inputUVProgram->readSampled(inputUV, x, y, sampler); if (inputUV[2] == 0.f) { zero_v4(output); return; } /* adaptive sampling, red (U) channel */ - this->m_inputUVProgram->read(uv_a, x - 1, y, COM_PS_NEAREST); - this->m_inputUVProgram->read(uv_b, x + 1, y, COM_PS_NEAREST); + this->m_inputUVProgram->readSampled(uv_a, x - 1, y, COM_PS_NEAREST); + this->m_inputUVProgram->readSampled(uv_b, x + 1, y, COM_PS_NEAREST); uv_l = uv_a[2] != 0.f ? fabsf(inputUV[0] - uv_a[0]) : 0.f; uv_r = uv_b[2] != 0.f ? fabsf(inputUV[0] - uv_b[0]) : 0.f; dx = 0.5f * (uv_l + uv_r); /* adaptive sampling, green (V) channel */ - this->m_inputUVProgram->read(uv_a, x, y - 1, COM_PS_NEAREST); - this->m_inputUVProgram->read(uv_b, x, y + 1, COM_PS_NEAREST); + this->m_inputUVProgram->readSampled(uv_a, x, y - 1, COM_PS_NEAREST); + this->m_inputUVProgram->readSampled(uv_b, x, y + 1, COM_PS_NEAREST); uv_u = uv_a[2] != 0.f ? fabsf(inputUV[1] - uv_a[1]) : 0.f; uv_d = uv_b[2] != 0.f ? fabsf(inputUV[1] - uv_b[1]) : 0.f; @@ -81,7 +81,7 @@ void MapUVOperation::executePixel(float output[4], float x, float y, PixelSample u = inputUV[0] * this->m_inputColorProgram->getWidth(); v = inputUV[1] * this->m_inputColorProgram->getHeight(); - this->m_inputColorProgram->read(output, u, v, dx, dy, COM_PS_NEAREST); + this->m_inputColorProgram->readFiltered(output, u, v, dx, dy, COM_PS_NEAREST); /* "premul" */ if (alpha < 1.0f) { |