From b4a20c8fcbbe956bee56fb5173686e7b530dcc94 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 11 Jul 2018 12:30:07 -0400 Subject: [PATCH] Fixed fog glitching around during screenshake --- core/src/io/anuke/mindustry/graphics/FogRenderer.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/io/anuke/mindustry/graphics/FogRenderer.java b/core/src/io/anuke/mindustry/graphics/FogRenderer.java index 7d1d2048a4..2e8c2ba52b 100644 --- a/core/src/io/anuke/mindustry/graphics/FogRenderer.java +++ b/core/src/io/anuke/mindustry/graphics/FogRenderer.java @@ -1,5 +1,6 @@ package io.anuke.mindustry.graphics; +import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.Pixmap.Format; import com.badlogic.gdx.graphics.Texture; @@ -122,8 +123,8 @@ public class FogRenderer implements Disposable{ renderer.pixelSurface.getBuffer().end(); Graphics.shader(); - Graphics.begin(); - Core.batch.draw(renderer.pixelSurface.texture(), px, py + vh, vw, -vh); + Graphics.setScreen(); + Core.batch.draw(renderer.pixelSurface.texture(), 0, Gdx.graphics.getHeight(), Gdx.graphics.getWidth(), -Gdx.graphics.getHeight()); Graphics.end(); if(Core.batch instanceof ClipSpriteBatch){