mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-08 14:24:52 +07:00
037f752b73
* Improve ArmorPlateAbility draw * Revert to tinting Just make a white shine sprite. Or none-white if you want some interesting visuals with the colors. * Fix not applying z when drawShine = false
22 lines
476 B
GLSL
22 lines
476 B
GLSL
uniform sampler2D u_texture;
|
|
|
|
uniform float u_time;
|
|
uniform float u_progress;
|
|
uniform vec2 u_uv;
|
|
uniform vec2 u_uv2;
|
|
uniform vec2 u_texsize;
|
|
|
|
varying vec4 v_color;
|
|
varying vec2 v_texCoords;
|
|
|
|
void main(){
|
|
vec2 coords = (v_texCoords - u_uv) / (u_uv2 - u_uv);
|
|
vec2 v = vec2(1.0/u_texsize.x, 1.0/u_texsize.y);
|
|
|
|
vec4 c = texture2D(u_texture, v_texCoords);
|
|
c.a *= u_progress;
|
|
c.a *= step(abs(sin(coords.y*3.0 + u_time)), 0.9);
|
|
|
|
gl_FragColor = c * v_color;
|
|
}
|