-
-
Notifications
You must be signed in to change notification settings - Fork 36.2k
WebGPURenderer: Introduce compileComputeAsync() #32551
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
base: dev
Are you sure you want to change the base?
WebGPURenderer: Introduce compileComputeAsync() #32551
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
src/renderers/common/Renderer.js
Outdated
|
|
||
| function reportProgress() { | ||
|
|
||
| if ( onProgress !== null ) onProgress( compilationDone / compilationTotal * 100 ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this calculation should be done on the user side. Maybe we could use ProgressEvent() to follow the pattern used in Loader?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the PR with the ProgressEvent()pattern!
Description
Same logic as
compileAsync(),compileComputeAsync()Prevent freeze in runtime.Example usage:
Before:

After:

Also added a basic
onProgresscallback for bothcompileandcompileCompute:This contribution is funded by Utsubo && Three.js Blocks