Oh boy, here comes another big one.

Notable changes since last commit are the full implementation of the automag and asmd.
Also the Translator is now fully functional.
Fonts have been restructured to a neater format.
There have also been other random changes I don't have the time to document in detail.
This commit is contained in:
Marisa the Magician 2019-08-31 03:14:20 +02:00
commit 01249eb43f
1892 changed files with 5151 additions and 416 deletions

51
shaders/glsl/AsmdBeam.fp Normal file
View file

@ -0,0 +1,51 @@
/* https://www.shadertoy.com/view/XsXSWS */
vec2 hash( vec2 p )
{
p = vec2( dot(p,vec2(127.1,311.7)),
dot(p,vec2(269.5,183.3)) );
return -1.0 + 2.0*fract(sin(p)*43758.5453123);
}
float noise( in vec2 p )
{
const float K1 = 0.366025404; // (sqrt(3)-1)/2;
const float K2 = 0.211324865; // (3-sqrt(3))/6;
vec2 i = floor( p + (p.x+p.y)*K1 );
vec2 a = p - i + (i.x+i.y)*K2;
vec2 o = (a.x>a.y) ? vec2(1.0,0.0) : vec2(0.0,1.0);
vec2 b = a - o + K2;
vec2 c = a - 1.0 + 2.0*K2;
vec3 h = max( 0.5-vec3(dot(a,a), dot(b,b), dot(c,c) ), 0.0 );
vec3 n = h*h*h*h*vec3( dot(a,hash(i+0.0)), dot(b,hash(i+o)), dot(c,hash(i+1.0)));
return dot( n, vec3(70.0) );
}
float fbm(vec2 uv)
{
float f;
mat2 m = mat2( 1.6, 1.2, -1.2, 1.6 );
f = 0.5000*noise( uv ); uv = m*uv;
f += 0.2500*noise( uv ); uv = m*uv;
f += 0.1250*noise( uv ); uv = m*uv;
f += 0.0625*noise( uv ); uv = m*uv;
f = 0.5 + 0.5*f;
return f;
}
vec4 ProcessTexel()
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
vec2 q = uv;
q.x = abs(q.x-0.5)+0.5;
float T3 = 1.5*timer;
q.y -= 0.2;
float n = fbm(q*vec2(8.,1.) - vec2(0,T3));
float c = 1. - 15. * pow( max( 0., length(q*vec2(0.,.75) ) - n * max( 0., q.y+.25 ) ),1.5 );
float c1 = n * c * (1.2-pow(1.1*uv.y,4.));
c1=clamp(c1,0.,1.);
vec3 col = vec3(c1*c1*c1*c1, 1.2*c1*c1*c1, 2.2*c1*c1);
float a = clamp(c * (1.-pow(uv.y,3.)),0.,1.);
return pow(getTexel(vTexCoord.st),vec4(2.))+vec4(mix(vec3(0.),col,a),0.0);
}

51
shaders/glsl/AsmdPBeam.fp Normal file
View file

