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

Docs: Improve Material page. #27923

Merged
merged 1 commit into from
Mar 16, 2024
Merged

Docs: Improve Material page. #27923

merged 1 commit into from
Mar 16, 2024

Conversation

atul-mourya
Copy link
Contributor

Clarification on the Tonemapped Property

Description

After observing some confusion, including my own experiences, regarding the behavior of tonemapping following the r154 update, particularly among users accustomed to utilizing effect composers for post-processing, I have taken steps to enhance the clarity of the documentation pertaining to the tonemapped property.

This update includes additional insights aimed at providing further assistance to readers encountering similar challenges.

Made tonemapped property a bit more informative.
@atul-mourya atul-mourya changed the title a bit more info for tonemap property Material.html a bit more info for tonemapped property in Material.html Mar 15, 2024
@Mugen87 Mugen87 added this to the r163 milestone Mar 15, 2024
@donmccurdy
Copy link
Collaborator

donmccurdy commented Mar 15, 2024

I do see what you mean, but in another sense, the setting is very much not ignored by post-processing:

render( renderer, writeBuffer, readBuffer/*, deltaTime, maskActive */ ) {
this.uniforms[ 'tDiffuse' ].value = readBuffer.texture;
this.uniforms[ 'toneMappingExposure' ].value = renderer.toneMappingExposure;
// rebuild defines if required
if ( this._outputColorSpace !== renderer.outputColorSpace || this._toneMapping !== renderer.toneMapping ) {
this._outputColorSpace = renderer.outputColorSpace;
this._toneMapping = renderer.toneMapping;

Perhaps we say something like ...

Ignored when rendering to a render target, but may be applied in post-processing by using THREE.OutputPass.

@Mugen87
Copy link
Collaborator

Mugen87 commented Mar 15, 2024

but may be applied in post-processing by using THREE.OutputPass.

OutputPass applies tone mapping to the entire image and can't evaluate the material property anymore (or in other words the pass can't distinct between tone-mapped and non-tone-mapped objects).

Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! Sorry, was thinking of renderer.toneMapping, I should have read this more carefully. Looks good to me, thank you @atul-mourya!

@Mugen87 Mugen87 merged commit fbe0a48 into mrdoob:dev Mar 16, 2024
3 checks passed
@Mugen87 Mugen87 changed the title a bit more info for tonemapped property in Material.html Docs: Improve Material page. Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants