Skip to content

Conversation

uael
Copy link
Contributor

@uael uael commented Jul 23, 2025

Description
CompositeAlphaMode::PreMultiplied was missing in WebGPU and GLES supported alpha_modes

Testing
Manually for both Android (GLES) and the Web (WebGL and WebGPU)

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@uael uael requested a review from a team as a code owner July 23, 2025 07:46
@cwfitzgerald
Copy link
Member

@grovesNL I'm going away on vacation, could you take a look at this if you have some time?

Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

WebGPU is fine, concern about GL

Comment on lines +1235 to +1238
composite_alpha_modes: vec![
wgt::CompositeAlphaMode::Opaque,
wgt::CompositeAlphaMode::PreMultiplied,
], //TODO
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is right - without telling this to the runtime at all we can't know if these modes are actually supported. I'm not sure how this works with the various platforms, but I don't think we can just change it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It look like premultipliedAlpha is set to true by default https://registry.khronos.org/webgl/specs/latest/1.0/#5.2 and we do not seem to change it

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