public override void PreRenderFrame(PipelineCamera cam, ref PipelineCommandData data)
 {
     decalCullResults = new NativeArray <DecalData>(Decal.allDecalCount, Allocator.Temp);
     cullJob          = new DecalCullJob
     {
         count         = 0,
         decalDatas    = (DecalData *)decalCullResults.GetUnsafePtr(),
         frustumPlanes = (float4 *)data.frustumPlanes.Ptr()
     };
     handle = cullJob.ScheduleRef(Decal.allDecalCount, 32);
 }
Exemplo n.º 2
0
 public void PreRenderFrame(PipelineCamera cam, ref PipelineCommandData data)
 {
     decalCullResults = new NativeArray <DecalData>(DecalBase.allDecalCount, Allocator.Temp);
     cullJob          = new DecalCullJob
     {
         count                 = 0,
         decalDatas            = (DecalData *)decalCullResults.GetUnsafePtr(),
         frustumPlanes         = (float4 *)proper.frustumPlanes.Ptr(),
         availiableDistanceSqr = availiableDistance * availiableDistance,
         camPos                = cam.cam.transform.position
     };
     handle = cullJob.ScheduleRef(DecalBase.allDecalCount, 32);
 }