WIP Interplanetary Accelerator animation

This commit is contained in:
Anuken
2025-01-28 21:30:38 -05:00
parent 22538840a1
commit 6c31853c11
11 changed files with 292 additions and 173 deletions
+2 -2
View File
@@ -1091,7 +1091,7 @@ ability.stat.buildtime = [stat]{0} sec[lightgray] build time
bar.onlycoredeposit = Only Core Depositing Allowed
bar.drilltierreq = Better Drill Required
bar.nobatterypower = Insufficieny Battery Power
bar.nobatterypower = Insufficient Battery Power
bar.noresources = Missing Resources
bar.corereq = Core Base Required
bar.corefloor = Core Zone Tile Required
@@ -1100,7 +1100,7 @@ bar.drillspeed = Drill Speed: {0}/s
bar.pumpspeed = Pump Speed: {0}/s
bar.efficiency = Efficiency: {0}%
bar.boost = Boost: +{0}%
bar.powerbuffer = Battery Power: {0}/{1}
bar.powerbuffer = Batteries: {0}/{1}
bar.powerbalance = Power: {0}/s
bar.powerstored = Stored: {0}/{1}
bar.poweramount = Power: {0}
+6 -2
View File
@@ -27,6 +27,10 @@ bool cont(vec2 T, vec2 v){
id(T + vec2(-step, -step) * v, base) || id(T + vec2(-step, step) * v, base));
}
vec4 blend(vec4 dst, vec4 src){
return src * src.a + dst * (1.0 - src.a);
}
void main(){
vec2 t = v_texCoords.xy;
@@ -41,11 +45,11 @@ void main(){
float dst = (abs(center.x - coords.x) + abs(center.y - coords.y))/2.0;
if((mod(u_time / 1.5 + value, 20.0) < 15.0 && cont(t, v))){
gl_FragColor = v_color;
gl_FragColor = blend(color, v_color);
}else if(dst > (1.0-u_progress) * (center.x)){
gl_FragColor = color;
}else if((dst + 2.0 > (1.0-u_progress) * (center.x)) && color.a > 0.1){
gl_FragColor = v_color;
gl_FragColor = blend(color, v_color);
}else{
gl_FragColor = vec4(0.0);
}