-
-
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: Improve ArrayCamera
performance and fixes
#30313
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
Do you mind explain in more details why the current approach does not work with WebGPU? I'm afraid I don't understand yet. |
WebGPU does not update the buffer immediately to the GPU, at draw time, but it does so at submit time (end of pass), this explains why in the WebGPU version it is always the last value of the uniform that is being considered for all draws. |
|
Caching the indexes and changing their reference at draw time seems to be the best approach so far. It should theoretically work on WebGPU, but I still need to test it. Updating the |
ArrayCamera
performance
I would have to do the same array modification with the other camera nodes like |
Can't wait to test this with the new |
ArrayCamera
performanceArrayCamera
performance and fixes
It seems the demo There are no errors or warnings in the console. |
It's strange that the CI did not catch the breakage of The example did fail in #30335 though. |
It's broken after #30329 |
Related issue: #28968 (comment)
Description
As discussed before the
cameraViewMatrix
is updated through an uniform array, I'm afraid this won't work on WebGPU because the process is executed at the end of the pass, this may make it difficult to update the index as imagined, so I'm not sure if this will perform well, what I'll try is to do it using an instances approach later. The example work in WebGL as expected.The PR fix
cameraViewMatrix
of its subcameras, only the viewport were updated.