WarmUpProgressively(int, JobHandle)
Prewarms the given number of shader variant state permutations using associated graphics states.
읽는 시간 1분최근 업데이트: 한 달 전
Definition
- Type: Method
- Namespace: UnityEngine.Experimental.Rendering
- Assembly: UnityEngine.CoreModule
public JobHandle WarmUpProgressively(int count, JobHandle dependency = default)
Parameters
Returns
Type | Description |
|---|---|
| JobHandle | Handle to prewarming job. |
Remarks
Full graphics state collection warmup is only supported when SystemInfo.supportsParallelPSOCreation is true. Otherwise, behavior falls back to the legacy ShaderVariantCollection.WarmUp and restricts the maximum number of shader variants instead of shader variant permutations.
countusing UnityEngine;using UnityEngine.Experimental.Rendering;using Unity.Jobs;public class GraphicsStateCollectionWarmup : MonoBehaviour{ public GraphicsStateCollection graphicsStateCollection; public int statesToWarmup; void Start() { JobHandle handle = graphicsStateCollection.WarmUpProgressively(statesToWarmup); }}