immersive-web / webxr-ar-module

Repository for the WebXR Augmented Reality Module

Home Page:https://immersive-web.github.io/webxr-ar-module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rationalize CSS environment-blending and WebXR XREnvironmentBlendMode

NellWaliczek opened this issue · comments

Per the F2F yesterday, it was called out that there are two properties on the web now that both refer to environment blending. This issue tracks asking @rcabanier, @thetuvix, @toji to sync up and make sure that the two properties have been rationalized such that the naming and intention is consistent where needed. Opaque and Additive seem likely to be fine, but let's get a double check on 'subtractive' and 'alpha-blend'

CSS add a property for 'environment-blending' to CSS with the following values:
Name: environment-blending Value: opaque | additive | subtractive
w3c/csswg-drafts#2723
w3c/csswg-drafts#2719

There is also the XREnvironmmentBlendMode
enum XREnvironmentBlendMode { "opaque", "additive", "alpha-blend", };
immersive-web/webxr#366
immersive-web/webxr#145

'subtractive' was proposed by @kearwood in w3c/csswg-drafts#2719 (comment)
I'm unsure if there is browser interest in implementing this. If a UA implements this type of display, it seems reasonable that XREnvironmmentBlendMode also supports it.

Does it make sense for environment-blending to support alpha-blend?
How does the page know that the backdrop is a window to the real world?

We've been running with this model for a while; subtractive is unlikely to be useful, and everything else is already aligned.