Skip to content

Commit

Permalink
[Fix] WebGPU mesh rendering uses primitive.base correctly (#6093)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Valigursky <[email protected]>
  • Loading branch information
mvaligursky and Martin Valigursky authored Feb 26, 2024
1 parent c10bb48 commit 7ad8078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/platform/graphics/webgpu/webgpu-graphics-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,9 @@ class WebgpuGraphicsDevice extends GraphicsDevice {
if (ib) {
this.indexBuffer = null;
passEncoder.setIndexBuffer(ib.impl.buffer, ib.impl.format);
passEncoder.drawIndexed(primitive.count, numInstances, 0, 0, 0);
passEncoder.drawIndexed(primitive.count, numInstances, primitive.base, 0, 0);
} else {
passEncoder.draw(primitive.count, numInstances, 0, 0);
passEncoder.draw(primitive.count, numInstances, primitive.base, 0);
}

WebgpuDebug.end(this, {
Expand Down

0 comments on commit 7ad8078

Please sign in to comment.