Skip to content
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

Merged
merged 2 commits into from
Feb 10, 2024
Merged

Clarify rgb/srgb behavior #305

merged 2 commits into from
Feb 10, 2024

Conversation

cabanier
Copy link
Member

@cabanier cabanier commented Feb 8, 2024

@cabanier cabanier requested a review from toji February 8, 2024 17:40
@toji
Copy link
Member

toji commented Feb 8, 2024

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.
Copy link

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).

Copy link
Member Author

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.

Copy link

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.

Copy link

@klausw klausw left a 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.
Copy link

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.

webxrlayers-1.bs Outdated Show resolved Hide resolved
@cabanier cabanier requested a review from klausw February 9, 2024 03:43
@cabanier cabanier merged commit 6a896da into immersive-web:main Feb 10, 2024
2 checks passed
@cabanier cabanier deleted the srgb branch February 10, 2024 02:45
github-actions bot added a commit that referenced this pull request Feb 10, 2024
SHA: 6a896da
Reason: push, by cabanier

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants