Exemplo n.º 1
0
 internal static void SetupCullingResultsForRendering(ref RenderingData renderingData, ref CullingResults cullingResults, PerObjectData perObjectData)
 {
     if (0 < renderingData.lightData.additionalLightsCount && (perObjectData & PerObjectData.LightIndices) != 0)
     {
         cullingResults.visibleLights.CopyFrom(renderingData.cullResults.visibleLights);
         var lightIndexMap = renderingData.cullResults.GetLightIndexMap(Unity.Collections.Allocator.Temp);
         cullingResults.SetLightIndexMap(lightIndexMap);
         lightIndexMap.Dispose();
     }
     if ((perObjectData & PerObjectData.ReflectionProbes) != 0)
     {
         cullingResults.visibleReflectionProbes.CopyFrom(renderingData.cullResults.visibleReflectionProbes);
         var indexMap = renderingData.cullResults.GetReflectionProbeIndexMap(Unity.Collections.Allocator.Temp);
         cullingResults.SetReflectionProbeIndexMap(indexMap);
         indexMap.Dispose();
     }
 }