Version: 2022.3
言語: 日本語

ScriptableCullingParameters

struct in UnityEngine.Rendering

マニュアルに切り替える

説明

Parameters that configure a culling operation in the Scriptable Render Pipeline.

Obtain a ScriptableCullingParameters struct by calling Camera.TryGetCullingParameters.

Note that you can obtain and view a ScriptableCullingParameters struct from a Camera in the Built-in Render Pipeline; however, changing the values has no effect.

The following Scriptable Render Pipeline code demonstrates how to obtain a ScriptableCullingParameters struct from a Camera using Camera.TryGetCullingParameters, configure the struct, and then pass the struct to ScriptableRenderContext.Cull to obtain a CullingResults struct. You can then use the CullingResults struct in a call to ScriptableRenderContext.DrawRenderers.

using UnityEngine;
using UnityEngine;
using UnityEngine.Rendering;

public class ExampleRenderPipelineInstance : RenderPipeline { public ExampleRenderPipelineInstance() { }

protected override void Render(ScriptableRenderContext context, Camera[] cameras) { // Get the culling parameters from the desired Camera if (cameras[0].TryGetCullingParameters(out var cullingParameters)) { // Change culling parameters to configure the culling operation cullingParameters.cullingOptions &= ~CullingOptions.OcclusionCull; cullingParameters.isOrthographic = false;

// Schedule the cull operation CullingResults cullingResults = context.Cull(ref cullingParameters);

// Place code that schedules drawing operations using the CullingResults struct here // See ScriptableRenderContext.DrawRenderers for details and examples // …

// Execute all of the scheduled operations, in order context.Submit(); } } }

Static 変数

cullingJobsLowerLimitThe lower limit to the value ScriptableCullingParameters.maximumPortalCullingJobs.
cullingJobsUpperLimitThe upper limit to the value ScriptableCullingParameters.maximumPortalCullingJobs.
layerCountThe amount of layers available.
maximumCullingPlaneCountMaximum amount of culling planes that can be specified.

変数

accurateOcclusionThresholdThis parameter determines query distance for occlusion culling.
cameraPropertiesCamera Properties used for culling.
conservativeEnclosingSphereThis property enables a conservative method for calculating the size and position of the minimal enclosing sphere around the frustum cascade corner points for shadow culling.
cullingMaskThe mask for the culling operation.
cullingMatrixThe matrix for the culling operation.
cullingOptionsFlags to configure a culling operation in the Scriptable Render Pipeline.
cullingPlaneCountNumber of culling planes to use.
isOrthographicIs the cull orthographic.
lodParametersLODParameters for culling.
maximumPortalCullingJobsThis parameter controls how many active jobs contribute to occlusion culling.
maximumVisibleLightsThis parameter controls how many visible lights are allowed.
numIterationsEnclosingSphere
originPosition for the origin of the cull.
reflectionProbeSortingCriteriaReflection Probe Sort options for the cull.
shadowDistanceShadow distance to use for the cull.
shadowNearPlaneOffsetOffset to apply to the near camera plane when performing shadow map rendering.
stereoProjectionMatrixThe projection matrix generated for single-pass stereo culling.
stereoSeparationDistance仮想目間の距離。
stereoViewMatrixThe view matrix generated for single-pass stereo culling.

Public 関数

GetCullingPlaneFetch the culling plane at the given index.
GetLayerCullingDistanceGet the distance for the culling of a specific layer.
SetCullingPlaneSet the culling plane at a given index.
SetLayerCullingDistanceSet the distance for the culling of a specific layer.