Crude optimizations
From testing with model of around 50 bones, I could get 64+ animated models on the screen with 150fps+
This commit is contained in:
@@ -484,9 +484,11 @@ namespace Nuake
|
||||
auto& skeletonRoot = component.ModelResource->GetSkeletonRootNode();
|
||||
|
||||
Entity skeletonRootEntity = CreateEntity(skeletonRoot.Name);
|
||||
skeletonRootEntity.AddComponent<BoneComponent>();
|
||||
skeletonRootEntity.AddComponent<BoneComponent>().Name = skeletonRoot.Name;
|
||||
skeletonRoot.EntityHandle = skeletonRootEntity.GetHandle();
|
||||
entity.AddChild(skeletonRootEntity);
|
||||
|
||||
|
||||
Vector3 bonePosition;
|
||||
Quat boneRotation;
|
||||
Vector3 boneScale;
|
||||
@@ -509,6 +511,8 @@ namespace Nuake
|
||||
boneEntity.AddComponent<BoneComponent>();
|
||||
entity.AddChild(boneEntity);
|
||||
|
||||
c.EntityHandle = boneEntity.GetHandle();
|
||||
|
||||
Vector3 bonePosition;
|
||||
Quat boneRotation;
|
||||
Vector3 boneScale;
|
||||
|
||||
Reference in New Issue
Block a user