From 2ad076bec326af0177a9c8d7863fedf6cbe74556 Mon Sep 17 00:00:00 2001 From: MihailRis Date: Sat, 14 Jun 2025 20:42:43 +0300 Subject: [PATCH] fix gbuffer attachment wrapping --- src/graphics/core/GBuffer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/graphics/core/GBuffer.cpp b/src/graphics/core/GBuffer.cpp index 574f7a9b..19f6c360 100644 --- a/src/graphics/core/GBuffer.cpp +++ b/src/graphics/core/GBuffer.cpp @@ -45,6 +45,8 @@ void GBuffer::createPositionsBuffer() { ); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT1, GL_TEXTURE_2D, positionsBuffer, 0 ); @@ -66,6 +68,8 @@ void GBuffer::createNormalsBuffer() { ); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); glFramebufferTexture2D( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT2, GL_TEXTURE_2D, normalsBuffer, 0 );