WebGPURenderer: Improve RenderObject grouping - WIP
#32243
Draft
+339
−198
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related issue: #30560 (comment), #30560 (comment), #26673 (comment)
Description
This is a WIP.
The basic idea is to group the
RenderObjectso that we can handle similar objects.Today we have a lot of redundant calls between similar objects in the rendering call that could be resolved in just one
Backend.draw().Improve
RenderObjectgroupingobject.morphTargetInfluencesandobject.countforfilterObjects,RenderObjects.getandRenderObject.getChainArray().RenderObject.instancesand leave onlyRenderObject.objectsCreate shared buffer
bufferclass designed to couple multiple uniforms.modelWorldMatrix.buffernode is not being shared properly when shared with other materials, causing the buffer to be updated more than once in the same render call. WebGPURenderer: Improve cache bindings from node uniforms #32244bufferdoes not have an integratedupdateRangesrange, which can be a problem if used in conjunction withinstancessinceInstanceNodedoes not distinguish it with an attribute. WebGPURenderer: Add update ranges for bindings #32248three.js/src/nodes/accessors/InstanceNode.js
Lines 120 to 126 in 8173be8