You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to render some scenes to the desktop using a transparent window. This requires setting the alpha_mode to premultiplied in the CanvasContext.config() method.
I have added a flag in the wgpu glfw backend code with a line like this: glfw.window_hint(glfw.TRANSPARENT_FRAMEBUFFER, True).
However, the alpha_mode="premultiplied" setting in the CanvasContext.config() method still seems to be unavailable.
The capable_alpha_modes here are always ['opaque'].
ValueError: Given format 'premultiplied' is not in supported formats ['opaque', 'unpremultiplied']
Interestingly, it does support unpremultiplied? which is not in the CanvasAlphaMode enum.
I found gfx-rs/wgpu#3486 which relates to this issue. Following some links to referred issues suggests that others have similar issue. E.g. Appears to be an issue with wgpu not correctly detecting surface capabilities. SurfaceCapabilities::alpha_modes only contains Opaque on my machine, Windows 10, nvidia gpu.
I want to render some scenes to the desktop using a transparent window. This requires setting the
alpha_mode
topremultiplied
in theCanvasContext.config()
method.I have added a flag in the wgpu glfw backend code with a line like this:
glfw.window_hint(glfw.TRANSPARENT_FRAMEBUFFER, True)
.However, the
alpha_mode="premultiplied"
setting in theCanvasContext.config()
method still seems to be unavailable.The
capable_alpha_modes
here are always['opaque']
.wgpu-py/wgpu/backends/wgpu_native/_api.py
Lines 449 to 454 in 0cdef1d
Am I missing something? How can we get a canvas that supports
alpha_mode="premultiplied"
?The text was updated successfully, but these errors were encountered: