Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-11-21 19:31:45 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-11-21 19:31:45 +0300
commit6785a2bd66f7f1c55098e4c71baa68ce3cc2bbf9 (patch)
treeb34aec1912f9c3a1153cf92e0f78321778d5dab3
parent58a15b2bfe7193b90c333f069f1fb0c3a811e4fe (diff)
Fix T53371: Keying Node fails with values above 1
This was expected behavior for over-exposured lamps when the mode was originally created for Tears of Steel. Turns out, there could be really bad green screen in real production which will only have green (or rather screen) channel over exposured. Tweaked condition now so we use least bright channel to see if the area has proper exposure or not. Seems to work fine in tests, but further tweaks are possible.
-rw-r--r--source/blender/compositor/operations/COM_KeyingOperation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_KeyingOperation.cpp b/source/blender/compositor/operations/COM_KeyingOperation.cpp
index e2566d2f4f0..873a537efe3 100644
--- a/source/blender/compositor/operations/COM_KeyingOperation.cpp
+++ b/source/blender/compositor/operations/COM_KeyingOperation.cpp
@@ -74,8 +74,9 @@ void KeyingOperation::executePixelSampled(float output[4], float x, float y, Pix
this->m_screenReader->readSampled(screenColor, x, y, sampler);
const int primary_channel = max_axis_v3(screenColor);
+ const float min_pixel_color = min_fff(pixelColor[0], pixelColor[1], pixelColor[2]);
- if (pixelColor[primary_channel] > 1.0f) {
+ if (min_pixel_color > 1.0f) {
/* overexposure doesn't happen on screen itself and usually happens
* on light sources in the shot, this need to be checked separately
* because saturation and falloff calculation is based on the fact