mirror of https://github.com/GNOME/gimp.git
Reintroduce a cleaner version of the linear light fix
This commit is contained in:
parent
005b16ee06
commit
5c873bd93f
|
@ -1766,7 +1766,7 @@ blendfun_vivid_light (const float *dest,
|
|||
|
||||
|
||||
/* added according to:
|
||||
http://www.simplefilter.de/en/basics/mixmods.html */
|
||||
http://www.deepskycolors.com/archivo/2010/04/21/formulas-for-Photoshop-blending-modes.html */
|
||||
static inline void
|
||||
blendfun_linear_light (const float *dest,
|
||||
const float *src,
|
||||
|
@ -1782,7 +1782,14 @@ blendfun_linear_light (const float *dest,
|
|||
for (c = 0; c < 3; c++)
|
||||
{
|
||||
gfloat comp;
|
||||
comp = dest[c] + 2.0f * src[c] - 1.0f;
|
||||
if (src[c] <= 0.5f)
|
||||
{
|
||||
comp = dest[c] + 2.0 * src[c] - 1.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
comp = dest[c] + 2.0 * (src[c] - 0.5f);
|
||||
}
|
||||
out[c] = comp;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue