Corrected the spin behavior of the Redeemer Missile's outer reticle.

Added optional fancy screen shader to Redeemer.
This commit is contained in:
Marisa the Magician 2018-08-14 21:39:13 +02:00
commit 80ed7e0939
6 changed files with 65 additions and 15 deletions

View file

@ -0,0 +1,24 @@
void main()
{
vec4 tinted = texture(InputTexture,TexCoord);
vec2 nc;
vec2 px = 1.0/textureSize(InputTexture,0);
float cnt = 1.0;
for ( int j=-5; j<=5; j++ ) for ( int i=-5; i<=5; i++ )
{
nc = TexCoord+px*vec2(i,j);
tinted += texture(InputTexture,nc);
cnt += 1.0;
}
tinted /= cnt;
vec2 coord = TexCoord;
coord *= 4.0;
coord.y *= px.x/px.y;
vec2 tc;
tc.x = coord.x*cos(Timer)-coord.y*sin(Timer);
tc.y = coord.x*sin(Timer)+coord.y*cos(Timer);
tinted = mix(tinted,texture(StaticTexture,tc),0.3);
tinted = pow(tinted,vec4(0.7,1.1,1.3,1.0));
tinted *= vec4(1.2,0.6,0.5,1.0);
FragColor = tinted;
}