[gimp] app: improve formulas of softlight and linear light blending modes



commit 774687dcfef0969f148176b0c6c46ffe5ca71151
Author: Øyvind Kolås <pippin gimp org>
Date:   Mon Jan 23 18:40:53 2017 +0100

    app: improve formulas of softlight and linear light blending modes

 app/operations/layer-modes/gimpblendcomposite.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/app/operations/layer-modes/gimpblendcomposite.h b/app/operations/layer-modes/gimpblendcomposite.h
index 666d7bb..6ee6292 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;
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]