Skip to content

Set WebAssembly window background transparent

Michael Migliore requested to merge michael.migliore/vtk:wasm-alpha into master

Rendering a WebGL view that blends with the HTML background is common practice and makes great web app integration (see video below).
This MR makes the WebGL view handle the alpha channel if pixels are not completely opaque.
If the user wants to see the background, it's their responsibility to make sure the background is opaque.
The premultipliedAlpha option is disabled to have a correct blending result.

bandicam_2024-06-04_09-47-43-006

Edited by Michael Migliore

Merge request reports