Skip to content

Environment maps: Add cubemap support alongside equirectangular images #143

@mwyrzykowski

Description

@mwyrzykowski

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:

environmentmap="envmap.hdr"

one could provide the maps for the 6 faces:

environmentmap-plus-x="envmap-x1.hdr"
environmentmap-minus-x="envmap-x2.hdr"
environmentmap-plus-y="envmap-y1.hdr"
environmentmap-minus-y="envmap-y2.hdr"
environmentmap-plus-z="envmap-z1.hdr"
environmentmap-minus-z="envmap-z2.hdr"

or alternatively we could support a comma separated list instead:

environmentmap="envmap-x1.hdr, envmap-x2.hdr, envmap-y1.hdr, envmap-y2.hdr, envmap-z1.hdr, envmap-z2.hdr"

These are just a few ideas, perhaps there are other better ones as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions