Better build beam visuals
This commit is contained in:
@@ -30,6 +30,7 @@ public class Renderer implements ApplicationListener{
|
||||
public @Nullable Bloom bloom;
|
||||
public FrameBuffer effectBuffer = new FrameBuffer();
|
||||
public float laserOpacity = 1f;
|
||||
public boolean animateShields;
|
||||
/** minZoom = zooming out, maxZoom = zooming in */
|
||||
public float minZoom = 1.5f, maxZoom = 6f;
|
||||
|
||||
@@ -69,7 +70,8 @@ public class Renderer implements ApplicationListener{
|
||||
float dest = Mathf.round(targetscale, 0.5f);
|
||||
camerascale = Mathf.lerpDelta(camerascale, dest, 0.1f);
|
||||
if(Mathf.equal(camerascale, dest, 0.001f)) camerascale = dest;
|
||||
laserOpacity = Core.settings.getInt("lasersopacity") / 100f;
|
||||
laserOpacity = settings.getInt("lasersopacity") / 100f;
|
||||
animateShields = settings.getBool("animatedshields");
|
||||
|
||||
if(landTime > 0){
|
||||
landTime -= Time.delta;
|
||||
@@ -204,7 +206,7 @@ public class Renderer implements ApplicationListener{
|
||||
graphics.clear(clearColor);
|
||||
Draw.reset();
|
||||
|
||||
if(Core.settings.getBool("animatedwater") || Core.settings.getBool("animatedshields")){
|
||||
if(Core.settings.getBool("animatedwater") || animateShields){
|
||||
effectBuffer.resize(graphics.getWidth(), graphics.getHeight());
|
||||
}
|
||||
|
||||
@@ -248,11 +250,16 @@ public class Renderer implements ApplicationListener{
|
||||
|
||||
Draw.draw(Layer.plans, overlays::drawBottom);
|
||||
|
||||
if(settings.getBool("animatedshields") && Shaders.shield != null){
|
||||
if(animateShields && Shaders.shield != null){
|
||||
Draw.drawRange(Layer.shields, 1f, () -> effectBuffer.begin(Color.clear), () -> {
|
||||
effectBuffer.end();
|
||||
effectBuffer.blit(Shaders.shield);
|
||||
});
|
||||
|
||||
Draw.drawRange(Layer.buildBeam, 1f, () -> effectBuffer.begin(Color.clear), () -> {
|
||||
effectBuffer.end();
|
||||
effectBuffer.blit(Shaders.buildBeam);
|
||||
});
|
||||
}
|
||||
|
||||
Draw.draw(Layer.overlayUI, overlays::drawTop);
|
||||
|
||||
Reference in New Issue
Block a user