Skip to content

Commit

Permalink
fix: post pro captures UI and depth buffer precision
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceh121 committed Dec 26, 2023
1 parent ac1476c commit 4b322cc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/src/me/vinceh121/wanderer/Wanderer.java
Original file line number Diff line number Diff line change
Expand Up @@ -389,11 +389,11 @@ public void render() {
this.physicsManager.getDebugDrawer().end();
}

this.graphicsManager.endPostProcess();

this.scriptManager.update();

this.graphicsManager.renderUI();

this.graphicsManager.endPostProcess();
}

protected void flushEntityQueue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.badlogic.gdx.graphics.Pixmap.Format;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.glutils.FrameBuffer;
import com.badlogic.gdx.graphics.glutils.GLFrameBuffer;

import me.vinceh121.wanderer.GraphicsManager;
import me.vinceh121.wanderer.platform.glx.IComputeShaderProvider;
Expand Down Expand Up @@ -34,7 +35,11 @@ public void addEffectLast(IPostProcessEffect effect) {
public void begin() {
assert this.fbo == null;

this.fbo = new FrameBuffer(Format.RGB888, Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), true);
this.fbo = new GLFrameBuffer.FrameBufferBuilder(Gdx.graphics.getWidth(), Gdx.graphics.getHeight())
.addBasicColorTextureAttachment(Format.RGB888)
.addDepthRenderBuffer(GL30.GL_DEPTH_COMPONENT24)
.build();

this.fbo.begin();
}

Expand Down

0 comments on commit 4b322cc

Please sign in to comment.