app: improve formulas of softlight and linear light blending modes
This commit is contained in:
parent
4a3fbb8f35
commit
774687dcfe
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue