libretro / glsl-shaders

This repo is for glsl shaders converted by hand from libretro's common-shaders repo, since some don't play nicely with the cg2glsl script.
929 stars 223 forks source link

9-tap bicubic filter #145

Closed malvarenga123 closed 2 years ago

malvarenga123 commented 3 years ago

Hi, is there any chance the 9-tap bicubic filter could be implemented as an alternative to the regular one?

hizzlekizzle commented 3 years ago

It's possible, sure, but is there a real use-case for it where the extra 7 taps is just too slow?

EDIT: reading over the article, I realized we already have slang versions of both the b-spline and catmull-rom optimizations.

malvarenga123 commented 3 years ago

It's possible, sure, but is there a real use-case for it where the extra 7 taps is just too slow?

I'm guessing some tests were done here, which led to him using it.

Hyllian commented 2 years ago

I ported that to slang some time ago: https://github.com/Hyllian/slang-shaders/blob/master/cubic/shaders/catmull-rom.slang

Nowadays I prefer the new multipass implementation where I only fetch 8 times (horizontal and vertical passes) and its parameters can be tweaked to any B or C value.