immersive-web / layers

A feature repo for working on multi-layer support in WebXR. Feature leads: Rik Cabanier and Artem Bolgar (Oculus)

Home Page:https://immersive-web.github.io/layers/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When projection layers are created, they use the current number of views

asajeffrey opened this issue · comments

In https://immersive-web.github.io/layers/#allocate-color-textures-for-projection-layers, the algorithm for allocating textures for projection layers says "Let numViews be the number of the session’s list of views..." and allocates that many textures. But over in https://immersive-web.github.io/webxr/#update-the-viewports, there is text for "When the list of views changes", which implies the list of views may change over time.

Yes, PR #176 fixes this.
Can you take a look to make sure I didn't miss something?

I don't see how that language copes with the list of views changing?

I don't see how that language copes with the list of views changing?

yes, that seems problematic. I made these changes assumes that the list of exposed XRViews would change but not the list of views.
@Manishearth, how can we allocate texture if we can't be sure about the maximum number of views?

Yeah so in the current spec situation the "list of views" is a mutable quantity. There is a "list of viewports" which isn't. I could introduce a concept of active views, or a separate "list of possible views" list.

Note that you can be sure of the maximum number of views already: the list of viewports language mentions that it is for all possible views that may be exposed. I'll fix this up a bit

Yeah so in the current spec situation the "list of views" is a mutable quantity. There is a "list of viewports" which isn't. I could introduce a concept of active views, or a separate "list of possible views" list.

The layers spec calculates the viewports from the list of views.

Note that you can be sure of the maximum number of views already: the list of viewports language mentions that it is for all possible views that may be exposed. I'll fix this up a bit

ok. I'll make a similar change

Note that you can be sure of the maximum number of views already: the list of viewports language mentions that it is for all possible views that may be exposed. I'll fix this up a bit

ok. I'll make a similar change

Having to add that the {{XRSession}} may expose everywhereI I use list of views is a bit verbose.
Can you define the concept in the WebXR spec instead?

Yes I'm about to do that. I'll introduce a concept of active view and mandate that the full list of views be immutable

@Manishearth's PR makes it so we don't have to change the layers spec. Closing.