Version: 2017.2
Experimental: this API is experimental and might be changed or removed in the future.

CullResults

struct in UnityEngine.Experimental.Rendering

Switch to Manual

Description

Culling results (visible objects, lights, reflection probes).

In a scriptable render loop, the rendering process is typically doing culling for each camera (CullResults.Cull), followed by rendering subsets of visible objects (RenderLoop.DrawRenderers) and processing visible lights (visibleLights, visibleReflectionProbes).

CullResults also provides several functions to aid shadow rendering (ComputeDirectionalShadowMatricesAndCullingPrimitives, ComputeSpotShadowMatricesAndCullingPrimitives, ComputePointShadowMatricesAndCullingPrimitives).

Variables

visibleLightsArray of visible lights.
visibleOffscreenVertexLightsOff screen lights that still effect visible scene vertices.
visibleReflectionProbesArray of visible reflection probes.

Public Functions

ComputeDirectionalShadowMatricesAndCullingPrimitivesCalculates the view and projection matrices and shadow split data for a directional light.
ComputePointShadowMatricesAndCullingPrimitivesCalculates the view and projection matrices and shadow split data for a point light.
ComputeSpotShadowMatricesAndCullingPrimitivesCalculates the view and projection matrices and shadow split data for a spot light.
FillLightIndicesFills a compute buffer with per-object light indices.
GetLightIndicesCountGets the number of per-object light indices.
GetShadowCasterBoundsReturns the bounding box that encapsulates the visible shadow casters. Can be used to, for instance, dynamically adjust cascade ranges.

Static Functions

CullPerform culling for a Camera.
GetCullingParametersGet culling parameters for a camera.