swwmgz_m/shaders/pp/ZoomBlur.fp
Marisa Kirisame 3500f72db0 Add "exclusive use to pickup" option.
Make "pickup through melee" optional (disabled by default).
Increased leniency of use to pickup (nice for items with small hitboxes).
2021-05-29 23:26:12 +02:00

20 lines
389 B
GLSL

// zoom blur effect adapted from abort_m berserk pulse
void main()
{
vec2 p = CenterSpot-TexCoord;
vec4 res = vec4(0.);
vec2 d = (p/150.)*Str;
float w = 1.;
vec2 s = TexCoord;
float sum = 0.;
for ( int i=0; i<32; i++ )
{
res += w*texture(InputTexture,s);
sum += w;
w *= .8;
s += d;
}
res /= sum;
FragColor = mix(texture(InputTexture,TexCoord),vec4(res.rgb,1.),Fade);
}