@ -0,0 +1,51 @@
/* https://www.shadertoy.com/view/XsXSWS */
vec2 hash( vec2 p )
{
p = vec2( dot(p,vec2(127.1,311.7)),
dot(p,vec2(269.5,183.3)) );
return -1.0 + 2.0*fract(sin(p)*43758.5453123);
}
float noise( in vec2 p )
{
const float K1 = 0.366025404; // (sqrt(3)-1)/2;
const float K2 = 0.211324865; // (3-sqrt(3))/6;
vec2 i = floor( p + (p.x+p.y)*K1 );
vec2 a = p - i + (i.x+i.y)*K2;
vec2 o = (a.x>a.y) ? vec2(1.0,0.0) : vec2(0.0,1.0);
vec2 b = a - o + K2;
vec2 c = a - 1.0 + 2.0*K2;
vec3 h = max( 0.5-vec3(dot(a,a), dot(b,b), dot(c,c) ), 0.0 );
vec3 n = h*h*h*h*vec3( dot(a,hash(i+0.0)), dot(b,hash(i+o)), dot(c,hash(i+1.0)));
return dot( n, vec3(70.0) );
}
float fbm(vec2 uv)
{
float f;
mat2 m = mat2( 1.6, 1.2, -1.2, 1.6 );
f = 0.5000*noise( uv ); uv = m*uv;
f += 0.2500*noise( uv ); uv = m*uv;
f += 0.1250*noise( uv ); uv = m*uv;
f += 0.0625*noise( uv ); uv = m*uv;
f = 0.5 + 0.5*f;
return f;
}
vec4 ProcessTexel()
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
vec2 q = uv;
q.x = abs(q.x-0.5)+0.5;
float T3 = 1.5*timer;
q.y -= 0.2;
float n = fbm(q*vec2(8.,1.) - vec2(0,T3));
float c = 1. - 15. * pow( max( 0., length(q*vec2(0.,.75) ) - n * max( 0., q.y+.25 ) ),1.5 );
float c1 = n * c * (1.2-pow(1.1*uv.y,4.));
c1=clamp(c1,0.,1.);
vec3 col = vec3(1.8*c1*c1*c1, 1.2*c1*c1*c1*c1, 2.2*c1*c1);
float a = clamp(c * (1.-pow(uv.y,3.)),0.,1.);
return pow(getTexel(vTexCoord.st),vec4(2.))+vec4(mix(vec3(0.),col,a),0.0);
}

51
shaders/glsl/AsmdSBeam.fp Normal file
View file

@ -0,0 +1,51 @@
/* https://www.shadertoy.com/view/XsXSWS */
vec2 hash( vec2 p )
{
p = vec2( dot(p,vec2(127.1,311.7)),
dot(p,vec2(269.5,183.3)) );
return -1.0 + 2.0*fract(sin(p)*43758.5453123);
}
float noise( in vec2 p )
{
const float K1 = 0.366025404; // (sqrt(3)-1)/2;
const float K2 = 0.211324865; // (3-sqrt(3))/6;
vec2 i = floor( p + (p.x+p.y)*K1 );
vec2 a = p - i + (i.x+i.y)*K2;
vec2 o = (a.x>a.y) ? vec2(1.0,0.0) : vec2(0.0,1.0);
vec2 b = a - o + K2;
vec2 c = a - 1.0 + 2.0*K2;
vec3 h = max( 0.5-vec3(dot(a,a), dot(b,b), dot(c,c) ), 0.0 );
vec3 n = h*h*h*h*vec3( dot(a,hash(i+0.0)), dot(b,hash(i+o)), dot(c,hash(i+1.0)));
return dot( n, vec3(70.0) );
}
float fbm(vec2 uv)
{
float f;
mat2 m = mat2( 1.6, 1.2, -1.2, 1.6 );
f = 0.5000*noise( uv ); uv = m*uv;
f += 0.2500*noise( uv ); uv = m*uv;
f += 0.1250*noise( uv ); uv = m*uv;
f += 0.0625*noise( uv ); uv = m*uv;
f = 0.5 + 0.5*f;
return f;
}
vec4 ProcessTexel()
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
vec2 q = uv;
q.x = abs(q.x-0.5)+0.5;
float T3 = 1.5*timer;
q.y -= 0.2;
float n = fbm(q*vec2(8.,1.) - vec2(0,T3));
float c = 1. - 15. * pow( max( 0., length(q*vec2(0.,.75) ) - n * max( 0., q.y+.25 ) ),1.5 );
float c1 = n * c * (1.2-pow(1.1*uv.y,4.));
c1=clamp(c1,0.,1.);
vec3 col = vec3(2.5*c1*c1, 1.2*c1*c1*c1, c1*c1*c1*c1*c1*c1);
float a = clamp(c * (1.-pow(uv.y,3.)),0.,1.);
return pow(getTexel(vTexCoord.st),vec4(2.))+vec4(mix(vec3(0.),col,a),0.0);
}

52
shaders/glsl/FlareFX.fp Normal file
View file

