public void Prepare(NativeArray <VisibleLight> sortedLightList, NativeArray <TileLightIndex> lightIndices, int zBinningCount, ZBinningInfo zBinningInfo) { m_LightList = sortedLightList; m_lightIndices = lightIndices; m_ZBinningCount = zBinningCount; m_ZBinningInfo = zBinningInfo; }
// light index array[int] // cluster index[int] the offset for each index // light pos array[vector4] // light color array[vector4] // light atten array[vector4] public LightCullingPass() { // do the allocation int tileSizeX = 64; int tileSizeY = 64; int bigTileSizeX = 256; int bigTileSizeY = 256; m_SmallTileCount.x = (1920 + tileSizeX - 1) / tileSizeX; m_SmallTileCount.y = (1080 + tileSizeY - 1) / tileSizeY; m_SmallTileCount.z = 1; m_BigTileCount.x = (1920 + bigTileSizeX - 1) / bigTileSizeX; m_BigTileCount.y = (1920 + bigTileSizeX - 1) / bigTileSizeX; m_BigTileCount.z = 1; m_LightComparer = new LightViewSpaceDistanceComparer(); m_BigClusterInfo = new ClusterInfo(); m_SmallClusterInfo = new ClusterInfo(); m_ZBinningInfo = new ZBinningInfo(); m_BroadPhaseJobData = new LightCullingTwoPhaseJobData(); m_NarrowPhaseJobData = new LightCullingTwoPhaseJobData(); _mOnePhaseJobData = new LightCullingOnePhaseJobData(); m_ZBinningJobData = new LightCullingZBinningJobData(); }