diff --git a/packages/dev/core/src/Loading/Plugins/babylonFileLoader.ts b/packages/dev/core/src/Loading/Plugins/babylonFileLoader.ts index b7d3c13edf2..0f4711b5e0d 100644 --- a/packages/dev/core/src/Loading/Plugins/babylonFileLoader.ts +++ b/packages/dev/core/src/Loading/Plugins/babylonFileLoader.ts @@ -180,7 +180,11 @@ const loadAssetContainer = (scene: Scene, data: string, rootUrl: string, onError scene.environmentTexture = hdrTexture; } else { if (EndsWith(parsedData.environmentTexture, ".env")) { - const compressedTexture = new CubeTexture((parsedData.environmentTexture.match(/https?:\/\//g) ? "" : rootUrl) + parsedData.environmentTexture, scene); + const compressedTexture = new CubeTexture( + (parsedData.environmentTexture.match(/https?:\/\//g) ? "" : rootUrl) + parsedData.environmentTexture, + scene, + parsedData.environmentTextureForcedExtension + ); if (parsedData.environmentTextureRotationY) { compressedTexture.rotationY = parsedData.environmentTextureRotationY; }