Version: 2022.1
LanguageEnglish
  • C#

BatchCullingContext

struct in UnityEngine.Rendering

/

Implemented in:UnityEngine.CoreModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Culling context for a batch.

Specifies the data required to perform culling. See Also: OnPerformCulling.

Properties

cullingLayerMaskThe cullingLayerMask value of the object from which the culling is invoked. The draw command is discarded by the internal culling if the expression (1 << layer) & cullingLayerMask is false. Using this field is optional, use it for performance or other optimization purposes.
cullingMatrixCulling matrix.
cullingPlanesPlanes to cull against.
cullingSplitsThe array of CullingSplit structs.
isOrthographicTrue if the view is orthographic.
localToWorldMatrixLocal to world matrix.
lodParametersSee Also: LODParameters.
receiverPlaneCountThe number of receiver planes.
receiverPlaneOffsetThe index of the first receiver plane in the BatchCullingContext.cullingPlanes array.
sceneCullingMaskUse this bit mask to discard the draw commands in a particular context. A draw command is not discarded if the expression (1 << layer) & sceneCullingMask is true. This field is typically used when rendering Editor previews.
viewIDThe ID of the object from which the culling is invoked. Usage example: store culling-related data for each object.
viewTypeThe type of the view from which the culling is invoked. Usage examples: skip culling, take different culling paths depending on the view type, etc.