-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Closed
Labels
Milestone
Description
Description
In WebGL fallback, copyTextureToTexture
doesn't copy all layers of 3D render target textures.
I noticed the implementation of copyTextureToTexture
in WebGLBackend deviates from the one in WebGLRenderer. I can make a PR if those can be made the same (there are a couple of differences in the conditionals which I don't fully understand).
Reproduction steps
- Copy a 3D render target texture to another 3D render target texture using
copyTextureToTexture
in WebGL fallback.
Code
const rt1 = new RenderTarget3D(size, size, size)
// Draw the contents of "rt1"
const rt2 = new RenderTarget3D(size, size, size)
renderer.setRenderTarget(rt2)
void renderer.clear()
renderer.setRenderTarget(null)
renderer.copyTextureToTexture(
rt1.texture,
rt2.texture,
new Box3(new Vector3(), new Vector3().setScalar(size))
)
Live example
https://jsfiddle.net/shotamatsuda/xu8zs0g2/
Screenshots

Version
r179
Device
Desktop
Browser
Chrome
OS
MacOS
Mugen87