From b895a8a08093b02ff0b9dcb1b477faacd38e92a8 Mon Sep 17 00:00:00 2001 From: mcrcortex <{ID}+{username}@users.noreply.github.com> Date: Fri, 23 Feb 2024 15:46:47 +1000 Subject: [PATCH] Fixed texture filtering --- .../voxy/client/core/rendering/post/PostProcessing.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/me/cortex/voxy/client/core/rendering/post/PostProcessing.java b/src/main/java/me/cortex/voxy/client/core/rendering/post/PostProcessing.java index 42ffca41..37fdf9b8 100644 --- a/src/main/java/me/cortex/voxy/client/core/rendering/post/PostProcessing.java +++ b/src/main/java/me/cortex/voxy/client/core/rendering/post/PostProcessing.java @@ -21,6 +21,7 @@ import static org.lwjgl.opengl.GL20C.glGetUniformfv; import static org.lwjgl.opengl.GL43.GL_DEPTH_STENCIL_TEXTURE_MODE; import static org.lwjgl.opengl.GL44C.glBindImageTextures; import static org.lwjgl.opengl.GL45C.glBlitNamedFramebuffer; +import static org.lwjgl.opengl.GL45C.glTextureParameterf; public class PostProcessing { private final GlFramebuffer framebuffer; @@ -66,6 +67,11 @@ public class PostProcessing { this.colourSSAO = new GlTexture().store(GL_RGBA8, 1, width, height); this.depthStencil = new GlTexture().store(GL_DEPTH24_STENCIL8, 1, width, height); + glTextureParameterf(this.colour.id, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTextureParameterf(this.colour.id, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTextureParameterf(this.colourSSAO.id, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTextureParameterf(this.colourSSAO.id, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + this.framebuffer.bind(GL_COLOR_ATTACHMENT0, this.colour); this.framebuffer.bind(GL_DEPTH_STENCIL_ATTACHMENT, this.depthStencil); this.framebuffer.verify();