Skip to content

Commit e9bbe6f

Browse files
committed
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".
1 parent cae3d72 commit e9bbe6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gles3/effects/copy_effects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ void CopyEffects::gaussian_blur(GLuint p_source_texture, int p_mipmap_count, con
243243

244244
glBindTexture(GL_TEXTURE_2D, p_source_texture);
245245
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, i - 1);
246-
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, i - 1);
246+
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, i);
247247
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, p_source_texture, i);
248248
#ifdef DEV_ENABLED
249249
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER);

0 commit comments

Comments
 (0)