浏览代码

修改bug

DESKTOP-FB72PO8\Administrator 11 小时之前
父节点
当前提交
8cd26cbaff

+ 15 - 18
Assets/Resources/MyShader.shadervariants

@@ -8,52 +8,49 @@ ShaderVariantCollection:
   m_PrefabAsset: {fileID: 0}
   m_Name: MyShader
   m_Shaders:
-  - first: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
+  - first: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
     second:
       variants: []
-  - first: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
+  - first: {fileID: 10721, guid: 0000000000000000f000000000000000, type: 0}
     second:
       variants: []
-  - first: {fileID: -6465566751694194690, guid: dfab9f92705bc3448be937135a3cb41d, type: 3}
+  - first: {fileID: 10723, guid: 0000000000000000f000000000000000, type: 0}
     second:
       variants: []
-  - first: {fileID: -6465566751694194690, guid: de8b10515e8c7b6419b7a2e25ccbf055, type: 3}
+  - first: {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
     second:
       variants: []
-  - first: {fileID: -6465566751694194690, guid: f7c09a0ce9e591942bd0e4e102bbc409, type: 3}
+  - first: {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
     second:
       variants: []
-  - first: {fileID: -6465566751694194690, guid: 24ce5c251bc875b4ba39dde2e7209665, type: 3}
+  - first: {fileID: 4800000, guid: c6a0e78efe21c54448ab2869b09e8a2d, type: 3}
     second:
       variants: []
-  - first: {fileID: 10720, guid: 0000000000000000f000000000000000, type: 0}
+  - first: {fileID: -6465566751694194690, guid: de8b10515e8c7b6419b7a2e25ccbf055, type: 3}
     second:
       variants: []
-  - first: {fileID: 10721, guid: 0000000000000000f000000000000000, type: 0}
+  - first: {fileID: -6465566751694194690, guid: f7c09a0ce9e591942bd0e4e102bbc409, type: 3}
     second:
       variants: []
-  - first: {fileID: 10723, guid: 0000000000000000f000000000000000, type: 0}
+  - first: {fileID: -6465566751694194690, guid: dfab9f92705bc3448be937135a3cb41d, type: 3}
     second:
       variants: []
-  - first: {fileID: 4800000, guid: 200ef425a7d005549abec1d23f7393d2, type: 3}
+  - first: {fileID: -6465566751694194690, guid: 24ce5c251bc875b4ba39dde2e7209665, type: 3}
     second:
       variants: []
-  - first: {fileID: 4800000, guid: c6a0e78efe21c54448ab2869b09e8a2d, type: 3}
+  - first: {fileID: 4800000, guid: 2933b413a51fc4ff3a83c7ef4177ae84, type: 3}
     second:
       variants: []
-  - first: {fileID: 4800000, guid: caadcbe202b44584cb8021b3e5e89999, type: 3}
+  - first: {fileID: 4800000, guid: cf7f4515d1ea2404b9cbfeb53870eb8e, type: 3}
     second:
       variants: []
   - first: {fileID: 4800000, guid: 54e59f65585b87c479bfb75710b91a47, type: 3}
     second:
       variants: []
-  - first: {fileID: 4800000, guid: 276e77afd9b929d498b6fbdcdce398d0, type: 3}
-    second:
-      variants: []
-  - first: {fileID: 4800000, guid: 91bd8b6735bb531488bbcaaf06ea18ba, type: 3}
+  - first: {fileID: 4800000, guid: 200ef425a7d005549abec1d23f7393d2, type: 3}
     second:
       variants: []
-  - first: {fileID: 4800000, guid: 2933b413a51fc4ff3a83c7ef4177ae84, type: 3}
+  - first: {fileID: 4800000, guid: caadcbe202b44584cb8021b3e5e89999, type: 3}
     second:
       variants: []
   - first: {fileID: 4800000, guid: 8bee0edf03bdded419ae76dcde0de9a8, type: 3}
@@ -62,6 +59,6 @@ ShaderVariantCollection:
   - first: {fileID: 4800000, guid: ca5272cc9dc342a4eb82e46facb52483, type: 3}
     second:
       variants: []
-  - first: {fileID: 4800000, guid: cf7f4515d1ea2404b9cbfeb53870eb8e, type: 3}
+  - first: {fileID: -6465566751694194690, guid: 8c58ccb11e2c88c4f954744564e8dbbe, type: 3}
     second:
       variants: []

+ 8 - 0
Assets/Scripts/Core/BRG.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: XClOtiylACqjambuO6LOKOm36fwpr17YvLroa7ShjdHN1tnAeP/MLckbQrCj
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 19 - 0
Assets/Scripts/Core/BRG/BGRGameObjectInfo.cs

@@ -0,0 +1,19 @@
+using Unity.Mathematics;
+using UnityEngine;
+
+namespace Core.BRG
+{
+    [System.Serializable]
+    public class BGRGameObjectInfo
+    {
+        public int initIndex;
+        public Vector3 pos;
+        public Vector3 rot;
+        public Vector3 scale;
+        public float4 color=1;
+        public Matrix4x4 objectToWorld
+        {
+            get { return Matrix4x4.TRS(pos, Quaternion.Euler(rot), scale); }
+        }
+    }
+}

+ 11 - 0
Assets/Scripts/Core/BRG/BGRGameObjectInfo.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: D38dsHmuVXkz4F7VhC8WvhF5tjkEUVoFmLWKRNz3AuRqYqgbhY+4c9ZyjxO/
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 9 - 0
Assets/Scripts/Core/BRG/BRGManger.cs

@@ -0,0 +1,9 @@
+using Utility;
+
+namespace Core.BRG
+{
+    public class BRGManger : Singleton<BRGManger>
+    {
+        
+    }
+}

+ 3 - 0
Assets/Scripts/Core/BRG/BRGManger.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: a94755ef12524aaab2e67306cca89734
+timeCreated: 1760930317

+ 95 - 0
Assets/Scripts/Core/BRG/BRGRender.cs

@@ -0,0 +1,95 @@
+using System.Collections.Generic;
+using Unity.Collections;
+using Unity.Mathematics;
+using UnityEngine;
+using UnityEngine.Rendering;
+
+namespace Core.BRG
+{
+    public class BRGRender<T> : BRGRenderBasic where T : BGRGameObjectInfo
+    {
+        /// <summary>
+        /// BRG容器对象
+        /// </summary>
+        // private BRGRenderBasic _mBrgRenderBasic;
+
+        // private int m_itemCount;
+        public bool isUpdate = true;
+
+        public List<T> m_gameObjectInfos = new List<T>();
+
+        private List<BatchShaderBind> m_batchShaderBinds = new List<BatchShaderBind>();
+
+        public void InitRender(BRGSamples samples, List<T> gameObjectInfos)
+        {
+            this.m_gameObjectInfos = gameObjectInfos;
+
+            int maxItemSize = samples.GetAllShaderValueSize();
+            Init(samples, gameObjectInfos.Count, maxItemSize);
+            UploadGpuData(gameObjectInfos.Count);
+        }
+
+        protected override NativeArray<MetadataValue> ProInitBatchMetadata(int startOffset,int m_maxInstancePerWindow)
+        {
+            NativeArray<MetadataValue> metadataValues =
+                new NativeArray<MetadataValue>(m_samples.AllShaderValues.Count,Allocator.Temp, NativeArrayOptions.UninitializedMemory);
+            m_batchShaderBinds.Clear();
+            int count= m_gameObjectInfos.Count;
+            for (int i = 0; i < m_samples.AllShaderValues.Count; i++)
+            {
+                // BRGShaderValue shaderValue = m_samples.AllShaderValues[i];
+                // int shaderId = Shader.PropertyToID(shaderValue.);
+                // BatchShaderBind batchShaderBind = new BatchShaderBind();
+                // batchMetadata[0] = CreateMetadataValue(objectToWorldID, 0, true);
+            }
+            return base.ProInitBatchMetadata(startOffset,m_maxInstancePerWindow);
+        }
+
+      
+
+
+        public void UpdatePos()
+        {
+            if (!isUpdate)
+            {
+                return;
+            }
+
+            int totalGpuBufferSize;
+            int alignedWindowSize;
+            NativeArray<float3x4> sysmemBuffer =
+                GetSysmemBuffer(out totalGpuBufferSize, out alignedWindowSize);
+
+            // 检查NativeArray是否有效
+            if (!sysmemBuffer.IsCreated)
+            {
+                Debug.LogError("NativeArray has been deallocated or not created properly");
+                return;
+            }
+
+            int m_itemCount = m_gameObjectInfos.Count;
+            for (int i = 0; i < m_gameObjectInfos.Count; i++)
+            {
+                BGRGameObjectInfo info = m_gameObjectInfos[i];
+
+
+                Matrix4x4 matrix4X4 = info.objectToWorld;
+                float4x4 float3X4 = matrix4X4;
+
+                sysmemBuffer[i] = new float3x4(
+                    float3X4.c0.xyz, float3X4.c1.xyz,
+                    float3X4.c2.xyz, float3X4.c3.xyz
+                );
+                float4x4 inverse = matrix4X4.inverse;
+
+                sysmemBuffer[i + m_itemCount] = new float3x4(
+                    inverse.c0.xyz, inverse.c1.xyz,
+                    inverse.c2.xyz, inverse.c3.xyz
+                );
+            }
+
+            // 每帧更新后重新上传数据到GPU
+            UploadTransformData(m_itemCount);
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/Core/BRG/BRGRender.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: e1d9ffa86bde4ff78dc870c4f7bc88d6
+timeCreated: 1760930374

+ 453 - 0
Assets/Scripts/Core/BRG/BRGRenderBasic.cs

@@ -0,0 +1,453 @@
+using System;
+using System.Collections.Generic;
+using Core.BRG;
+using Unity.Collections;
+using Unity.Collections.LowLevel.Unsafe;
+using Unity.Burst;
+using Unity.Mathematics;
+using Unity.Jobs;
+using UnityEngine;
+using UnityEngine.Rendering;
+
+/*
+    这个类使用BRG(Batch Renderer Group)处理地面格子和碎片的渲染。
+    地面格子和碎片可以使用相同的GPU数据布局:
+        - obj2world 矩阵 (3 * float4)
+        - world2obj 矩阵 (3 * float4)
+        - 颜色 (1 * float4)
+
+    所以每个网格需要7个float4。
+
+    不要忘记数据是以SoA(Structure of Arrays)方式存储的
+*/
+
+/// <summary>
+/// BRG容器类,用于管理使用BatchRendererGroup的实例化渲染
+/// </summary>
+public unsafe class BRGRenderBasic
+{
+    // 在GLES模式下,BRG原始缓冲区是一个常量缓冲区(UBO)
+    private bool UseConstantBuffer => BatchRendererGroup.BufferTarget == BatchBufferTarget.ConstantBuffer;
+ 
+
+
+    private int m_maxInstances; // 此容器中的最大项目数
+    private int m_instanceCount; // 当前项目数量
+    private int m_alignedGPUWindowSize; // BRG原始窗口大小
+    private int m_maxInstancePerWindow; // 每个窗口的最大实例数
+    private int m_windowCount; // 窗口数量(在SSBO模式下为1,在UBO模式下为n)
+    private int m_totalGpuBufferSize; // 原始缓冲区的总大小
+    private NativeArray<float3x4> m_transfromBuffer; // 原始缓冲区的系统内存副本
+    public NativeArray<float4> m_sysmemColorBuffer;
+    private bool m_initialized; // 是否已初始化
+    private int m_instanceSize; // 项目大小(以字节为单位)
+    private BatchID[] m_batchIDs; // 每个窗口对应一个batchID
+    private BatchMaterialID m_materialID; // 材质ID
+    private BatchMeshID m_meshID; // 网格ID
+    private BatchRendererGroup m_BatchRendererGroup; // BRG对象
+    private GraphicsBuffer m_GPUPersistentInstanceData; // GPU原始缓冲区(可能是SSBO或UBO)
+
+    protected BRGSamples m_samples;
+    /// <summary>
+    /// 创建BRG对象并分配缓冲区
+    /// </summary>
+    /// <param name="mesh">要渲染的网格</param>
+    /// <param name="mat">要使用的材质</param>
+    /// <param name="maxInstances">最大实例数</param>
+    /// <param name="instanceSize">每个实例的大小(以字节为单位)</param>
+    /// <param name="castShadows">是否投射阴影</param>
+    /// <returns>初始化是否成功</returns>
+    protected bool Init(BRGSamples samples, int maxInstances, int instanceSize)
+    {
+        // 创建BRG对象,指定我们的BRG回调函数
+        m_BatchRendererGroup = new BatchRendererGroup(this.OnPerformCulling, IntPtr.Zero);
+        instanceSize+=(3*2*16); // 额外添加obj2world和world2obj矩阵的大小
+        m_instanceSize = instanceSize;
+        m_instanceCount = 0;
+        m_maxInstances = maxInstances;
+        m_samples = samples;
+
+        // BRG使用一个大的GPU缓冲区。这在几乎所有平台上都是一个原始缓冲区,在GLES上是一个常量缓冲区
+        // 在常量缓冲区的情况下,我们将其分割成几个大小为BatchRendererGroup.GetConstantBufferMaxWindowSize()字节的"窗口"
+        if (UseConstantBuffer)
+        {
+            // 获取常量缓冲区的最大窗口大小
+            m_alignedGPUWindowSize = BatchRendererGroup.GetConstantBufferMaxWindowSize();
+            // 计算每个窗口可以容纳的最大实例数
+            m_maxInstancePerWindow = m_alignedGPUWindowSize / instanceSize;
+            // 计算需要的窗口数量(向上取整)
+            m_windowCount = (m_maxInstances + m_maxInstancePerWindow - 1) / m_maxInstancePerWindow;
+            // 计算总的GPU缓冲区大小
+            m_totalGpuBufferSize = m_windowCount * m_alignedGPUWindowSize;
+            // 创建常量缓冲区(目标类型为Constant,大小为总字节数/16,每个元素16字节)
+            m_GPUPersistentInstanceData =
+                new GraphicsBuffer(GraphicsBuffer.Target.Constant, m_totalGpuBufferSize / 16, 16);
+        }
+        else
+        {
+            // 计算对齐后的GPU窗口大小,确保是16字节对齐 ((size + 15) & (-16) 是向上取整到16的倍数的位运算技巧)
+            m_alignedGPUWindowSize = (m_maxInstances * instanceSize + 15) & (-16);
+            // 在SSBO模式下,每个窗口可以容纳所有实例
+            m_maxInstancePerWindow = maxInstances;
+            // SSBO模式只需要一个窗口
+            m_windowCount = 1;
+            // 总的GPU缓冲区大小等于单个窗口大小
+            m_totalGpuBufferSize = m_windowCount * m_alignedGPUWindowSize;
+            // 创建原始缓冲区(目标类型为Raw,大小为总字节数/4,每个元素4字节)
+            m_GPUPersistentInstanceData = new GraphicsBuffer(GraphicsBuffer.Target.Raw, m_totalGpuBufferSize / 4, 4);
+        }
+
+        // 在我们的示例游戏中,我们处理3个实例化属性:obj2world、world2obj和baseColor
+        var batchMetadata = new NativeArray<MetadataValue>(2, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
+
+        // 批处理元数据缓冲区
+        int objectToWorldID = Shader.PropertyToID("unity_ObjectToWorld");
+        int worldToObjectID = Shader.PropertyToID("unity_WorldToObject");
+        // int colorID = Shader.PropertyToID("_BaseColor");
+
+        // 创建大GPU原始缓冲区的系统内存副本
+        m_transfromBuffer =
+            new NativeArray<float3x4>(maxInstances * 2, Allocator.Persistent, NativeArrayOptions.ClearMemory);
+        m_sysmemColorBuffer =
+            new NativeArray<float4>(maxInstances, Allocator.Persistent, NativeArrayOptions.ClearMemory);
+        // register one kind of batch per "window" in the large BRG raw buffer
+        m_batchIDs = new BatchID[m_windowCount];
+        for (int b = 0; b < m_windowCount; b++)
+        {
+            // 设置obj2world矩阵属性元数据,偏移量为0
+            batchMetadata[0] = CreateMetadataValue(objectToWorldID, 0, true);
+            // 设置world2obj矩阵属性元数据,偏移量为窗口内矩阵数据之后
+            batchMetadata[1] = CreateMetadataValue(worldToObjectID, m_maxInstancePerWindow * 3 * 16, true);
+            int startOffset = m_maxInstancePerWindow * 3 * 2 * 16;
+            NativeArray<MetadataValue> metadata = ProInitBatchMetadata(startOffset,m_maxInstancePerWindow);
+            NativeArray<MetadataValue> newBatchMetadata = new NativeArray<MetadataValue>(
+                batchMetadata.Length + metadata.Length, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
+            for (int i = 0; i < batchMetadata.Length; i++)
+            {
+                newBatchMetadata[i] = batchMetadata[i];
+            }
+
+            for (int i = 0; i < metadata.Length; i++)
+            {
+                newBatchMetadata[batchMetadata.Length + i] = metadata[i];
+            }
+
+            // // 设置颜色属性元数据,偏移量为窗口内所有矩阵数据之后
+            // batchMetadata[2] = CreateMetadataValue(colorID, m_maxInstancePerWindow * 3 * 2 * 16, true);
+            // 计算当前批次在GPU缓冲区中的偏移量
+            int offset = b * m_alignedGPUWindowSize;
+            // 添加批次到BatchRendererGroup,指定元数据、缓冲区句柄和偏移量
+            m_batchIDs[b] = m_BatchRendererGroup.AddBatch(newBatchMetadata, m_GPUPersistentInstanceData.bufferHandle,
+                (uint)offset, UseConstantBuffer ? (uint)m_alignedGPUWindowSize : 0);
+            newBatchMetadata.Dispose();
+            metadata.Dispose();
+        }
+
+        // 我们不再需要这个元数据描述数组
+        batchMetadata.Dispose();
+
+        // 设置非常大的边界以确保BRG永远不会被剔除
+        UnityEngine.Bounds bounds = ProGetBounds();
+        m_BatchRendererGroup.SetGlobalBounds(bounds);
+
+        // 注册网格和材质
+        if (m_samples.Mesh) m_meshID = m_BatchRendererGroup.RegisterMesh(m_samples.Mesh);
+        if (m_samples.Material) m_materialID = m_BatchRendererGroup.RegisterMaterial(m_samples.Material);
+
+        m_initialized = true;
+        return true;
+    }
+    protected virtual Bounds ProGetBounds()
+    {
+       return new Bounds(new Vector3(0, 0, 0), new Vector3(1048576.0f, 1048576.0f, 1048576.0f));
+    }
+
+    protected virtual NativeArray<MetadataValue> ProInitBatchMetadata(int startOffset,int count)
+    {
+        return new NativeArray<MetadataValue>(0, Allocator.Temp, NativeArrayOptions.UninitializedMemory);
+    }
+
+    /// <summary>
+    /// 更新位置信息
+    /// </summary>
+    /// <param name="instanceCount"></param>
+    /// <returns></returns>
+    protected bool UploadTransformData(int instanceCount)
+    {
+        if ((uint)instanceCount > (uint)m_maxInstances)
+            return false;
+
+        // 更新当前实例数量
+        m_instanceCount = instanceCount;
+        // 计算完整窗口的数量
+        int completeWindows = m_instanceCount / m_maxInstancePerWindow;
+
+        // 一次性更新所有完整的窗口
+        if (completeWindows >= 0)
+        {
+            // 计算需要更新的数据大小(以float4为单位)
+            // int sizeInFloat4 = (completeWindows * m_alignedGPUWindowSize) / (16 * 4);
+       
+            // 将系统内存缓冲区的数据上传到GPU缓冲区
+            m_GPUPersistentInstanceData.SetData(m_transfromBuffer, 0, 0, m_maxInstancePerWindow * 2);
+         
+            // int off = m_maxInstancePerWindow * 2 * 3 * 16;
+            // m_GPUPersistentInstanceData.SetData(m_sysmemColorBuffer, 0, off / 16, m_maxInstancePerWindow);
+        }
+
+        return true;
+    }
+    /// <summary>
+    /// 根据"instanceCount"上传最小的GPU数据
+    /// 由于使用了SoA且此类管理3个BRG属性(2个矩阵和1个颜色),最后一个窗口可能需要多达3次SetData调用
+    /// </summary>
+    /// <param name="instanceCount">实例数量</param>
+    /// <returns>上传是否成功</returns>
+    public bool UploadGpuData(int instanceCount,List<BatchShaderBind> shaderBinds=null)
+    {
+        // 检查实例数量是否超过最大限制
+        if ((uint)instanceCount > (uint)m_maxInstances)
+            return false;
+
+        // 更新当前实例数量
+        m_instanceCount = instanceCount;
+        // 计算完整窗口的数量
+        int completeWindows = m_instanceCount / m_maxInstancePerWindow;
+
+        // 一次性更新所有完整的窗口
+        if (completeWindows >= 0)
+        {
+            // 计算需要更新的数据大小(以float4为单位)
+            // int sizeInFloat4 = (completeWindows * m_alignedGPUWindowSize) / (16 * 4);
+       
+            // 将系统内存缓冲区的数据上传到GPU缓冲区
+            m_GPUPersistentInstanceData.SetData(m_transfromBuffer, 0, 0, m_maxInstancePerWindow * 2);
+            if (shaderBinds != null)
+            {
+                for (int i = 0; i < shaderBinds.Count; i++)
+                {
+                    shaderBinds[i].SetData(m_GPUPersistentInstanceData);
+                }
+            }
+            // int off = m_maxInstancePerWindow * 2 * 3 * 16;
+            // m_GPUPersistentInstanceData.SetData(m_sysmemColorBuffer, 0, off / 16, m_maxInstancePerWindow);
+        }
+
+        // 然后上传最后一个(不完整)窗口的数据
+        int lastBatchId = completeWindows;
+        // 计算最后一个窗口中的实例数量
+        int itemInLastBatch = m_instanceCount - m_maxInstancePerWindow * completeWindows;
+
+        // 如果最后一个窗口中有数据需要上传
+        // if (itemInLastBatch > 0)
+        // {
+        //     // 计算窗口在float4单位中的偏移量
+        //     int windowOffsetInFloat4 = (lastBatchId * m_alignedGPUWindowSize) / 16 * 3;
+        //     // 计算obj2world矩阵在缓冲区中的偏移量
+        //     int offsetMat1 = windowOffsetInFloat4 + m_maxInstancePerWindow * 0;
+        //     // 计算world2obj矩阵在缓冲区中的偏移量
+        //     int offsetMat2 = windowOffsetInFloat4 + m_maxInstancePerWindow * 3;
+        //     // 计算颜色数据在缓冲区中的偏移量
+        //     int offsetColor = windowOffsetInFloat4 + m_maxInstancePerWindow * 3 * 2;
+        //     // 上传obj2world矩阵数据(每个实例3个float4)
+        //
+        //     m_GPUPersistentInstanceData.SetData(m_sysmemBuffer, offsetMat1, offsetMat1, itemInLastBatch * 3);
+        //     // 上传world2obj矩阵数据(每个实例3个float4)
+        //     m_GPUPersistentInstanceData.SetData(m_sysmemBuffer, offsetMat2, offsetMat2, itemInLastBatch * 3);
+        //     // // 上传颜色数据(每个实例1个float4)
+        //     // m_GPUPersistentInstanceData.SetData(m_sysmemBuffer, offsetColor, offsetColor, itemInLastBatch * 1);  
+        // }
+
+        return true;
+    }
+
+    /// <summary>
+    /// 释放所有已分配的缓冲区
+    /// </summary>
+    public void Shutdown()
+    {
+        if (m_initialized)
+        {
+            for (uint b = 0; b < m_windowCount; b++)
+                m_BatchRendererGroup.RemoveBatch(m_batchIDs[b]);
+
+            m_BatchRendererGroup.UnregisterMaterial(m_materialID);
+            m_BatchRendererGroup.UnregisterMesh(m_meshID);
+            m_BatchRendererGroup.Dispose();
+            m_GPUPersistentInstanceData.Dispose();
+            m_transfromBuffer.Dispose();
+        }
+    }
+
+    /// <summary>
+    /// 返回系统内存缓冲区和窗口大小,以便BRG_Background和BRG_Debris可以用新内容填充缓冲区
+    /// </summary>
+    /// <param name="totalSize">总大小</param>
+    /// <param name="alignedWindowSize">对齐的窗口大小</param>
+    /// <returns>系统内存缓冲区</returns>
+    public NativeArray<float3x4> GetSysmemBuffer(out int totalSize, out int alignedWindowSize)
+    {
+        totalSize = m_totalGpuBufferSize;
+        alignedWindowSize = m_alignedGPUWindowSize;
+        return m_transfromBuffer;
+    }
+
+    /// <summary>
+    /// 创建32位元数据值的辅助函数。Bit 31表示属性是否每个实例都有不同的值
+    /// </summary>
+    /// <param name="nameID">属性名称ID</param>
+    /// <param name="gpuOffset">GPU偏移量</param>
+    /// <param name="isPerInstance">是否每个实例都不同</param>
+    /// <returns>元数据值</returns>
+    protected MetadataValue CreateMetadataValue(int nameID, int gpuOffset, bool isPerInstance)
+    {
+        // 定义实例化标志位(最高位,即第31位)
+        const uint kIsPerInstanceBit = 0x80000000;
+        return new MetadataValue
+        {
+            NameID = nameID, // Shader属性名称ID
+            // 将GPU偏移量与实例化标志位进行按位或运算
+            // 如果是实例化属性,则设置最高位为1,否则保持原偏移量
+            Value = (uint)gpuOffset | (isPerInstance ? (kIsPerInstanceBit) : 0),
+        };
+    }
+
+    /// <summary>
+    /// 在BRG回调函数期间分配BRG缓冲区的辅助函数
+    /// </summary>
+    /// <typeparam name="T">元素类型</typeparam>
+    /// <param name="count">元素数量</param>
+    /// <returns>分配的内存指针</returns>
+    private static T* Malloc<T>(uint count) where T : unmanaged
+    {
+        return (T*)UnsafeUtility.Malloc(
+            UnsafeUtility.SizeOf<T>() * count,
+            UnsafeUtility.AlignOf<T>(),
+            Allocator.TempJob);
+    }
+
+    /// <summary>
+    /// 每帧的主BRG入口点。在此示例中我们使用BatchCullingContext进行视锥剔除
+    /// 此回调负责用所有需要渲染的项目填充cullingOutput
+    /// </summary>
+    /// <param name="rendererGroup">渲染组</param>
+    /// <param name="cullingContext">剔除上下文</param>
+    /// <param name="cullingOutput">剔除输出</param>
+    /// <param name="userContext">用户上下文</param>
+    /// <returns>作业句柄</returns>
+    public virtual JobHandle OnPerformCulling(BatchRendererGroup rendererGroup, BatchCullingContext cullingContext,
+        BatchCullingOutput cullingOutput, IntPtr userContext)
+    {
+        if (m_initialized)
+        {
+            // 创建绘制命令结构体,用于存储渲染命令信息
+            BatchCullingOutputDrawCommands drawCommands = new BatchCullingOutputDrawCommands();
+
+            // 计算UBO模式下我们需要的绘制命令数量(每个窗口一个绘制命令)
+            int drawCommandCount = (m_instanceCount + m_maxInstancePerWindow - 1) / m_maxInstancePerWindow;
+            int maxInstancePerDrawCommand = m_maxInstancePerWindow;
+            drawCommands.drawCommandCount = drawCommandCount;
+
+            // 分配单个BatchDrawRange。(所有绘制命令都将引用此BatchDrawRange)
+            drawCommands.drawRangeCount = 1;
+            drawCommands.drawRanges = Malloc<BatchDrawRange>(1);
+            drawCommands.drawRanges[0] = new BatchDrawRange
+            {
+                // 绘制命令开始索引
+                drawCommandsBegin = 0,
+                // 绘制命令数量
+                drawCommandsCount = (uint)drawCommandCount,
+                // 过滤设置
+                filterSettings = new BatchFilterSettings
+                {
+                    // 渲染层掩码
+                    renderingLayerMask = 1,
+                    // 层级
+                    layer = 0,
+                    // 运动向量生成模式
+                    motionMode = MotionVectorGenerationMode.Camera,
+                    // 阴影投射模式,根据m_castShadows决定是否投射阴影
+                    shadowCastingMode = m_samples.castShadows ? ShadowCastingMode.On : ShadowCastingMode.Off,
+                    // 是否接收阴影
+                    receiveShadows = m_samples.receiveShadows,
+                    // 是否为静态阴影投射器
+                    staticShadowCaster = m_samples.staticShadowCaster,
+                    // 是否全部深度排序
+                    allDepthSorted = m_samples.allDepthSorted
+                }
+            };
+
+            // 如果有绘制命令需要处理
+            if (drawCommands.drawCommandCount > 0)
+            {
+                // 由于我们不需要剔除,可见性整数数组缓冲区对于每个绘制命令将始终是{0,1,2,3,...}
+                // 所以我们只需分配maxInstancePerDrawCommand并填充它
+
+
+                int visibilityArraySize = maxInstancePerDrawCommand;
+                // 如果实例数量小于最大实例数,则调整可见性数组大小
+                if (m_instanceCount < visibilityArraySize)
+                    visibilityArraySize = m_instanceCount;
+                // for (int i = 0; i < visibilityArraySize; i++)
+                // {
+                //    
+                // }
+                // 为可见性实例分配内存
+                drawCommands.visibleInstances = Malloc<int>((uint)visibilityArraySize);
+
+                // 由于在此上下文中我们不需要任何视锥剔除,我们将可见性数组填充为{0,1,2,3...}
+                for (int i = 0; i < visibilityArraySize; i++)
+                {
+                    drawCommands.visibleInstances[i] = i;
+                    // drawCommands.visibleInstances[i] = 0;
+                }
+
+                // 分配BatchDrawCommand数组(drawCommandCount个条目)
+                // 在SSBO模式下,drawCommandCount将仅为1
+                drawCommands.drawCommands = Malloc<BatchDrawCommand>((uint)drawCommandCount);
+                // 剩余需要处理的实例数
+                int left = m_instanceCount;
+                // 为每个绘制命令填充信息
+                for (int b = 0; b < drawCommandCount; b++)
+                {
+                    // 计算当前批次中的实例数量
+                    int inBatchCount = left > maxInstancePerDrawCommand ? maxInstancePerDrawCommand : left;
+                    drawCommands.drawCommands[b] = new BatchDrawCommand
+                    {
+                        // 可见性偏移量,所有绘制命令都使用相同的{0,1,2,3...}可见性数组
+                        visibleOffset = (uint)0,
+                        // 可见实例数量
+                        visibleCount = (uint)inBatchCount,
+                        // 批次ID
+                        batchID = m_batchIDs[b],
+                        // 材质ID
+                        materialID = m_materialID,
+                        // 网格ID
+                        meshID = m_meshID,
+                        // 子网格索引
+                        submeshIndex = 0,
+                        // 分割可见性掩码
+                        splitVisibilityMask = 0xff,
+                        // 标志位
+                        flags = BatchDrawCommandFlags.None,
+                        // 排序位置
+                        sortingPosition = 0
+                    };
+                    // 减去已处理的实例数
+                    left -= inBatchCount;
+                }
+            }
+
+            // 将绘制命令设置到剔除输出中
+            cullingOutput.drawCommands[0] = drawCommands;
+            // 实例排序位置设置为空
+            drawCommands.instanceSortingPositions = null;
+            // 实例排序位置浮点数计数设置为0
+            drawCommands.instanceSortingPositionFloatCount = 0;
+        }
+
+        // 返回空的作业句柄
+        return new JobHandle();
+    }
+    
+}

+ 11 - 0
Assets/Scripts/Core/BRG/BRGRenderBasic.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: DnIXtH/4VC4MZaWa+bAgdUpOw9TZwkXLi7jSKRKBmQ4rrekj+zlOd4BhMs2f
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 26 - 0
Assets/Scripts/Core/BRG/BRGSamples.cs

@@ -0,0 +1,26 @@
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace Core.BRG
+{
+    [System.Serializable]
+    public class BRGSamples
+    {
+        public Mesh Mesh;
+        public Material Material;
+        public List<BRGShaderValue> AllShaderValues = new List<BRGShaderValue>();
+        public bool castShadows;
+        public bool receiveShadows;
+        public bool staticShadowCaster;
+        public bool allDepthSorted;
+        public int GetAllShaderValueSize()
+        {
+            int totalSize = 0;
+            foreach (var shaderValue in AllShaderValues)
+            {
+                totalSize += shaderValue.GetSize();
+            }
+            return totalSize;
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/Core/BRG/BRGSamples.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: c75d247808ae4d8593871d88a29f7269
+timeCreated: 1760929886

+ 27 - 0
Assets/Scripts/Core/BRG/BRGShaderValue.cs

@@ -0,0 +1,27 @@
+namespace Core.BRG
+{
+    [System.Serializable]
+    public class BRGShaderValue
+    {
+        public string key;
+        public BRGShaderValueType ValueType;
+
+        
+        public int GetSize()
+        {
+            switch (ValueType)
+            {
+                case BRGShaderValueType.F3X4:
+                    return 48;
+                case BRGShaderValueType.F4X4:
+                    return 64;
+                case BRGShaderValueType.F4:
+                    return 16;
+                case BRGShaderValueType.F1:
+                    return 4;
+                default:
+                    return 0;
+            }
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/Core/BRG/BRGShaderValue.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: b8cbef651cc2409897c119b9a36a3e7e
+timeCreated: 1760929698

+ 10 - 0
Assets/Scripts/Core/BRG/BRGShaderValueType.cs

@@ -0,0 +1,10 @@
+namespace Core.BRG
+{
+    public enum BRGShaderValueType
+    {
+        F3X4,
+        F4X4,
+        F4,
+        F1,
+    }
+}

+ 3 - 0
Assets/Scripts/Core/BRG/BRGShaderValueType.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: beb766ab1abd406882786797caed61fb
+timeCreated: 1760929744

+ 76 - 0
Assets/Scripts/Core/BRG/BRG_backgrond.cs

@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using Core.BRG;
+using Unity.Collections;
+using Unity.Mathematics;
+using UnityEngine;
+
+public class BRG_backgrond : MonoBehaviour
+{
+    public BRGSamples samples;
+
+    // public Material mat;
+    // public Mesh mesh;
+    public bool m_castShadows;
+    public int w;
+    public int h;
+
+    /// <summary>
+    /// BRG容器对象
+    /// </summary>
+    private BRGRender<BGRGameObjectInfo> _mBrgRenderBasic;
+
+    private int m_itemCount;
+    public bool isUpdate = true;
+
+    /// <summary>
+    /// GPU项目大小(2个4x3矩阵加1个颜色,每个float4占16字节)
+    /// </summary>
+    private const int kGpuItemSize = (3 * 2 + 1) * 16;
+
+    public List<BGRGameObjectInfo> m_gameObjectInfos = new List<BGRGameObjectInfo>();
+
+    private void Start()
+    {
+        m_itemCount = w * h;
+
+        for (int i = 0; i < w; i++)
+        {
+            for (int j = 0; j < h; j++)
+            {
+                BGRGameObjectInfo info = new BGRGameObjectInfo();
+                info.pos = new Vector3(i * 2, j , 0); // 增加间距,使物体更容易看到
+                info.rot = Vector3.zero;
+                info.scale = Vector3.one; // 调整尺寸
+                m_gameObjectInfos.Add(info);
+            }
+        }
+
+        _mBrgRenderBasic = new BRGRender<BGRGameObjectInfo>();
+        _mBrgRenderBasic.InitRender(samples, m_gameObjectInfos);
+    }
+
+    private void OnDestroy()
+    {
+        if (_mBrgRenderBasic != null)
+        {
+            _mBrgRenderBasic.Shutdown();
+            _mBrgRenderBasic = null;
+        }
+    }
+
+    private void Update()
+    {
+        UpdatePos();
+    }
+
+    private void UpdatePos()
+    {
+        if (!isUpdate)
+        {
+            return;
+        }
+
+        _mBrgRenderBasic.UpdatePos();
+    }
+}

+ 11 - 0
Assets/Scripts/Core/BRG/BRG_backgrond.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: B3gX53yvBXNZdvxIz1NWfub4jfuXhXMC7o8rcSiycRCdM8afcTEVSbk+9Zw2
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 61 - 0
Assets/Scripts/Core/BRG/BatchShaderBind.cs

@@ -0,0 +1,61 @@
+using Unity.Collections;
+using Unity.Mathematics;
+using UnityEngine;
+
+namespace Core.BRG
+{
+    public class BatchShaderBind
+    {
+        public BRGShaderValue shaderValue;
+        public int offset;
+
+        private NativeArray<float4x4> _f4x4Buffer;
+        private NativeArray<float3x4> _f3x4Buffer;
+        private NativeArray<float4> _f4Buffer;
+        private NativeArray<float> _f1Buffer;
+
+        private int _count;
+        private int _size;
+
+        private void InitBuffer(int count)
+        {
+            this._count = count;
+            _size = shaderValue.GetSize();
+            switch (shaderValue.ValueType)
+            {
+                case BRGShaderValueType.F4X4:
+                    _f4x4Buffer = new NativeArray<float4x4>(count, Allocator.Persistent);
+                    break;
+                case BRGShaderValueType.F3X4:
+                    _f3x4Buffer = new NativeArray<float3x4>(count, Allocator.Persistent);
+                    break;
+                case BRGShaderValueType.F4:
+                    _f4Buffer = new NativeArray<float4>(count, Allocator.Persistent);
+                    break;
+                case BRGShaderValueType.F1:
+                    _f1Buffer = new NativeArray<float>(count, Allocator.Persistent);
+                    break;
+            }
+        }
+
+        public void SetData(GraphicsBuffer graphicsBuffer)
+        {
+            InitBuffer(graphicsBuffer.count);
+            switch (shaderValue.ValueType)
+            {
+                case BRGShaderValueType.F4X4:
+                    graphicsBuffer.SetData(_f4x4Buffer, 0, offset / _size, _count);
+                    break;
+                case BRGShaderValueType.F3X4:
+                    graphicsBuffer.SetData(_f3x4Buffer, 0, offset / _size, _count);
+                    break;
+                case BRGShaderValueType.F4:
+                    graphicsBuffer.SetData(_f4Buffer, 0, offset / _size, _count);
+                    break;
+                case BRGShaderValueType.F1:
+                    graphicsBuffer.SetData(_f1Buffer, 0, offset / _size, graphicsBuffer.count);
+                    break;
+            }
+        }
+    }
+}

+ 3 - 0
Assets/Scripts/Core/BRG/BatchShaderBind.cs.meta

@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 61528fa53d364d288d8e5924a82467bd
+timeCreated: 1760942472

+ 6 - 1
Assets/Scripts/GameLogic/Combat/Buff/b_1012.cs

@@ -15,10 +15,15 @@ namespace GameLogic.Combat.Buff
 
         public void FangXue()
         {
+            if (combatHeroEntity == null)
+            {
+                return;
+            }
+
             long harm = CombatCalculateTool.Instance.GetVlaueRatioForLong(source.CurrCombatHeroInfo.attack.Value,
                 BuffConfig.effectValue[0]);
             CombatCalculateTool.Instance.Harm(source, combatHeroEntity, harm, AttType.Buff, _triggerData,
-                WuXingType.Gold,null);
+                WuXingType.Gold, null);
             _currTime = 0;
         }
     }

+ 2 - 1
Assets/Scripts/GameLogic/Combat/CombatTool/CombatController.cs

@@ -224,13 +224,14 @@ namespace GameLogic.Combat.CombatTool
         public void DisposeOneCombatInfo()
         {
             CombatReportManager.Instance.Clear();
-            MagicWeaponCombatSence.CloseSecene();
+            MagicWeaponCombatSence?.CloseSecene();
             CombatEventManager.Instance.Dispose();
         }
 
         
         public void Dispose()
         {
+            DisposeOneCombatInfo();
             TimeLineSingletonEventManager.Instance.RemoveTimeLineBasic(this);
             CombatTypeBasic?.Dispose();
             CombatHeroController?.Dispose();

+ 6 - 0
Assets/Scripts/GameLogic/Combat/CombatTool/CombatHeroController.cs

@@ -289,8 +289,14 @@ namespace GameLogic.Combat.CombatTool
                 enemyHero[i].Dispose();
             }
 
+            for (int i = 0; i < heroDie.Count; i++)
+            {
+                heroDie[i].Dispose();
+            }
+
             myHero.Clear();
             enemyHero.Clear();
+            heroDie.Clear();
             CombatEventManager.Instance.RemoveEventListener(CombatEventType.UseSkill, CombatUseSkillEventData);
         }
 

+ 9 - 9
UserSettings/EditorUserSettings.asset

@@ -21,31 +21,31 @@ EditorUserSettings:
       value: 184c
       flags: 0
     RecentlyUsedSceneGuid-0:
-      value: 5402055e50575f5d0f5e54711173084444154f7e2f7a24657e2b1837b7b56669
+      value: 0050025706050c5d5f0c58274673074417161b72782977637e7b4c6bb1e6606e
       flags: 0
     RecentlyUsedSceneGuid-1:
-      value: 0050025706050c5d5f0c58274673074417161b72782977637e7b4c6bb1e6606e
+      value: 50030c5e500c58580e5d5c71457a0e44124f4d78292e7434787b1e36b2b4323a
       flags: 0
     RecentlyUsedSceneGuid-2:
-      value: 50030c5e500c58580e5d5c71457a0e44124f4d78292e7434787b1e36b2b4323a
+      value: 53520353570c0b5d0c5a0d2141755e44104e4a297d7c7762792d4a61bbb6613c
       flags: 0
     RecentlyUsedSceneGuid-3:
-      value: 53520353570c0b5d0c5a0d2141755e44104e4a297d7c7762792d4a61bbb6613c
+      value: 525456020100515e5d5f087145710844404f1c797d2e7262752d4b67b0b6373e
       flags: 0
     RecentlyUsedSceneGuid-4:
-      value: 525456020100515e5d5f087145710844404f1c797d2e7262752d4b67b0b6373e
+      value: 060255045d5150585957587212750944444f412c2e7c20342c7b4c67e3b26d60
       flags: 0
     RecentlyUsedSceneGuid-5:
-      value: 060255045d5150585957587212750944444f412c2e7c20342c7b4c67e3b26d60
+      value: 545007550304585a545d5e76157b0844454f1b7a2d2c7666782f4961b7b9623b
       flags: 0
     RecentlyUsedSceneGuid-6:
-      value: 545007550304585a545d5e76157b0844454f1b7a2d2c7666782f4961b7b9623b
+      value: 0002065506010b09555d0e7a12750a4443151a297a2e70317d7d4d6be1e1616f
       flags: 0
     RecentlyUsedSceneGuid-7:
-      value: 0002065506010b09555d0e7a12750a4443151a297a2e70317d7d4d6be1e1616f
+      value: 52570c02000d5e025a58597212725c4440161c2e797a75607f2c4467b7b3323e
       flags: 0
     RecentlyUsedSceneGuid-8:
-      value: 52570c02000d5e025a58597212725c4440161c2e797a75607f2c4467b7b3323e
+      value: 5009075552535a5d5b565c2446260844401548287a7d743674704963e1e1673c
       flags: 0
     RecentlyUsedSceneGuid-9:
       value: 5753045f5d005b5f0b0a082315715d44464e4b7b797125622e284430bbe66d68

+ 4 - 0
XiuXianGame.sln.DotSettings.user

@@ -8,6 +8,7 @@
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AArray_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c2967a135e648bdb993c5397a44991b573620_003Fd5_003Fcf947ad8_003FArray_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAsyncInstantiateOperationHelper_002Ecs_002Fl_003AC_0021_003FUsers_003Fck_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F3b_003F82aeb7a5_003FAsyncInstantiateOperationHelper_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AAsyncMethodBuilderCore_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe4df6db7850b4c40b72002ff5da8188846ac00_003F82_003F86e88926_003FAsyncMethodBuilderCore_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABatchFilterSettings_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F2b_003F6302754e_003FBatchFilterSettings_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ABoolean_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c2967a135e648bdb993c5397a44991b573620_003Fb7_003F8b615c21_003FBoolean_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACameraType_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F07_003F2a422d04_003FCameraType_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACamera_002Ecs_002Fl_003AC_0021_003FUsers_003Fck_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003Fb4_003Fff6cb607_003FCamera_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -33,6 +34,7 @@
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExceptionDispatchInfo_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe4df6db7850b4c40b72002ff5da8188846ac00_003Fd3_003F4533b7c3_003FExceptionDispatchInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExceptionDispatchInfo_002Ecs_002Fl_003AC_0021_003FUsers_003Fadmin_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe4df6db7850b4c40b72002ff5da8188846ac00_003Fd3_003F4533b7c3_003FExceptionDispatchInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AExceptionDispatchInfo_002Ecs_002Fl_003AC_0021_003FUsers_003Fck_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe4df6db7850b4c40b72002ff5da8188846ac00_003F78_003Fe39b72ca_003FExceptionDispatchInfo_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AGraphicsBuffer_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F3a_003F867eec19_003FGraphicsBuffer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIGrouping_00602_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5004a53079e04c2991f89460a5186cf010fc00_003Fb1_003F69de2d9e_003FIGrouping_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AIMGUIContainer_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F56d039fe633a4adf8fb266a0b1797e6c17a000_003F2c_003F134ee6ec_003FIMGUIContainer_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AINotifyCompletion_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c2967a135e648bdb993c5397a44991b573620_003F64_003Fbb31faf9_003FINotifyCompletion_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -54,6 +56,7 @@
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMath_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe4df6db7850b4c40b72002ff5da8188846ac00_003F0b_003F91e5e512_003FMath_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMesh_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003Fde_003Fb0e5d275_003FMesh_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AMonoBehaviour_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F2d_003F1dd7205f_003FMonoBehaviour_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANativeArray_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F3d_003F7966baaa_003FNativeArray_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullable_00601_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe4df6db7850b4c40b72002ff5da8188846ac00_003F14_003F6b3cf15a_003FNullable_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ANullable_00601_002Ecs_002Fl_003AC_0021_003FUsers_003Fadmin_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c2967a135e648bdb993c5397a44991b573620_003F50_003F76c2310d_003FNullable_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AObject_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F78_003F5e834fc5_003FObject_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -66,6 +69,7 @@
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARandom_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F9c2967a135e648bdb993c5397a44991b573620_003F9f_003F293a2b71_003FRandom_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARandom_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb18a8b3398e74bca86895881dd02956c573648_003F4c_003Fb5eddf34_003FRandom_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARenderChain_002Ecs_002Fl_003AC_0021_003FUsers_003Fck_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F56d039fe633a4adf8fb266a0b1797e6c17a000_003Fad_003F950abb89_003FRenderChain_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
+	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARenderSettings_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F52_003F7f76ba6b_003FRenderSettings_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARenderTargetIdentifier_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F4b_003Faf2fce31_003FRenderTargetIdentifier_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AS2002_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fa01b6d4ffd8a40da9aa90b33ff5055f23dc00_003Fce_003Fab212403_003FS2002_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
 	<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AShader_002Ecs_002Fl_003AC_0021_003FUsers_003FAdministrator_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F5c4a01f363eb46748231fc41bd9bdd8517e000_003F21_003Fcaaaf4a6_003FShader_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>