Compute bones using shader causes weird shadow

Checkout this playground https://playground.babylonjs.com/#AQB0DM#10


“Compute bones using shader” creates shadows with a very strange shape, I can’t turn it off because it will cause a heavy fps drop. When I import this model into Blender and re-export, this shape disappears, but I still want to know the reason, is this a bug?

CC @mrlooi

Not sure if this is expected, but changing the shadow generator params do work.

The issue here is that using the shader and the CPU are not producing the same results.

CC @sebavan

The problem is that some weights for some vertices are not normalized (their sum is not equal to 1). Loading / saving in Blender fixed it probably because Blender normalizes the weights before saving.

You can normalize the weights yourself at runtime if you want:

3 Likes