You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Environment maps: Add cubemap support alongside equirectangular images #143
In the explainer, it indicates the environment map is specified as an equirectangular image.
However GPUs are better suited at processing cube maps. They exhibit less artifacts around the poles and a UA may prefer or automatically convert an equirectangular image to a cubemap.
There are a few ways we could add cubemap support.
One is automatically, if the image is a file which supports layers and contains 6 layers, the image is automatically imported as a cubemap. Popular cubemap formats include ktx, exr, and dds amongst others.
Another option is specifying the cube faces directly as 6 different files. I.e., instead of:
I drafted a more descriptive proposal in CSS for this. But I got push back because model would be the only element that used it.
I ended up folding that work into the Spatial CSS spec since it would have wider application there and could then be applied to the model element also:
I hope something like this is what you had in mind:
It is not clear to me as to how you would differentiate between a cube map and an equirect. Do you mean to use the aspect ration (4:3 for cube, 2:1 for equirect). Is there a canonical cube map format? I read in the discussion that there is use/need for KTX or other formats. Do those formats carry metadata that would indicate the use?
If the comment above is to express intent, than I am fine with that. If it is the final word, there is a lot more that needs to be said.
12. It is not clear to me as to how you would differentiate between a cube map and an equirect. Do you mean to use the aspect ration (4:3 for cube, 2:1 for equirect). Is there a canonical cube map format? I read in the discussion that there is use/need for KTX or other formats. Do those formats carry metadata that would indicate the use?
It would be up to the user agent to make that determination.
Maybe the spec should be more like:
"if the loaded file has 6 faces, treat it as a cubemap. Otherwise, treat as equirect."
Activity
cabanier commentedon Oct 14, 2026
Was this ever resolved?
cabanier commentedon Oct 14, 2026
/agenda
mwyrzykowski commentedon Oct 14, 2026
Previous discussion was item #1 from https://www.w3.org/2026/01/13-immersive-web-minutes.html but doesn't seem resolved
cabanier commentedon Oct 14, 2026
@mwyrzykowski Thanks for finding the minutes!
We can take this up again.
AdaRoseCannon commentedon Oct 14, 2026
I drafted a more descriptive proposal in CSS for this. But I got push back because model would be the only element that used it.
I ended up folding that work into the Spatial CSS spec since it would have wider application there and could then be applied to the model element also:
I hope something like this is what you had in mind:
https://webkit.github.io/explainers/css-spatial/Overview.html#environment-maps
cabanier commentedon Oct 29, 2026
At TPAC, we decided on the following:
"if the image that is loaded has 6 faces, treat it as a cubemap. Otherwise, treat as equirect."
Yonet commentedon Oct 29, 2026
Discussion minutes
DRx3D commentedon Oct 29, 2026
It is not clear to me as to how you would differentiate between a cube map and an equirect. Do you mean to use the aspect ration (4:3 for cube, 2:1 for equirect). Is there a canonical cube map format? I read in the discussion that there is use/need for KTX or other formats. Do those formats carry metadata that would indicate the use?
If the comment above is to express intent, than I am fine with that. If it is the final word, there is a lot more that needs to be said.
cabanier commentedon Oct 29, 2026
It would be up to the user agent to make that determination.
Maybe the spec should be more like:
"if the loaded file has 6 faces, treat it as a cubemap. Otherwise, treat as equirect."