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_TextureOperation.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_TextureOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_TextureOperation.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cpp b/source/blender/compositor/operations/COM_TextureOperation.cpp index bbb7c8b5289..96aea56050f 100644 --- a/source/blender/compositor/operations/COM_TextureOperation.cpp +++ b/source/blender/compositor/operations/COM_TextureOperation.cpp @@ -75,16 +75,16 @@ void TextureBaseOperation::determineResolution(unsigned int resolution[2], unsig } } -void TextureAlphaOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void TextureAlphaOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { - TextureBaseOperation::executePixel(output, x, y, sampler); + TextureBaseOperation::executePixelSampled(output, x, y, sampler); output[0] = output[3]; output[1] = 0.0f; output[2] = 0.0f; output[3] = 0.0f; } -void TextureBaseOperation::executePixel(float output[4], float x, float y, PixelSampler sampler) +void TextureBaseOperation::executePixelSampled(float output[4], float x, float y, PixelSampler sampler) { TexResult texres = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0, NULL}; float textureSize[4]; @@ -96,8 +96,8 @@ void TextureBaseOperation::executePixel(float output[4], float x, float y, Pixel const float u = (x - cx) / this->getWidth() * 2; const float v = (y - cy) / this->getHeight() * 2; - this->m_inputSize->read(textureSize, x, y, sampler); - this->m_inputOffset->read(textureOffset, x, y, sampler); + this->m_inputSize->readSampled(textureSize, x, y, sampler); + this->m_inputOffset->readSampled(textureOffset, x, y, sampler); vec[0] = textureSize[0] * (u + textureOffset[0]); vec[1] = textureSize[1] * (v + textureOffset[1]); @@ -136,7 +136,7 @@ MemoryBuffer *TextureBaseOperation::createMemoryBuffer(rcti *rect2) for (int y = 0; y < height; y++) { for (int x = 0; x < width; x++, data += 4) { - this->executePixel(data, x, y, COM_PS_NEAREST); + this->executePixelSampled(data, x, y, COM_PS_NEAREST); } } |