diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-23 22:27:06 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-23 22:27:06 +0400 |
commit | 4c22d38f92d4b68b932cfa863e06f15773097518 (patch) | |
tree | 499922211f6014bc6b1601a1c6d03c39a8e92ac2 /source/blender/compositor/operations/COM_KeyingOperation.cpp | |
parent | 72309f65b812d4292281397218d1533b626bf8b5 (diff) |
Keying: apply garbage / core mattes after clamping
Applying this mattes before clamping produced ugly outline around
matte boundaries.
Diffstat (limited to 'source/blender/compositor/operations/COM_KeyingOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_KeyingOperation.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp index 5912c206a84..ed9e4f1df16 100644 --- a/source/blender/compositor/operations/COM_KeyingOperation.cpp +++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp @@ -57,45 +57,33 @@ KeyingOperation::KeyingOperation() : NodeOperation() { this->addInputSocket(COM_DT_COLOR); this->addInputSocket(COM_DT_COLOR); - this->addInputSocket(COM_DT_VALUE); - this->addInputSocket(COM_DT_VALUE); this->addOutputSocket(COM_DT_VALUE); this->m_screenBalance = 0.5f; this->m_pixelReader = NULL; this->m_screenReader = NULL; - this->m_garbageReader = NULL; - this->m_coreReader = NULL; } void KeyingOperation::initExecution() { this->m_pixelReader = this->getInputSocketReader(0); this->m_screenReader = this->getInputSocketReader(1); - this->m_garbageReader = this->getInputSocketReader(2); - this->m_coreReader = this->getInputSocketReader(3); } void KeyingOperation::deinitExecution() { this->m_pixelReader = NULL; this->m_screenReader = NULL; - this->m_garbageReader = NULL; - this->m_coreReader = NULL; } void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler sampler) { float pixelColor[4]; float screenColor[4]; - float garbageValue[4]; - float coreValue[4]; this->m_pixelReader->read(pixelColor, x, y, sampler); this->m_screenReader->read(screenColor, x, y, sampler); - this->m_garbageReader->read(garbageValue, x, y, sampler); - this->m_coreReader->read(coreValue, x, y, sampler); int primary_channel = get_pixel_primary_channel(screenColor); @@ -130,10 +118,4 @@ void KeyingOperation::executePixel(float *color, float x, float y, PixelSampler color[0] = distance; } } - - /* apply garbage matte */ - color[0] = MIN2(color[0], 1.0f - garbageValue[0]); - - /* apply core matte */ - color[0] = MAX2(color[0], coreValue[0]); } |