]> git.sesse.net Git - movit/commit
Clamp alpha in MixEffect.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 19 Jan 2013 19:13:51 +0000 (20:13 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 19 Jan 2013 19:13:51 +0000 (20:13 +0100)
commit6a8b7d750dff76dee320ad973a52d4d9720510b9
tree4fa7862a2047d66c18028ae17b1dffa0119d911b
parent745efab6c4ac0886c03a0387f669226d078b5386
Clamp alpha in MixEffect.

This struck me suddenly one evening as a fix for the issues with alpha in glow,
and seems to work incredibly well for unsharp mask, too. The rationale is
outlined in the comment in the frag.

I'll probably be adding some tests for GlowEffect to make sure that it keeps
working fine, but visual tests so far look very good. The only issue is that
with destination alpha always being in linear light (as it should be),
programs that don't blend in linear light, like GIMP and ImageMagick,
get somewhat dull-looking results with e.g. glow.
mix_effect.frag
mix_effect_test.cpp