Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions examples/jsm/renderers/common/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,12 @@ class Renderer {

}

getRenderTarget() {

return this._renderTarget;

}

async compute( computeNodes ) {

if ( this._initialized === false ) await this.init();
Expand Down Expand Up @@ -650,12 +656,6 @@ class Renderer {

}

getRenderTarget() {

return this._renderTarget;

}

hasFeature( name ) {

return this.backend.hasFeature( name );
Expand Down
13 changes: 12 additions & 1 deletion examples/jsm/renderers/common/nodes/Nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class Nodes extends DataMap {

getToneMappingNode() {

if ( this.isToneMappingState === false ) return null;

return this.renderer.toneMappingNode || this.get( this.renderer ).toneMappingNode || null;

}
Expand Down Expand Up @@ -107,13 +109,22 @@ class Nodes extends DataMap {

}

get isToneMappingState() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe applyToneMapping?


const renderer = this.renderer;
const renderTarget = renderer.getRenderTarget();

return renderTarget && renderTarget.isCubeRenderTarget ? false : true;
Copy link
Contributor

Choose a reason for hiding this comment

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

Just ! renderTarget || ! renderTarget.isCubeRenderTarget maybe?


}

updateToneMapping() {

const renderer = this.renderer;
const rendererData = this.get( renderer );
const rendererToneMapping = renderer.toneMapping;

if ( rendererToneMapping !== NoToneMapping ) {
if ( this.isToneMappingState && rendererToneMapping !== NoToneMapping ) {

if ( rendererData.toneMapping !== rendererToneMapping ) {

Expand Down