|
|
@@ -955,14 +955,14 @@ class WebGPUBackend extends Backend {
|
|
|
const drawCount = object._multiDrawCount;
|
|
|
const drawInstances = object._multiDrawInstances;
|
|
|
|
|
|
- const bytesPerElement = hasIndex ? index.bytesPerElement : 1;
|
|
|
+ const bytesPerElement = hasIndex ? index.array.BYTES_PER_ELEMENT : 1;
|
|
|
|
|
|
for ( let i = 0; i < drawCount; i ++ ) {
|
|
|
|
|
|
const count = drawInstances ? drawInstances[ i ] : 1;
|
|
|
const firstInstance = count > 1 ? 0 : i;
|
|
|
|
|
|
- passEncoderGPU.drawIndexed( counts[ i ] / bytesPerElement, count, starts[ i ] / 4, 0, firstInstance );
|
|
|
+ passEncoderGPU.drawIndexed( counts[ i ], count, starts[ i ] / bytesPerElement, 0, firstInstance );
|
|
|
|
|
|
}
|
|
|
|