-
-
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: Instancing #23835
WebGPU: Instancing #23835
Conversation
@mrdoob What do you think about the Skinning example? it doesn't follow the API exactly but it might be useful? |
|
||
child.material = new Nodes.MeshStandardNodeMaterial(); | ||
|
||
child.isInstancedMesh = true; |
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.
Well, this is more or less a workaround until we figure out a better way to combine skinning + instancing. For now, I think it's okay.
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.
Well, this is more or less a workaround until we figure out a better way to combine skinning + instancing. For now, I think it's okay.
What do you think about an API like this?
const instanceCount = 10;
const instancedObj3d = new InstanceObject3D( mesh || sprite3d || skinnedMesh, instanceCount );
scene.add( instancedObj3d );
* WebGPU: instancing support * add instancing examples * update thumbnails * cleanup * cleanup * use native inverseSqrt
Description
Adding support to instancing and improvements in
Matrix*Node
andBufferNode
ofNodeMaterial
.Examples:
Mesh
https://raw.githack.com/sunag/three.js/dev-instance/examples/webgpu_instance_mesh.html
Skinning
( sharing the same Skeleton & animation )https://raw.githack.com/sunag/three.js/dev-instance/examples/webgpu_skinning_instancing.html
This contribution is funded by Google via Igalia.