From ddb2d89e6caf73cf3dc4e9267544548211dd8f55 Mon Sep 17 00:00:00 2001 From: Mathias Agopian Date: Thu, 30 Oct 2025 09:29:33 -0700 Subject: [PATCH] creating a cubemap with mip levels was incorrect (#9382) the miplevels where not specified with the correct size. --- filament/backend/src/opengl/OpenGLDriver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/filament/backend/src/opengl/OpenGLDriver.cpp b/filament/backend/src/opengl/OpenGLDriver.cpp index ae6e81711b..7805987021 100644 --- a/filament/backend/src/opengl/OpenGLDriver.cpp +++ b/filament/backend/src/opengl/OpenGLDriver.cpp @@ -807,8 +807,9 @@ void OpenGLDriver::textureStorage(GLTexture* t, for (GLint face = 0 ; face < 6 ; face++) { glTexImage2D(GL_TEXTURE_CUBE_MAP_POSITIVE_X + face, level, GLint(t->gl.internalFormat), - GLsizei(width), GLsizei(height), 0, - format, type, nullptr); + std::max(GLsizei(1), GLsizei(width >> level)), + std::max(GLsizei(1), GLsizei(height >> level)), + 0, format, type, nullptr); } } else { glTexImage2D(t->gl.target, level, GLint(t->gl.internalFormat),