Shader crash fix / More blocks / Kiln / Removed (unused) flux
This commit is contained in:
@@ -58,7 +58,7 @@ public class BlockRenderer{
|
||||
for(int x = 0; x < world.width(); x++){
|
||||
for(int y = 0; y < world.height(); y++){
|
||||
Tile tile = world.rawTile(x, y);
|
||||
if(tile.getRotation() > 0){
|
||||
if(tile.getRotation() > 0 && tile.block().solid && tile.block().fillsTile && !tile.block().synthetic()){
|
||||
Draw.color(0f, 0f, 0f, Math.min((tile.getRotation() + 0.5f)/4f, 1f));
|
||||
Fill.rect(tile.x + 0.5f, tile.y + 0.5f, 1, 1);
|
||||
}
|
||||
|
||||
@@ -7,19 +7,12 @@ import io.anuke.arc.graphics.glutils.Shader;
|
||||
import io.anuke.arc.scene.ui.layout.Unit;
|
||||
import io.anuke.arc.util.Time;
|
||||
|
||||
import static io.anuke.mindustry.Vars.tilesize;
|
||||
import static io.anuke.mindustry.Vars.world;
|
||||
|
||||
public class Shaders{
|
||||
public static Outline outline;
|
||||
public static Shadow shadow;
|
||||
public static BlockBuild blockbuild;
|
||||
public static BlockPreview blockpreview;
|
||||
public static Shield shield;
|
||||
public static SurfaceShader water;
|
||||
public static SurfaceShader lava;
|
||||
public static SurfaceShader oil;
|
||||
public static Space space;
|
||||
public static UnitBuild build;
|
||||
public static MixShader mix;
|
||||
public static Shader fullMix;
|
||||
@@ -32,10 +25,6 @@ public class Shaders{
|
||||
blockbuild = new BlockBuild();
|
||||
blockpreview = new BlockPreview();
|
||||
shield = new Shield();
|
||||
water = new SurfaceShader("water");
|
||||
lava = new SurfaceShader("lava");
|
||||
oil = new SurfaceShader("oil");
|
||||
space = new Space();
|
||||
build = new UnitBuild();
|
||||
mix = new MixShader();
|
||||
fog = new FogShader();
|
||||
@@ -82,19 +71,6 @@ public class Shaders{
|
||||
}
|
||||
}
|
||||
|
||||
public static class Space extends SurfaceShader{
|
||||
|
||||
public Space(){
|
||||
super("space2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
super.apply();
|
||||
setUniformf("u_center", world.width() * tilesize / 2f, world.height() * tilesize / 2f);
|
||||
}
|
||||
}
|
||||
|
||||
public static class UnitBuild extends LoadShader{
|
||||
public float progress, time;
|
||||
public Color color = new Color();
|
||||
@@ -203,23 +179,6 @@ public class Shaders{
|
||||
Core.camera.height );
|
||||
}
|
||||
}
|
||||
|
||||
public static class SurfaceShader extends LoadShader{
|
||||
|
||||
public SurfaceShader(String frag){
|
||||
super(frag, "cache");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply(){
|
||||
setUniformf("camerapos",
|
||||
Core.camera.position.x - Core.camera.width / 2 ,
|
||||
Core.camera.position.y - Core.camera.height / 2 );
|
||||
setUniformf("screensize", Core.camera.width,
|
||||
Core.camera.height );
|
||||
setUniformf("u_time", Time.time());
|
||||
}
|
||||
}
|
||||
|
||||
public static class LoadShader extends Shader{
|
||||
public LoadShader(String frag, String vert){
|
||||
|
||||
Reference in New Issue
Block a user