Unity-Technologies / Animation-Instancing

This technique is designed to instance Characters(SkinnedMeshRender).
Other
1.63k stars 296 forks source link

Sampling problem for interpolating animations #118

Open bbccyy opened 1 year ago

bbccyy commented 1 year ago

Switching between different anim-clips involves in animation interpolation, there will be sampling requests among different animation-info blocks during shader's vertex stage. By reconstructing pre-anim and cur-anim frame state and appling interpolation based on transition progress, we get animation transition properly. However this could be true only if the two anim-infos were packed within the same boneTexture, otherwise we lost our pre-anim info or even worse(sampling on a totally wrong area). To solve this issue, maybe you could bind a texture2DArray to the instancing material and introduce one more shader variable as the extra index of boneTexture :)