diff --git a/core/assets-raw/sprites_replacement/items/item-spore-pod.png b/core/assets-raw/sprites_replacement/items/item-spore-pod.png index d1a80d0b2a..32bcf69fed 100644 Binary files a/core/assets-raw/sprites_replacement/items/item-spore-pod.png and b/core/assets-raw/sprites_replacement/items/item-spore-pod.png differ diff --git a/core/assets/shaders/shadow.fragment b/core/assets/shaders/shadow.fragment index 2ab1ff8934..7346d78142 100644 --- a/core/assets/shaders/shadow.fragment +++ b/core/assets/shaders/shadow.fragment @@ -3,8 +3,7 @@ precision mediump float; precision mediump int; #endif -#define SPACE 0.75 -#define RADIUS 5.0 +#define SPACE 2.0 uniform sampler2D u_texture; @@ -21,15 +20,25 @@ void main() { vec4 c = texture2D(u_texture, v_texCoord.xy); float spacing = SPACE * u_scl; - if(c.a >= 0.001){ - gl_FragColor = c * v_color; - }else{ - for(float cx = -RADIUS; cx <= RADIUS; cx ++){ - for(float cy = -RADIUS; cy <= RADIUS; cy ++){ - if(cx*cx + cy*cy <= RADIUS * RADIUS && texture2D(u_texture, v_texCoord.xy + vec2(cx, cy) * v * spacing).a >= 0.001){ - gl_FragColor = u_color; - } - } - } - } -} + gl_FragColor = mix(vec4(0.0, 0.0, 0.0, min(c.a, u_color.a)), u_color, + (1.0-step(0.001, texture2D(u_texture, v_texCoord.xy).a)) * + step(0.001, + //cardinals + texture2D(u_texture, v_texCoord.xy + vec2(0, spacing) * v).a + + texture2D(u_texture, v_texCoord.xy + vec2(0, -spacing) * v).a + + texture2D(u_texture, v_texCoord.xy + vec2(spacing, 0) * v).a + + texture2D(u_texture, v_texCoord.xy + vec2(-spacing, 0) * v).a + + + //cardinal edges + texture2D(u_texture, v_texCoord.xy + vec2(spacing, spacing) * v).a + + texture2D(u_texture, v_texCoord.xy + vec2(spacing, -spacing) * v).a + + texture2D(u_texture, v_texCoord.xy + vec2(-spacing, spacing) * v).a + + texture2D(u_texture, v_texCoord.xy + vec2(-spacing, -spacing) * v).a + + + //cardinals * 2 + texture2D(u_texture, v_texCoord.xy + vec2(0, spacing) * v*2.0).a + + texture2D(u_texture, v_texCoord.xy + vec2(0, -spacing) * v*2.0).a + + texture2D(u_texture, v_texCoord.xy + vec2(spacing, 0) * v*2.0).a + + texture2D(u_texture, v_texCoord.xy + vec2(-spacing, 0) * v*2.0).a + )); +} \ No newline at end of file diff --git a/core/assets/shaders/unitbuild.fragment b/core/assets/shaders/unitbuild.fragment index 28aea691f8..1faf952c8d 100644 --- a/core/assets/shaders/unitbuild.fragment +++ b/core/assets/shaders/unitbuild.fragment @@ -3,8 +3,6 @@ precision mediump float; precision mediump int; #endif -#define step 3.0 - uniform sampler2D u_texture; uniform float u_time; @@ -17,8 +15,8 @@ uniform vec2 u_texsize; varying vec4 v_color; varying vec2 v_texCoord; -#define SPACE 0.75 -#define RADIUS 5.0 +#define SPACE 1.3 +#define RADIUS 2.0 bool cont(vec2 t, vec2 v){ diff --git a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java index a811f5aa7e..8937fcaceb 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java @@ -140,7 +140,7 @@ public class HudFragment extends Fragment{ infolabel.marginLeft(10f); IntFormat fps = new IntFormat("fps"); IntFormat ping = new IntFormat("ping"); - infolabel.label(() -> fps.get(Core.graphics.getFramesPerSecond())).padRight(10); + infolabel.label(() -> fps.get(Core.graphics.getFramesPerSecond())).padLeft(10).growX(); infolabel.row(); if(Net.hasClient()){ infolabel.label(() -> ping.get(Net.getPing())).visible(Net::client).colspan(2);