Implement a "weapon bar" (optional).

This commit is contained in:
Mari the Deer 2023-07-04 17:05:21 +02:00
commit 47b0cad882
41 changed files with 443 additions and 5 deletions

27
shaders/pp/BokehSel.fp Normal file
View file

@ -0,0 +1,27 @@
// blur fade from Spooktober
#define PI 3.14159265
void main()
{
vec2 coord = TexCoord;
vec2 tsiz = vec2(textureSize(InputTexture,0));
vec2 bof = vec2((tsiz.y/tsiz.x),1.)/256.;
vec4 res = texture(InputTexture,coord);
int rsamples, tstep = 1;
float bstep;
vec2 rcoord;
for ( int i=1; i<=3; i++ )
{
rsamples = i*3;
for ( int j=0; j<rsamples; j++ )
{
bstep = PI*2.0/rsamples;
rcoord = vec2(cos(j*bstep),sin(j*bstep))*i;
tstep++;
res += texture(InputTexture,coord+rcoord*bof*strength);
}
}
res /= tstep;
FragColor = res;
}