Netcode Bootstrap

This commit is contained in:
Luis Gonzalez
2026-05-31 14:27:52 -07:00
parent 99d8d2d2a9
commit 7fa77ce821
1813 changed files with 2921554 additions and 84 deletions
@@ -0,0 +1,61 @@
using Unity.Entities;
using Unity.Mathematics;
using Unity.Rendering;
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
namespace Rukhanka
{
// If present and enabled, then GPU animation engine is used
public struct GPUAnimationEngineTag: IComponentData, IEnableableComponent { }
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public struct GPUAttachmentComponent: IComponentData
{
public int attachedBoneIndex;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Used to move attachments using GPU computed bone poses in shader
[MaterialProperty("_RukhankaGPUBoneIndex")]
public struct GPUAttachmentBoneIndexMPComponent: IComponentData
{
public int boneIndex;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[MaterialProperty("_RukhankaAttachmentToBoneTransform")]
public struct GPUAttachmentToBoneTransformMPComponent: IComponentData
{
public float4x4 value;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[MaterialProperty("_RukhankaAnimatedEntityLocalToWorld")]
public struct GPURigEntityLocalToWorldMPComponent: IComponentData
{
public float4x4 value;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
public struct GPURigFrameOffsetsComponent: IComponentData
{
public int boneIndex;
public int rigIndex;
public int animationToProcessIndex;
public void AddOffsets(GPURigFrameOffsetsComponent o)
{
boneIndex += o.boneIndex;
rigIndex += o.rigIndex;
animationToProcessIndex += o.animationToProcessIndex;
}
}
}