Animation optimization
This commit is contained in:
@@ -36,12 +36,10 @@ void main()
|
||||
{
|
||||
mat4 boneTransform = mat4(1);
|
||||
|
||||
if(BoneWeights[0] > 0.0f){
|
||||
boneTransform = BoneWeights[0] * Bones[int(BoneIndices[0])]
|
||||
+ BoneWeights[1] * Bones[int(BoneIndices[1])]
|
||||
+ BoneWeights[2] * Bones[int(BoneIndices[2])]
|
||||
+ BoneWeights[3] * Bones[int(BoneIndices[3])];
|
||||
}
|
||||
|
||||
gl_Position = PVM*boneTransform * vec4(Position, 1.0);
|
||||
|
||||
|
||||
@@ -17,12 +17,10 @@ out VertexData{
|
||||
void main()
|
||||
{
|
||||
mat4 boneTransform = mat4(1);
|
||||
if(BoneWeights[0] > 0.0f){
|
||||
boneTransform = BoneWeights[0] * Bones[int(BoneIndices[0])]
|
||||
+ BoneWeights[1] * Bones[int(BoneIndices[1])]
|
||||
+ BoneWeights[2] * Bones[int(BoneIndices[2])]
|
||||
+ BoneWeights[3] * Bones[int(BoneIndices[3])];
|
||||
}
|
||||
|
||||
gl_Position = PVM*boneTransform * vec4(Position, 1.0);
|
||||
Output.Position = (boneTransform * vec4(Position, 1.0)).xyz;
|
||||
|
||||
@@ -15,12 +15,10 @@ out VertexData{
|
||||
void main()
|
||||
{
|
||||
mat4 boneTransform = mat4(1);
|
||||
if(BoneWeights[0] > 0.0f){
|
||||
boneTransform = BoneWeights[0] * Bones[int(BoneIndices[0])]
|
||||
+ BoneWeights[1] * Bones[int(BoneIndices[1])]
|
||||
+ BoneWeights[2] * Bones[int(BoneIndices[2])]
|
||||
+ BoneWeights[3] * Bones[int(BoneIndices[3])];
|
||||
}
|
||||
|
||||
gl_Position = PVM * boneTransform * vec4(Position, 1.0);
|
||||
Output.TextureCoordinate = TextureCoords;
|
||||
|
||||
Reference in New Issue
Block a user