Open gkjohnson opened 2 weeks ago
To clarify we need this feature for the WebGL backend in WebGPURenderer
as well. TRAAPassNode
produces the same warning as above when running with a WebGL backend.
WebGPURenderer
handles the copy between render targets already correctly for the WebGPU backend though.
Thanks for the addition @Mugen87 - and somewhat related but I would also like to to be able to copy data between layers of 3d textures and 2d textures. eg when populating a 3d array target you must upload the 2d texture, render it to the 3d array texture layer with a full screen pass, then dispose of the original 2d texture. It would be better to just be able to block copy the data into the 3d texture layer.
The API design for this isn't super clear, though. And again, I'm not sure which specific WebGL calls are needed for this. I can make a new issue once https://github.com/mrdoob/three.js/pull/29662 is merged, as well.
Description
Currently when calling
copyTextureToTexture
with two render target textures you get the following warning. I'm not sure if this is a limitation of the underlying WebGL APIs or if this is possible to achieve if we change something about the function:Repro code:
Solution
Adjust underlying function implementation to support copying data between render target textures for 2d and 3d textures.
Alternatives
Use a custom
FullScreenPass
method for copying data.Additional context
No response