8000 Fix WebGLRenderTarget.copy (#23997) · robinboot/three.js@680ccc5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 680ccc5

Browse files
authored
Fix WebGLRenderTarget.copy (mrdoob#23997)
1 parent 8d3a5fe commit 680ccc5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/renderers/WebGLRenderTarget.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { EventDispatcher } from '../core/EventDispatcher.js';
22
import { Texture } from '../textures/Texture.js';
33
import { LinearFilter } from '../constants.js';
44
import { Vector4 } from '../math/Vector4.js';
5+
import { Source } from '../textures/Source.js';
56

67
/*
78
In options, we can specify:
@@ -82,7 +83,8 @@ class WebGLRenderTarget extends EventDispatcher {
8283

8384
// ensure image object is not shared, see #20328
8485

85-
this.texture.image = Object.assign( {}, source.texture.image );
86+
const image = Object.assign( {}, source.texture.image );
87+
this.texture.source = new Source( image );
8688

8789
this.depthBuffer = source.depthBuffer;
8890
this.stencilBuffer = source.stencilBuffer;

0 commit comments

Comments
 (0)
0