GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

app: improve vivid-light formula

parent 2762662c
......@@ -1150,12 +1150,13 @@ blendfun_vivid_light (const float *dest,
if (src[c] > 0.5f)
{
comp = (1.0f - (1.0f - dest[c]) / (2.0f * (src[c] - 0.5f)));
comp = (1.0f - (1.0f - dest[c]) / (2.0f * (src[c])));
}
else
{
comp = dest[c] / (1.0f - 2.0f * src[c]);
comp = dest[c] / (1.0f - 2.0f * (src[c] - 0.5));
}
comp = MIN (comp, 1.0f);
out[c] = comp;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment