From aeda1a16f3e40b01da9afd573f1811a5212bdf34 Mon Sep 17 00:00:00 2001 From: Stefan Werner Date: Thu, 20 Apr 2017 22:41:26 +0200 Subject: D2607: Switch eye dropper to use linear color space internally This switches the internal color representation of the eye dropper from display space to linear. Any time a linear color is requested and the color is picked from a linear object, the result is now precise to the bit as the color gets patched through directly. Color space conversion now only happens when a color is picked from non-linear display space objects or when the color is requested to be returned in non-linear space. In addition, this patch changes the DifferenceMatte node to interpret a tolerance of 0.0 to accept colors that are identical bit by bit, as apposed to simply refusing all colors. --- source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/compositor') diff --git a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp index 325ef83a529..aa58c0571cf 100644 --- a/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp +++ b/source/blender/compositor/operations/COM_DifferenceMatteOperation.cpp @@ -65,11 +65,11 @@ void DifferenceMatteOperation::executePixelSampled(float output[4], float x, flo difference = difference / 3.0f; /* make 100% transparent */ - if (difference < tolerance) { + if (difference <= tolerance) { output[0] = 0.0f; } /*in the falloff region, make partially transparent */ - else if (difference < falloff + tolerance) { + else if (difference <= falloff + tolerance) { difference = difference - tolerance; alpha = difference / falloff; /*only change if more transparent than before */ -- cgit v1.2.3