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".
This commit is contained in:
Frank Becker 2025-03-10 00:12:08 +01:00
parent cae3d722a3
commit e9bbe6fc78

View File

@ -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);