]> git.sesse.net Git - movit/commit
Add support for offsets in ResampleEffect.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 29 Mar 2014 23:33:52 +0000 (00:33 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 29 Mar 2014 23:33:52 +0000 (00:33 +0100)
commit8a7bc428c1af91981bf8dfd73495acb2ebfaab6b
treebb396c11b16c9a57b71f86e01ddfa6301879d518
parent7538612384304a9c209ac12fe07f2822427a5aeb
Add support for offsets in ResampleEffect.

This enables smooth (subpixel) panning that people frequently want for stills
and titles, but that you couldn't do in a subpixel fashion before (PaddingEffect
could only do integer pixel offsets).

The placement (ResampleEffect) might seem a bit off at first, but subpixel
offset needs resampling, and ResampleEffect already has all the logic in place
for that. We could have used the GPU's built-in bilinear resampling, of course,
but it doesn't look all that good for high-contrast situations (although working
in linear light should help some).
resample_effect.cpp
resample_effect.frag
resample_effect.h
resample_effect_test.cpp