Skip to content

Multiview over non-contiguous array texture slices #8352

@inner-daemons

Description

@inner-daemons

Is your feature request related to a problem? Please describe.
All of DX12, vulkan, and metal allow multiview to be used over non-contiguous texture slices. For example, if you are rendering to the faces of a cube, certain objects might be rendered to 2 opposite faces and no others. Different render passes/pipelines would be used for different configurations. However, the behavior here differs across platforms:

  • Vulkan's view_index builtin and DX12's SV_ViewID both use the texture slice index, i.e. if you render to slice 0 and slice 3, you will get indices 0 and 3
  • Metal's amplification_id uses the index in the textures used, i.e. if you render to slice 0 and slice 3, you will get indices 0 and 1
  • I'm not sure what OpenGL/GLES/WebGL's OVR_multiview2 extension does here, or if it even allows non-contiguous multiview.

This is a strange and not particularly useful feature, but it might be good to expose it since many of the backends do and it has certain use cases.

It might be useful to expose a feature for MULTIVIEW_NONCONTIGUOUS or something similar that allows non-contiguous multiview stuff with the vulkan/dx12 behavior. We could look at polyfilling on metal, and investigate if this is possible on GL.

Describe the solution you'd like
Unsure, this is more of a question

Describe alternatives you've considered
Not support non-contiguous multiview. This is likely what the web will go with anyway, but I think if we can we should support this on native.

Additional context
#8206 is relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions