Improved antialiasing / Improved outlines
This commit is contained in:
@@ -256,16 +256,13 @@ public class Renderer implements ApplicationListener{
|
||||
drawAndInterpolate(unitGroups[team.ordinal()], u -> u.isFlying() == flying && !u.isDead(), Unit::drawUnder);
|
||||
drawAndInterpolate(playerGroup, p -> p.isFlying() == flying && p.getTeam() == team && !p.isDead(), Unit::drawUnder);
|
||||
|
||||
Shaders.outline.color.set(team.color);
|
||||
Shaders.mix.color.set(Color.WHITE);
|
||||
|
||||
//Graphics.beginShaders(Shaders.outline);
|
||||
Draw.shader(Shaders.mix, true);
|
||||
drawAndInterpolate(unitGroups[team.ordinal()], u -> u.isFlying() == flying && !u.isDead(), Unit::drawAll);
|
||||
drawAndInterpolate(playerGroup, p -> p.isFlying() == flying && p.getTeam() == team, Unit::drawAll);
|
||||
Draw.shader();
|
||||
blocks.drawTeamBlocks(Layer.turret, team);
|
||||
//Graphics.endShaders();
|
||||
|
||||
drawAndInterpolate(unitGroups[team.ordinal()], u -> u.isFlying() == flying && !u.isDead(), Unit::drawOver);
|
||||
drawAndInterpolate(playerGroup, p -> p.isFlying() == flying && p.getTeam() == team, Unit::drawOver);
|
||||
|
||||
@@ -29,8 +29,6 @@ public class OverlayRenderer{
|
||||
|
||||
if(!input.isDrawing() || player.isDead()) continue;
|
||||
|
||||
Shaders.outline.color.set(Pal.accent);
|
||||
|
||||
input.drawOutlined();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,6 @@ import io.anuke.arc.scene.ui.layout.Unit;
|
||||
import io.anuke.arc.util.Time;
|
||||
|
||||
public class Shaders{
|
||||
public static Outline outline;
|
||||
public static Shadow shadow;
|
||||
public static BlockBuild blockbuild;
|
||||
public static BlockPreview blockpreview;
|
||||
@@ -20,7 +19,6 @@ public class Shaders{
|
||||
public static MenuShader menu;
|
||||
|
||||
public static void init(){
|
||||
outline = new Outline();
|
||||
shadow = new Shadow();
|
||||
blockbuild = new BlockBuild();
|
||||
blockpreview = new BlockPreview();
|
||||
@@ -91,23 +89,6 @@ public class Shaders{
|
||||
}
|
||||
}
|
||||
|
||||
public static class Outline extends LoadShader{
|
||||
public Color color = new Color();
|
||||
public TextureRegion region = new TextureRegion();
|
||||
public float scl;
|
||||
|
||||
public Outline(){
|
||||
super("outline", "default");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
setUniformf("u_color", color);
|
||||
setUniformf("u_scl", scl);
|
||||
setUniformf("u_texsize", region.getTexture().getWidth(), region.getTexture().getHeight());
|
||||
}
|
||||
}
|
||||
|
||||
public static class Shadow extends LoadShader{
|
||||
public Color color = new Color();
|
||||
public TextureRegion region = new TextureRegion();
|
||||
|
||||
Reference in New Issue
Block a user