private void LoadAsset(ProbeVolumeAsset asset)
        {
            var path = asset.GetSerializedFullPath();

            m_AssetPathToBricks[path] = new List <RegId>();

            foreach (var cell in asset.cells)
            {
                // Push data to HDRP
                bool compressed   = false;
                var  dataLocation = ProbeBrickPool.CreateDataLocation(cell.sh.Length, compressed);
                ProbeBrickPool.FillDataLocation(ref dataLocation, cell.sh);

                // TODO register ID of brick list
                List <ProbeBrickIndex.Brick> brickList = new List <ProbeBrickIndex.Brick>();
                brickList.AddRange(cell.bricks);
                var regId = AddBricks(brickList, dataLocation);

                cells[cell.index] = cell;
                m_AssetPathToBricks[path].Add(regId);
            }
        }
        public void InitProbeReferenceVolume(int allocationSize, ProbeVolumeTextureMemoryBudget memoryBudget, Vector3Int indexDimensions)
        {
            Profiler.BeginSample("Initialize Reference Volume");
            m_Pool  = new ProbeBrickPool(allocationSize, memoryBudget);
            m_Index = new ProbeBrickIndex(indexDimensions);

            m_TmpBricks[0]          = new List <Brick>();
            m_TmpBricks[1]          = new List <Brick>();
            m_TmpBricks[0].Capacity = m_TmpBricks[1].Capacity = 1024;

            // initialize offsets
            m_PositionOffsets[0] = 0.0f;
            float probeDelta = 1.0f / ProbeBrickPool.kBrickCellCount;

            for (int i = 1; i < ProbeBrickPool.kBrickProbeCountPerDim - 1; i++)
            {
                m_PositionOffsets[i] = i * probeDelta;
            }
            m_PositionOffsets[m_PositionOffsets.Length - 1] = 1.0f;
            Profiler.EndSample();

            m_ProbeReferenceVolumeInit = true;
            m_NeedLoadAsset            = true;
        }