WebGPU: inactive morph target shrinks mesh to vertex 0

Hello. I created a mesh with a few inactive (influence=0) morph targets, and noticed the inactive ones caused the mesh to shrink to the first vertex position in the morph target data. This only happens in WebGPU engine, not WebGL or WebGL2.

Demo: https://playground.babylonjs.com/?webgpu#YUH30X. The observed result is blank because the mesh shrinks to a single point. The expected result can be seen if you remove the inactive morph target.

Testing environment:

  • Windows 10 Home 21H2 19044.2728
  • Chrome 113.0.5672.93 (64-bit)
  • Babylon.js 6.3.1 (WebGPU)

This PR will fix the problem:

1 Like