Skip to content
Closed
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
8 changes: 8 additions & 0 deletions src/renderers/common/Renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,14 @@ class Renderer {
*/
this._frameBufferTargets = new Map();

/**
* Intermediate color texture last used for the output pass.
*
* @private
* @type {?Texture}
*/
this._lastOutputFramebufferTexture = null;

const alphaClear = this.alpha === true ? 0 : 1;

/**
Expand Down
3 changes: 3 additions & 0 deletions src/renderers/common/nodes/NodeManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,8 @@ class NodeManager extends DataMap {
*/
hasOutputChange( outputTarget ) {

if ( this.renderer._lastOutputFramebufferTexture !== outputTarget ) return true;

const cacheKey = _outputNodeMap.get( outputTarget );

return cacheKey !== this.getOutputCacheKey();
Expand All @@ -886,6 +888,7 @@ class NodeManager extends DataMap {
texture( outputTarget, screenUV ).renderOutput( renderer.toneMapping, renderer.currentColorSpace );

_outputNodeMap.set( outputTarget, cacheKey );
renderer._lastOutputFramebufferTexture = outputTarget;

return output;

Expand Down