engine
engine copied to clipboard
Add support baseVertex for GPURenderPassEncoder
Hi!
It would be nice to have baseVertex support for the mesh.
https://developer.mozilla.org/en-US/docs/Web/API/GPURenderPassEncoder/drawIndexed
https://github.com/playcanvas/engine/blob/03920ded44f6cee81ab16a904551b8b1ddecaeb5/src/platform/graphics/webgpu/webgpu-graphics-device.js#L521
https://github.com/playcanvas/engine/blob/03920ded44f6cee81ab16a904551b8b1ddecaeb5/src/scene/mesh.js#L256
WebGL 2 adds support for this using WEBGL_draw_instanced_base_vertex_base_instance but its support seems to be very low (less than 1%) here https://web3dsurvey.com/webgl2
WebGL 2 adds support for this using WEBGL_draw_instanced_base_vertex_base_instance but its support seems to be very low (less than 1%) here https://web3dsurvey.com/webgl2
If you focus on chromium-like browsers, they have support; this greatly speeds up the work with indexes, for example for the LOD system.
I see this:
My MacOS on latest Chrome does not expose this extension.
What data do you see?
Sorry, I'm talking about webGPU support.
https://developer.mozilla.org/en-US/docs/Web/API/GPURenderBundleEncoder/drawIndexed#browser_compatibility
Closed https://github.com/playcanvas/engine/pull/6977
this needs to stay open till the implementation is merged in.