-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WebGPURenderer: Add copyTextureToTexture
support
#27888
WebGPURenderer: Add copyTextureToTexture
support
#27888
Conversation
This is impressive, thanks Renaud. The function was already available in WebGL. However, not in the backend but in three.js and three.module.js itself. But I'm particularly interested in the WebGPURenderer and I will study your extension carefully to get a better understanding. |
@Spiri0 It was available in the WebGLRenderer but not in the WebGL Backend of the WebGPURenderer which is different. It is not possible to use a method of the WebGL Renderer from the WebGPU Renderer. The WebGL Backend is a new backend fallback of the WebGPURenderer which allows you to seamlessly support your application even when WebGPU is not available (for example on Safari and Firefox). |
For webgpu, only the two additions in
are necessary, right?
My test class init:
I have a timeout before I call it to be sure that everything is initialized. I'm probably missing something there 🤔 |
Ah, that's exactly it. I understand. Since I created both textures as data textures, the dstTexture was not yet in the GPU due to the missing update. Now it's working |
copyTexturetoTexture
supportcopyTextureToTexture
support
Related issue: #27859
Description
This PR add
copyTextureToTexture
support on both WebGPU and WebGL backend.Live example:
https://raw.githack.com/renaudrohlinger/three.js/utsubo/feat/copytexturetotexture/examples/webgpu_materials_texture_partialupdate.html
This contribution is funded by Utsubo
/cc @Spiri0