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

Use transparency in helloTriangle*, remove alphaMode on rest #452

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

kainino0x
Copy link
Collaborator

@kainino0x kainino0x commented Oct 1, 2024

None of the samples used transparent canvases, so they shouldn't set alphaMode.
We should demonstrate transparent canvases though, so I made the two helloTriangle samples do that.

Technically opaque canvases force an alpha clear on Mac, but probably we should stick to the spec default. Someday maybe we can do something about that alpha clear.

None of the samples used transparent canvases, so they shouldn't set
alphaMode.
@kainino0x kainino0x requested a review from toji October 1, 2024 19:06
Copy link
Contributor

@toji toji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea to take the alphaMode off of the majority of the samples, but I feel like we could use a slightly better demonstration of transparent canvases than the hello triangles? As-is it would be difficult to tell that they are transparent vs. simply clearing to a color that matches the background.

I'd prefer to have a sample that shows some DOM content (even just simple text) behind the canvas. Happy to help build it!

In the meantime, I think this can land as-is.

@toji toji merged commit e58706a into webgpu:main Oct 1, 2024
1 check passed
@kainino0x kainino0x deleted the alphamode branch October 1, 2024 20:57
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.

2 participants