File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Sources/Rendering/WebGPU/RenderWindow Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ function vtkWebGPURenderWindow(publicAPI, model) {
68
68
publicAPI . recreateSwapChain = ( ) => {
69
69
if ( model . context ) {
70
70
model . context . unconfigure ( ) ;
71
- const presentationFormat = model . context . getPreferredFormat (
71
+ const presentationFormat = navigator . gpu . getPreferredCanvasFormat (
72
72
model . adapter
73
73
) ;
74
74
@@ -77,8 +77,10 @@ function vtkWebGPURenderWindow(publicAPI, model) {
77
77
model . context . configure ( {
78
78
device : model . device . getHandle ( ) ,
79
79
format : presentationFormat ,
80
+ alphaMode : 'premultiplied' ,
80
81
usage : GPUTextureUsage . RENDER_ATTACHMENT | GPUTextureUsage . COPY_DST ,
81
- size : model . size ,
82
+ width : model . size [ 0 ] ,
83
+ height : model . size [ 1 ] ,
82
84
} ) ;
83
85
model . _configured = true ;
84
86
}
You can’t perform that action at this time.
0 commit comments