Skip to content

Commit d235cb6

Browse files
authored
Fix toneMapping reference (#455)
AFAICT, the spec requires toneMapping period. Even if the browser doesn't support toneMapping.mode = 'extended' it requires it still requires it to exist. It will just be set to `'standard'` if the implementation does not support `'extended'`. The only other case is when the canvas has not been configured in which case `getConfiguration` returns undefined. Both `getConfiguration` and `toneMapping` were added to the spec close enough that any implemetation that supports `getConfiguration` should be requried to include `toneMapping`.
1 parent 16dd65c commit d235cb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sample/particles/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ function getHdrFolderName() {
355355
}
356356
if (
357357
simulationParams.toneMappingMode === 'extended' &&
358-
context.getConfiguration().toneMapping?.mode !== 'extended'
358+
context.getConfiguration().toneMapping.mode !== 'extended'
359359
) {
360360
return "HDR settings ⚠️ Browser doesn't support HDR canvas";
361361
}

0 commit comments

Comments
 (0)