parasyte / pixels

A tiny hardware-accelerated pixel frame buffer. 🦀
https://docs.rs/pixels
MIT License
1.82k stars 123 forks source link

Transparent windows don't work due to hardcoded alpha mode #370

Open analog-hors opened 1 year ago

analog-hors commented 1 year ago

This is more or less the same as #274, which I believe was falsely closed. When that issue was filed, CompositeAlphaMode was not yet exposed in wgpu, which meant that pixels could not configure it to make transparent windows work. #274 was then closed when the upstream wgpu issue was resolved. However, pixels was never actually updated to use the now-exposed CompositeAlphaMode API, and it is still hardcoded to use the first one (which appears to be Opaque all the time): https://github.com/parasyte/pixels/blob/d140eba7c9849372a6673b0d37bfe83948c4e530/src/builder.rs#L322

Therefore, the issue with transparency still persists.

parasyte commented 1 year ago

I'll accept a PR to allow setting the alpha mode in the builder.

parasyte commented 9 months ago

See also #274: wgpu still only supports opaque surfaces, at least on Windows 11/Nvidia.