Skip to content

Commit 6e55062

Browse files
Mugen87mrdoob
authored andcommitted
Texture: Set needsUpdate to true in copy(). (#23637)
* Texture: Set needsUpdate to true in copy(). * Fix WebGLMultipleRenderTargets.
1 parent b57c659 commit 6e55062

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

src/renderers/WebGLMultipleRenderTargets.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class WebGLMultipleRenderTargets extends WebGLRenderTarget {
1313
for ( let i = 0; i < count; i ++ ) {
1414

1515
this.texture[ i ] = texture.clone();
16+
this.texture[ i ].isRenderTargetTexture = true;
1617

1718
}
1819

src/renderers/webgl/WebGLTextures.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
426426

427427
if ( texture.isVideoTexture ) updateVideoTexture( texture );
428428

429-
if ( texture.version > 0 && textureProperties.__version !== texture.version ) {
429+
if ( texture.isRenderTargetTexture === false && texture.version > 0 && textureProperties.__version !== texture.version ) {
430430

431431
const image = texture.image;
432432

src/textures/Texture.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ class Texture extends EventDispatcher {
136136

137137
this.userData = JSON.parse( JSON.stringify( source.userData ) );
138138

139+
this.needsUpdate = true;
140+
139141
return this;
140142

141143
}

0 commit comments

Comments
 (0)