|
context.getConfiguration().toneMapping.mode !== 'extended' |
The spec says
This spec requires supporting HDR via the toneMapping option. If a user agent only supports toneMapping: "standard", then the toneMapping member should not exist in GPUCanvasConfiguration, so it will not exist on the object returned by getConfiguration() and will not be accessed by configure()). This allows websites to detect feature support.
This means the code above will get
Cannot read properties of undefined (reading 'mode')
on browsers that don't support this.
webgpu-samples/sample/particles/main.ts
Line 351 in 586b141
The spec says
This means the code above will get
on browsers that don't support this.