penis/Library/PackageCache/com.unity.render-pipelines.core@bc2ed918b479/Runtime/GPUDriven/InstanceCullerBurst.cs
Vladislav 2750530006 1
2025-09-18 15:33:57 +03:00

20 lines
971 B
C#

using Unity.Collections;
using Unity.Burst;
namespace UnityEngine.Rendering
{
[BurstCompile]
internal static class InstanceCullerBurst
{
[BurstCompile(DisableSafetyChecks = true, OptimizeFor = OptimizeFor.Performance)]
public static unsafe void SetupCullingJobInput(float lodBias, BatchCullingContext* context, ReceiverPlanes* receiverPlanes,
ReceiverSphereCuller* receiverSphereCuller, FrustumPlaneCuller* frustumPlaneCuller, float* screenRelativeMetric)
{
*receiverPlanes = ReceiverPlanes.Create(*context, Allocator.TempJob);
*receiverSphereCuller = ReceiverSphereCuller.Create(*context, Allocator.TempJob);
*frustumPlaneCuller = FrustumPlaneCuller.Create(*context, receiverPlanes->planes.AsArray(), *receiverSphereCuller, Allocator.TempJob);
*screenRelativeMetric = LODGroupRenderingUtils.CalculateScreenRelativeMetric(context->lodParameters, lodBias);
}
}
}