Fixed some things

This commit is contained in:
Anuken
2018-11-13 23:24:59 -05:00
parent d824b41bbb
commit 785c2e36c6
5 changed files with 14 additions and 18 deletions

View File

@@ -268,8 +268,8 @@ public class Renderer extends RendererModule{
}
private void drawFlyerShadows(){
Graphics.surface(effectSurface, true, false);
//Graphics.surface(effectSurface, true, false);
Draw.color(0, 0, 0, 0.15f);
float trnsX = -12, trnsY = -13;
@@ -283,8 +283,8 @@ public class Renderer extends RendererModule{
drawAndInterpolate(playerGroup, unit -> unit.isFlying() && !unit.isDead(), player -> player.drawShadow(trnsX, trnsY));
}
Draw.color(0, 0, 0, 0.15f);
Graphics.flushSurface();
//Graphics.flushSurface();
Draw.color();
}

View File

@@ -1,13 +1,7 @@
package io.anuke.mindustry.graphics;
import com.badlogic.gdx.graphics.Color;
import io.anuke.ucore.core.Core;
import io.anuke.ucore.core.Graphics;
import io.anuke.ucore.graphics.Draw;
import io.anuke.ucore.graphics.Shader;
import static io.anuke.mindustry.Vars.renderer;
public enum CacheLayer{
water{
@Override
@@ -65,12 +59,13 @@ public enum CacheLayer{
protected void beginShader(){
//renderer.getBlocks().endFloor();
renderer.effectSurface.getBuffer().begin();
Graphics.clear(Color.CLEAR);
// renderer.effectSurface.getBuffer().begin();
//Graphics.clear(Color.CLEAR);
//renderer.getBlocks().beginFloor();
}
public void endShader(Shader shader){
/*
renderer.blocks.floor.endDraw();
renderer.effectSurface.getBuffer().end();
@@ -82,6 +77,6 @@ public enum CacheLayer{
Core.camera.viewportWidth * Core.camera.zoom, -Core.camera.viewportHeight * Core.camera.zoom);
Graphics.end();
Graphics.shader();
renderer.blocks.floor.beginDraw();
renderer.blocks.floor.beginDraw();*/
}
}

View File

@@ -24,6 +24,7 @@ import java.util.Arrays;
import static io.anuke.mindustry.Vars.*;
//TODO point shader mesh
public class FloorRenderer{
private final static int chunksize = 64;