From 774687dcfef0969f148176b0c6c46ffe5ca71151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Mon, 23 Jan 2017 18:40:53 +0100 Subject: [PATCH] app: improve formulas of softlight and linear light blending modes --- app/operations/layer-modes/gimpblendcomposite.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/operations/layer-modes/gimpblendcomposite.h b/app/operations/layer-modes/gimpblendcomposite.h index 666d7bb681..6ee6292ffd 100644 --- a/app/operations/layer-modes/gimpblendcomposite.h +++ b/app/operations/layer-modes/gimpblendcomposite.h @@ -802,7 +802,7 @@ blendfun_softlight (const float *dest, { gfloat multiply = dest[c] * src[c]; gfloat screen = 1.0f - (1.0f - dest[c]) * (1.0f - src[c]); - gfloat comp = (1.0f - src[c]) * multiply + dest[c] * screen; + gfloat comp = (1.0f - dest[c]) * multiply + dest[c] * screen; out[c] = comp; } @@ -1192,7 +1192,7 @@ blendfun_linear_light (const float *dest, } else { - comp = dest[c] + 2 * (src[c] - 1.0); + comp = dest[c] + 2.0 * src[c] - 1.0; } out[c] = comp; }