CubeTexture from 6 TGA/DDS files

Hi,

I have cubemap textures that consist of 6 individual TGA or DDS files. It seems that it currently only can load cubetextures from 6 individual files if the browser supports the filetype. Is this correct?

Is there a way to work around this? Can I make a CubeTexture from 6 individual Texture objects?

Sorry I do not get the question :slight_smile: Your PG seems to work

Sorry, i shoulve explained the playground a bit more. The skybox should show something instead of being black. The cube in the middle just shows that the same dds texture does work in non-cubetexture context. Comment line 14 to see what it should be.

ok I understand :smiley:

Let me check what is going on :slight_smile:

Ok so I know what is going on: the DDS decoder (or any decoder) are not invoked from the CubeTexture loader side.

Not a bug per se. Simply not a supported feature

Is there an internal code path I could take to make this work?

Unforhttps://forum.babylonjs.com/t/cubetexture-from-6-tga-dds-files/54645/8tunately this would be complex. The current cubeTexture relies on the canvas to decode the image:
Babylon.js/packages/dev/core/src/Engines/Extensions/engine.cubeTexture.ts at 22e2e0a97d2fb341deb5e73551d2eb20ebac4b9d · BabylonJS/Babylon.js

That being said, you can pack a full cube texture inside a DDS so maybe this is the way to go for you?

hdri_test | Babylon.js Playground

I’m kinda stuck with external assets. I’ll just use the 6 individual textures and combine them in shader. Won’t give a perfect result, but should be good enough in my case.

Rally sorry about that:(