-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Closed
Copy link
Labels
Milestone
Description
Description
Copying a render target to a render target with copyTextureToTexture doesn't work with the WebGL fallback for WebGPURenderer, instead failing with the error "TypeError: Invalid value used as weak map key".
A quick log from chrome as jsfiddle doesn't exactly provide the best logging functionality
index.html:50 webgpu:
index.html:43 finished correctly
index.html:56 webgl:
index.html:61 TypeError: Invalid value used as weak map key
at WeakMap.set (<anonymous>)
at WebGLBackend.get (three.webgpu.js:59994:14)
at WebGLTextureUtils.copyTextureToTexture (three.webgpu.js:62629:41)
at WebGLBackend.copyTextureToTexture (three.webgpu.js:65685:21)
at WebGPURenderer.copyTextureToTexture (three.webgpu.js:56292:16)
at render (index.html:41:14)
at async init (index.html:57:5)
(anonymous) @ index.html:61
Promise.catch
(anonymous) @ index.html:60
Reproduction steps
- Create a WebGPURenderer with forceWebGL set to true
- Create 2 RenderTargets
- call copyTextureToTexture between the two RenderTargets
Code
const renderer = new WebGPURenderer({ forceWebGL: true });
await renderer.init();
const src = new RenderTarget(100, 100);
const dst = new RenderTarget(100, 100);
renderer.copyTextureToTexture(src.texture, dst.texture);Live example
Screenshots
No response
Version
r180 (also tried r170 but same issue)
Device
Desktop
Browser
Chrome
OS
Windows