メインメニューを開く

差分

スケルタルアニメーション

36 バイト追加, 2023年5月24日 (水) 09:22
layout(location = 3) in uvec4 BoneIndices;// 頂点ごとに持つ
void main(){ mat4 skin = BoneTransforms[BoneIndices[0]] * BoneWeights[0] + BoneTransforms[BoneIndices[1]] * BoneWeights[1] + BoneTransforms[BoneIndices[2]] * BoneWeights[2] + BoneTransforms[BoneIndices[3]] * BoneWeights[3];
gl_Position = Projection * View * World * skin * vec4(Position, 1); }
</source>