Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ToneMappingNode: Adhere to consistent capitalization #29091

Merged
merged 1 commit into from
Aug 8, 2024

Conversation

WestLangley
Copy link
Collaborator

Nomenclature differed from that of WebGLRenderer.

@WestLangley WestLangley added this to the r168 milestone Aug 8, 2024
Copy link

github-actions bot commented Aug 8, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
685.1 kB (169.6 kB) 685.1 kB (169.6 kB) +0 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
462 kB (111.5 kB) 462 kB (111.5 kB) +0 B
@WestLangley
Copy link
Collaborator Author

@sunag
@Mugen87

On a related note, the following line is never executed:

console.error( 'ToneMappingNode: Unsupported Tone Mapping configuration.', toneMapping );

due to

const toneMappingNode = toneMappingLib[ toneMapping ];

It defaults to NoToneMapping without warning.

Any suggestions as to the best way to fix this?

@sunag
Copy link
Collaborator

sunag commented Aug 8, 2024

On a related note, the following line is never executed:

I think this warning would help in case the user uses a new tonemapping on an older version of three.js.

@sunag sunag merged commit 232c6d8 into mrdoob:dev Aug 8, 2024
12 checks passed
@WestLangley
Copy link
Collaborator Author

@sunag I think the default value for toneMapping in the constructor prevents toneMappingNode from being undefined.

@WestLangley WestLangley deleted the dev-agx_cleanup branch August 9, 2024 00:05
@sunag
Copy link
Collaborator

sunag commented Aug 9, 2024

Oh right, this default value doesn't seem to make much sense, I think we can remove it.

@WestLangley
Copy link
Collaborator Author

@sunag OK. And one more question... is a custom tone mapping node with user-specified TSL supported for WebGPURenderer?

@sunag
Copy link
Collaborator

sunag commented Aug 9, 2024

@sunag OK. And one more question... is a custom tone mapping node with user-specified TSL supported for WebGPURenderer?

Yes, we had renderer.toneMappingNode but after PostProcessing it seemed better to remove it in order to simplifying the renderer, this could be implemented in PostProcessing via Fn() / Node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants