From e9bbe6fc784658f1e7116cb44f3f70e16aae09fd Mon Sep 17 00:00:00 2001 From: Frank Becker Date: Mon, 10 Mar 2025 00:12:08 +0100 Subject: [PATCH] Fix gles3 gaussian_blur mipmap setup. Extend max level to include i for writing and so fb is complete and avoid resulting errors like: "Framebuffer is incomplete: Attachment level is not in the [base level, max level] range". --- drivers/gles3/effects/copy_effects.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gles3/effects/copy_effects.cpp b/drivers/gles3/effects/copy_effects.cpp index 47ca832bd7a..4d74a4996b9 100644 --- a/drivers/gles3/effects/copy_effects.cpp +++ b/drivers/gles3/effects/copy_effects.cpp @@ -243,7 +243,7 @@ void CopyEffects::gaussian_blur(GLuint p_source_texture, int p_mipmap_count, con glBindTexture(GL_TEXTURE_2D, p_source_texture); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, i - 1); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, i - 1); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, i); glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, p_source_texture, i); #ifdef DEV_ENABLED GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);