Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
|
|
||
| import * as THREE from 'three/webgpu'; | ||
| import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; | ||
| import { texture, uv, userData, fog, rangeFogFactor, color, context } from 'three/tsl'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
| } );*/ | ||
| document.body.appendChild( renderer.domElement ); | ||
|
|
||
| const controls = new OrbitControls( camera, renderer.domElement ); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
| for ( let i = 0, l = group.children.length; i < l; i ++ ) { | ||
|
|
||
| const sprite = group.children[ i ]; | ||
| const scale = Math.sin( time + sprite.position.x * 0.01 ) * 0.3 + 1.0; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
|
||
| import * as THREE from 'three/webgpu'; | ||
| import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; | ||
| import { texture, uv, userData, fog, rangeFogFactor, color, context } from 'three/tsl'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
| } );*/ | ||
| document.body.appendChild( renderer.domElement ); | ||
|
|
||
| const controls = new OrbitControls( camera, renderer.domElement ); |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
| for ( let i = 0, l = group.children.length; i < l; i ++ ) { | ||
|
|
||
| const sprite = group.children[ i ]; | ||
| const scale = Math.sin( time + sprite.position.x * 0.01 ) * 0.3 + 1.0; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
There's a thing that's been blocking this PR in a way. When we create a Material on a new object, it will create a shader, but if we modify the same material and use it on a new object, we'll have two different types of materials. This characteristic was useful when we used shadow resource nodes in three.js/src/renderers/common/Renderer.js Lines 3215 to 3233 in ccd2e6d Does anyone use it this way? If necessary, I can create an example to demonstrate this. |
|
I just know that the code snippet from your last post is required to get shadows work. If we can't do that anymore, we need a replacement in any event. |
| <script type="module"> | ||
|
|
||
| import * as THREE from 'three/webgpu'; | ||
| import { texture, uv, userData, fog, rangeFogFactor, color } from 'three/tsl'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
|
||
| let camera, scene, renderer; | ||
|
|
||
| let map; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
|
||
| let map; | ||
|
|
||
| let group; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
|
||
| let group; | ||
|
|
||
| let imageWidth = 1, imageHeight = 1; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
|
|
||
| let group; | ||
|
|
||
| let imageWidth = 1, imageHeight = 1; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note
🖼️ E2E screenshot tests❌ 17 example(s) failed (full artifacts). …and 7 more: |

































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.modelWorldMatrixandmodelNormalMatrix.objectIndexmediumpModelWorldMatrixmediumpModelNormalMatrixbuffernode 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