-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify rgb/srgb behavior #305
Conversation
This matches my understanding of what the base WebGL contexts are doing, and I'm strongly in favor of the color output being consistent between the 2D browser and immersive modes. |
@@ -908,6 +909,11 @@ section in the OpenGL ES 3.0 spec defines these limitations in more detail. | |||
|
|||
Allocation of the resources for layers (such as memory) MUST be done through the same mechanism as WebGL. | |||
|
|||
If an {{XRLayer}} is allocated with the {{RGBA}} or {{RGB}} {{XRLayerInit/colorFormat}}, its [=colorTextures=] MUST be exposed as {{RGBA}} or {{RGB}} to the {{WebGLRenderingContext}} context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add a note here that RGBA is the default, and this is equivalent to the behavior of using a XRWebGLLayer without the Layers extension (using its default alpha=true).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec already calls out that RGBA is the default where it's defining the initialization structures.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine to keep this as-is now that you've added a change to core WebXR. My intent had been to highlight that the Layers default acts the same as plain WebXR (which isn't obvious without the rather complicated context), but now both specs are consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, thank you!
@@ -908,6 +909,11 @@ section in the OpenGL ES 3.0 spec defines these limitations in more detail. | |||
|
|||
Allocation of the resources for layers (such as memory) MUST be done through the same mechanism as WebGL. | |||
|
|||
If an {{XRLayer}} is allocated with the {{RGBA}} or {{RGB}} {{XRLayerInit/colorFormat}}, its [=colorTextures=] MUST be exposed as {{RGBA}} or {{RGB}} to the {{WebGLRenderingContext}} context. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's fine to keep this as-is now that you've added a change to core WebXR. My intent had been to highlight that the Layers default acts the same as plain WebXR (which isn't obvious without the rather complicated context), but now both specs are consistent.
SHA: 6a896da Reason: push, by cabanier Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
cc @klausw
See draft spec at https://cabanier.github.io/layers/#xropaquetextures
addresses #988
Preview | Diff