Skip to content

Commit

Permalink
WebGPUBackend: BatchedMesh in WebGPU throw Error: reading "bytesPerEl…
Browse files Browse the repository at this point in the history
…ement" of null (mrdoob#29140)

Co-authored-by: wangziqian <wangziqian@fabu.ai>
  • Loading branch information
prince805962788 and wangziqian authored Aug 16, 2024
1 parent 769a82d commit e652a07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderers/webgpu/WebGPUBackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -955,7 +955,7 @@ class WebGPUBackend extends Backend {
const drawCount = object._multiDrawCount;
const drawInstances = object._multiDrawInstances;

const bytesPerElement = index.bytesPerElement || 1;
const bytesPerElement = hasIndex ? index.bytesPerElement : 1;

for ( let i = 0; i < drawCount; i ++ ) {

Expand Down

0 comments on commit e652a07

Please sign in to comment.