diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-10 13:12:33 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-07-10 13:12:33 +0400 |
commit | 717ac64cb14b09660419cc4fa8b48e47ccacd854 (patch) | |
tree | 26393b4ccff0b4e9dbd580aec78a270649992da6 /source/blender/compositor/operations/COM_MixBaseOperation.cpp | |
parent | 63ad458dbafe9cecc8568fd4779b7568d06b81b2 (diff) |
Tomato: added option to clamp result of Mix RGB and Color Math nodes
Diffstat (limited to 'source/blender/compositor/operations/COM_MixBaseOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_MixBaseOperation.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_MixBaseOperation.cpp b/source/blender/compositor/operations/COM_MixBaseOperation.cpp index fbe92f54aa8..9e0ae0c6ee8 100644 --- a/source/blender/compositor/operations/COM_MixBaseOperation.cpp +++ b/source/blender/compositor/operations/COM_MixBaseOperation.cpp @@ -94,3 +94,12 @@ void MixBaseOperation::determineResolution(unsigned int resolution[], unsigned i NodeOperation::determineResolution(resolution, preferredResolution); } +void MixBaseOperation::clampIfNeeded(float *color) +{ + if (this->m_useClamp) { + CLAMP(color[0], 0.0f, 1.0f); + CLAMP(color[1], 0.0f, 1.0f); + CLAMP(color[2], 0.0f, 1.0f); + CLAMP(color[3], 0.0f, 1.0f); + } +} |