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:
Antoine Pilote
2023-09-08 00:33:57 -04:00
parent 36646a0990
commit 190c36b910
4 changed files with 17 additions and 5 deletions

View File

@@ -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;