@Evgeni_Popov After recent update I’ve noticed strange black flickering of DDS-loaded cubemaps (environment and reflection textures which I load using custom extension to glTF loader), and also multiple WebGL errors in console: “glTexStorage2D: No texture is bound to the specified target”.
After investigation I’ve found this PR WebGL: Fix empty mipmaps for compressed textures by Popov72 · Pull Request #17151 · BabylonJS/Babylon.js · GitHub
which introduces line
gl.texStorage2D(gl.TEXTURE_2D, Math.floor(Math.log2(Math.max(width, height))) + 1, internalFormat, texture.width, texture.height);
in _uploadCompressedDataToTextureDirectly function which is called both for 2D textures and cubemaps.
I don’t have a minimal example right now, but after changing target to use gl.TEXTURE_2D or gl.TEXTURE_CUBE_MAP for corresponding textures, the problem disappeared.
Was this specific gl.TEXTURE_2D just an oversight, or I am missing something and it’s actually intentional?