|
@@ -2,7 +2,7 @@
|
|
|
import 'https://greggman.github.io/webgpu-avoid-redundant-state-setting/webgpu-check-redundant-state-setting.js';
|
|
|
//*/
|
|
|
|
|
|
-import { GPUFeatureName, GPUTextureFormat, GPULoadOp, GPUStoreOp, GPUIndexFormat, GPUTextureViewDimension } from './utils/WebGPUConstants.js';
|
|
|
+import { GPUFeatureName, GPULoadOp, GPUStoreOp, GPUIndexFormat, GPUTextureViewDimension } from './utils/WebGPUConstants.js';
|
|
|
|
|
|
import WGSLNodeBuilder from './nodes/WGSLNodeBuilder.js';
|
|
|
import Backend from '../common/Backend.js';
|
|
@@ -110,7 +110,7 @@ class WebGPUBackend extends Backend {
|
|
|
|
|
|
this.context.configure( {
|
|
|
device: this.device,
|
|
|
- format: GPUTextureFormat.BGRA8Unorm,
|
|
|
+ format: navigator.gpu.getPreferredCanvasFormat(),
|
|
|
usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_SRC,
|
|
|
alphaMode: alphaMode
|
|
|
} );
|