Skip to content

Commit

Permalink
Fix toneMapping reference
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
greggman committed Oct 2, 2024
1 parent 1e05ae9 commit 2966dbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sample/particles/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ function getHdrFolderName() {
}
if (
simulationParams.toneMappingMode === 'extended' &&
context.getConfiguration().toneMapping?.mode !== 'extended'
context.getConfiguration().toneMapping.mode !== 'extended'
) {
return "HDR settings ⚠️ Browser doesn't support HDR canvas";
}
Expand Down

0 comments on commit 2966dbc

Please sign in to comment.