diff --git a/src/main/java/me/cortex/voxy/client/core/NormalRenderPipeline.java b/src/main/java/me/cortex/voxy/client/core/NormalRenderPipeline.java index c358bdcce..7558e738a 100644 --- a/src/main/java/me/cortex/voxy/client/core/NormalRenderPipeline.java +++ b/src/main/java/me/cortex/voxy/client/core/NormalRenderPipeline.java @@ -64,8 +64,11 @@ protected int setup(Viewport viewport, int sourceFB, int srcWidth, int srcHei this.colourTex = new GlTexture().store(GL_RGBA8, 1, viewport.width, viewport.height); this.colourSSAOTex = new GlTexture().store(GL_RGBA8, 1, viewport.width, viewport.height); - this.fb.framebuffer.bind(GL_COLOR_ATTACHMENT0, this.colourTex).verify(); - this.fbSSAO.bind(this.fb.getDepthAttachmentType(), this.fb.getDepthTex()).bind(GL_COLOR_ATTACHMENT0, this.colourSSAOTex).verify(); + this.fb.framebuffer.bind(GL_COLOR_ATTACHMENT0, this.colourTex); + this.fbSSAO.bind(this.fb.getDepthAttachmentType(), this.fb.getDepthTex()).bind(GL_COLOR_ATTACHMENT0, this.colourSSAOTex); + + this.fb.framebuffer.verify(); + this.fbSSAO.verify(); glTextureParameterf(this.colourTex.id, GL_TEXTURE_MIN_FILTER, GL_NEAREST); diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/util/DepthFramebuffer.java b/src/main/java/me/cortex/voxy/client/core/rendering/util/DepthFramebuffer.java index 62cbd8949..ba0ddc2e3 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/util/DepthFramebuffer.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/util/DepthFramebuffer.java @@ -28,7 +28,7 @@ public boolean resize(int width, int height) { this.depthBuffer.free(); } this.depthBuffer = new GlTexture().store(this.depthType, 1, width, height); - this.framebuffer.bind(this.getDepthAttachmentType(), this.depthBuffer).verify(); + this.framebuffer.bind(this.getDepthAttachmentType(), this.depthBuffer); return true; } return false;