Class HDDynamicResolution
Component that controls dynamic resolution scaling in HDRP (High Definition Render Pipeline) via DRH (Dynamic Resolution Handler).
Inherited Members
Namespace: Global Namespace
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
public class HDDynamicResolution : MonoBehaviour
Remarks
This class controls the dynamic resolution based on the averaged GPU frametime over [EvaluationFrameCount] frames. If it exceeds the target [ScaleUpDuration] times consecutively (which takes [ScaleUpDuration] * [EvaluationFrameCount] frames), we request an increased screen scale to DRH. If it falls behind the target framerate [ScaleDownDuration] times consecutively, we request a decreased screen scale to DRH.
Fields
Name | Description |
---|---|
DefaultTargetFrameRate | Target frame rate for dynamic resolution. If Application.targetFrameRate is already set, Application.targetFrameRate overrides this parameter. |
EnableDebugView | Enables the debug view of dynamic resolution. Only on development build or editor. |
EvaluationFrameCount | We evaluate GPU performance every [EvaluationFrameCount] frames. The evaluation is comparison between the averaged GPU frame time over [EvaluationFrameCount] frames and 1 / [DefaultTargetFrameRate]. |
ScaleDownDuration | If averaged GPU framerate falls behind the target framerate [ScaleDownDuration] times consecutively, we request decreased scale to DRH. |
ScaleDownStepCount | The number of steps to downscale from maximum screen percentage to minimum screen percentage. |
ScaleUpDuration | If averaged GPU framerate exceeds the target framerate [ScaleUpDuration] times consecutively, we request increased scale to DRH. |
ScaleUpStepCount | The number of steps to upscale from minimum screen percentage to maximum screen percentage. |