private JobHandle OnPerformCulling(BatchRendererGroup batchRendererGroup, BatchCullingContext cullingContext) { var planes = Unity.Rendering.FrustumPlanes.BuildSOAPlanePackets(cullingContext.cullingPlanes, Allocator.TempJob); var lodParms = LODGroupExtensions.CalculateLODParams(cullingContext.lodParameters); var cull = new MyCullJob() { Planes = planes, LODParams = lodParms, IndexList = cullingContext.visibleIndices, Batches = cullingContext.batchVisibility, CullDatas = _cullDic, }; // Debug.Log(_cullDic.GetKeyArray(Allocator.Temp).Length); ; var handle = cull.Schedule(batchIndex + 1, 1); return(handle); }
private JobHandle OnPerformCulling( BatchRendererGroup rendererGroup, BatchCullingContext cullingContext) { var planes = FrustumPlanes.BuildSOAPlanePackets(cullingContext.cullingPlanes, Allocator.TempJob); var lodParams = LODGroupExtensions.CalculateLODParams(cullingContext.lodParameters); var cull = new MyCullJob() { Planes = planes, LODParams = lodParams, IndexList = cullingContext.visibleIndices, Batches = cullingContext.batchVisibility, CullDatas = cullData, }; var handle = cull.Schedule(100, 32, cullingDependency); cullingDependency = JobHandle.CombineDependencies(handle, cullingDependency); return(handle); }