-
-
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
WebGPU & NodeMaterial: ComputeNode #23905
Conversation
That's amazing!!! I think that after this PR will be merged and the PixelNode would be added, I would make a PR to add to |
|
||
return `${ this.getSignature() } | ||
// system | ||
var<private> instanceIndex : u32; |
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 it is better not to hardcode instanceIndex
here, but rather use global_invocation_id
and similar things (I think something like InvocationIDNode should be created for them).
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 like that we have a single node for use common of "call index", but surely we can have both.
this.dispatchCount = dispatchCount; | ||
this.workgroupSize = workgroupSize; | ||
|
||
this.computeNode = null; |
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 can be an argument in the constructor?
* add ComputeNode * fix float function parameters, support to void function * add StorageBufferNode * add compute(), timer(), compute(), storage() and func() elements * WebGPU: add StorageBufferNode and ComputeNode support and cleanup * update webgpu_compute example * cleanup * fix ToneMappingNode in non-physical material * fixes and cleanup * fixes and ignore tonemapping in non physical material * update snapshots
Description
We are very close to having a robust particle system native of Three.js made in
GPGPU
.WebGPU
compute feature is amazing, the only problem so far was the 16-bit limitation.WebGPU & NodeMaterial
ComputeNode
andStorageBufferNode
webgpu_compute
exampleShaderNode
compute( dispatchCount )
⇒ ( dispatchCount = particlesCount )timer( timeScale )
storage( bufferAttribute )
func( code )
⇒ code is a GLSL or WGSL function codeCreating and calling a WGSL function
See more in this example code
This contribution is funded by Google via Igalia