@ -0,0 +1,52 @@
/* https://www.shadertoy.com/view/XsXSWS */
vec2 hash( vec2 p )
{
p = vec2( dot(p,vec2(127.1,311.7)),
dot(p,vec2(269.5,183.3)) );
return -1.0 + 2.0*fract(sin(p)*43758.5453123);
}
float noise( in vec2 p )
{
const float K1 = 0.366025404; // (sqrt(3)-1)/2;
const float K2 = 0.211324865; // (3-sqrt(3))/6;
vec2 i = floor( p + (p.x+p.y)*K1 );
vec2 a = p - i + (i.x+i.y)*K2;
vec2 o = (a.x>a.y) ? vec2(1.0,0.0) : vec2(0.0,1.0);
vec2 b = a - o + K2;
vec2 c = a - 1.0 + 2.0*K2;
vec3 h = max( 0.5-vec3(dot(a,a), dot(b,b), dot(c,c) ), 0.0 );
vec3 n = h*h*h*h*vec3( dot(a,hash(i+0.0)), dot(b,hash(i+o)), dot(c,hash(i+1.0)));
return dot( n, vec3(70.0) );
}
float fbm(vec2 uv)
{
float f;
mat2 m = mat2( 1.6, 1.2, -1.2, 1.6 );
f = 0.5000*noise( uv ); uv = m*uv;
f += 0.2500*noise( uv ); uv = m*uv;
f += 0.1250*noise( uv ); uv = m*uv;
f += 0.0625*noise( uv ); uv = m*uv;
f = 0.5 + 0.5*f;
return f;
}
vec4 ProcessTexel()
{
vec2 uv = vTexCoord.st;
uv.y = 1.0-uv.y;
vec2 q = uv;
float strength = 3.;
float T3 = max(1.5,0.75*strength)*timer;
q.x = mod(q.x,1.)-0.5;
q.y -= 0.5;
float n = fbm(strength*q - vec2(0,T3));
float c = 1. - 12. * pow( max( 0., length(q*vec2(1.+q.y*1.25,.85) ) - n * max( 0., q.y+.15 ) ),1.5 );
float c1 = n * c * (1.5-pow(1.25*uv.y,4.));
c1=clamp(c1,0.,1.);
vec3 col = vec3(1.5*c1, c1*c1*c1, c1*c1*c1*c1*c1*c1);
float a = clamp(c * (1.-pow(uv.y,3.)),0.,1.);
return vec4( mix(vec3(0.),col,a), 1.0);
}

19
shaders/glsl/PowerUp.fp Normal file
View file

@ -0,0 +1,19 @@
vec3 bolt( in vec2 uv, in float speed, in float freq )
{
vec3 col = vec3(0.0);
for ( float i=0.0; i<0.03; i+=0.01 )
{
vec2 nuv = uv;
nuv.x += 0.3*(0.5-texture(warptex,vec2((timer-i)*speed,nuv.y*freq)).x)*pow(uv.y,0.5);
col += 0.2*getTexel(nuv).rgb;
}
return col;
}
vec4 ProcessTexel()
{
vec3 col = bolt(vTexCoord.st,2.53534,0.21);
col += bolt(vTexCoord.st,2.64563,0.32);
col += bolt(vTexCoord.st,2.73425,0.43);
return vec4(col,1.);
}

19
shaders/glsl/ShockCore.fp Normal file
View file

@ -0,0 +1,19 @@
vec3 bolt( in vec2 uv, in float speed, in float freq )
{
vec3 col = vec3(0.0);
for ( float i=0.0; i<0.05; i+=0.01 )
{
vec2 nuv = uv;
nuv.x += 1.2*(0.5-texture(warptex,vec2((timer-i)*speed,nuv.y*freq)).x)*max(0.0,pow(0.5-abs(0.5-uv.y),0.5)-0.2);
col += 0.2*getTexel(nuv).rgb;
}
return col;
}
vec4 ProcessTexel()
{
vec3 col = bolt(vTexCoord.st,1.53534,0.51);
col += bolt(vTexCoord.st,1.64563,0.62);
col += bolt(vTexCoord.st,1.73425,0.73);
return vec4(col,1.);
}