From 7ad80781e7556bbe313731f8b39d5591feb7ecbe Mon Sep 17 00:00:00 2001 From: Martin Valigursky <59932779+mvaligursky@users.noreply.github.com> Date: Mon, 26 Feb 2024 16:51:37 +0000 Subject: [PATCH] [Fix] WebGPU mesh rendering uses primitive.base correctly (#6093) Co-authored-by: Martin Valigursky --- src/platform/graphics/webgpu/webgpu-graphics-device.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/graphics/webgpu/webgpu-graphics-device.js b/src/platform/graphics/webgpu/webgpu-graphics-device.js index 4346064f3e7..0f5461db091 100644 --- a/src/platform/graphics/webgpu/webgpu-graphics-device.js +++ b/src/platform/graphics/webgpu/webgpu-graphics-device.js @@ -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, {