-
-
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: implement compileAsync() #27098
Conversation
9893d36
to
2ec5d83
Compare
Looks good to me. In the I will let you decide if we merge this one or not as it affects the WebGPU side @sunag. |
I think that since |
05c314a
to
07592e7
Compare
@RenaudRohlinger I Overwrote you commit by mistake, To you want to re add. |
@aardgoose if I remember correctly the only difference was that I replaced: async compile( /*scene, camera, targetScene = null */ ) {
console.warn( 'THREE.Renderer: .compile() is not implemented yet.' );
} to: get compile() { // @deprecated, r170
console.warn( 'THREE.WebGPURenderer: The property .compile has been deprecated. Use .compileAsync instead.' );
return this.compileAsync;
} In order to follow the best practice of the repo. Are we good regarding the comment of @sunag? |
07592e7
to
4edb5ca
Compare
I restored the commits, I ended up saving because of a small correction I made. Let's merge :) |
@@ -47,6 +47,7 @@ class WebGLBackend extends Backend { | |||
this.discard = false; | |||
|
|||
this.extensions.get( 'EXT_color_buffer_float' ); | |||
this.parallel = this.extensions.get( 'KHR_parallel_shader_compile' ); |
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 don't really like that we are introducing a new property just to get a constant... Maybe at least mark it private?
|
||
get compute() { | ||
|
||
return this.computeAsync; | ||
console.warn( 'THREE.Renderer: compile() is deprecated and will be removed in r170, use compileAsync instead.' ); // @deprecated, r170 |
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 see that all other non-async methods just point to their async counterparts, why should we deprecate this one? /ping @sunag @aardgoose @RenaudRohlinger
Add
compileAsync( scene, camera )
for WebGPU and WebGL backends.With WebGL the
KHR_parallel_shader_compile
extension is used if available.Added to webgpu_occlusion example to test/demonstrate use.
Note: targetScene support to be added