Struct UpscalerResolutionInfo
Resolution information from an upscaler for a given display resolution and quality mode. Used by pipelines to configure Dynamic Resolution Scaling bounds or display resolution info in UI.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public struct UpscalerResolutionInfo
Remarks
The constraint tells the pipeline how to select the render resolution:
- Fixed — render exactly at qualityModeResolution; the pipeline does not drive the resolution.
- Range — the pipeline drives the render resolution (render scale / dynamic resolution / forced) and must clamp it to minResolution..maxResolution (the upscaler's hard limits).
- None — the pipeline drives the render resolution, unconstrained.
Fields
constraint
How the upscaler constrains the render resolution (pin / bounded range / no constraint). See UpscalerResolutionConstraint and the type remarks. DLSS and XeSS expose per-quality min/max ranges (Range); FSR2 does not (global DRS support only).
Declaration
public UpscalerResolutionConstraint constraint
Field Value
| Type | Description |
|---|---|
| UpscalerResolutionConstraint |
maxResolution
Maximum resolution when constraint is Range. This is typically the upper bound before the upscaler stops providing benefit. Equals qualityModeResolution otherwise.
Declaration
public Vector2Int maxResolution
Field Value
| Type | Description |
|---|---|
| Vector2Int |
minResolution
Minimum resolution when constraint is Range. The upscaler guarantees acceptable quality down to this resolution. Equals qualityModeResolution otherwise.
Declaration
public Vector2Int minResolution
Field Value
| Type | Description |
|---|---|
| Vector2Int |
qualityModeResolution
Recommended render resolution for the current quality mode. This is the "optimal" resolution the upscaler suggests for best quality/performance balance. Authoritative when constraint is Fixed.
Declaration
public Vector2Int qualityModeResolution
Field Value
| Type | Description |
|---|---|
| Vector2Int |
recommendedMinScale
Advisory lower bound on the render scale (render resolution ÷ display resolution): below this the upscaler still works but its quality degrades (e.g. FSR2 past its recommended ~3x maximum upscale ratio, i.e. ~0.33). It is a resolution-independent ratio, unlike the hard minResolution/maxResolution pixel bounds. This is never clamped to — consumers may surface an informational notice when the render scale falls below it, but must keep rendering at the chosen scale. Defaults to 0 meaning "no recommendation".
Declaration
public float recommendedMinScale
Field Value
| Type | Description |
|---|---|
| float |
Methods
Fixed(Vector2Int)
Creates resolution info for a fixed resolution (no DRS range).
Declaration
public static UpscalerResolutionInfo Fixed(Vector2Int resolution)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2Int | resolution | The fixed optimal resolution. |
Returns
| Type | Description |
|---|---|
| UpscalerResolutionInfo | Resolution info with constraint = Fixed. |
Range(Vector2Int, Vector2Int)
Creates resolution info for a render-resolution range the pipeline drives within (render scale / dynamic
resolution / forced), clamped to the upscaler's hard min..max limits.
Use to expose a quality mode's [min,max] as a clamp (e.g. DLSS in Custom Scaling), or for any upscaler with a
hard render-resolution limit. The constraint is Range
(clamped, not pinned); when min equals max there is effectively no range,
so the constraint is None.
Declaration
public static UpscalerResolutionInfo Range(Vector2Int min, Vector2Int max)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector2Int | min | The minimum render resolution the upscaler supports. |
| Vector2Int | max | The maximum render resolution (typically the display resolution). |
Returns
| Type | Description |
|---|---|
| UpscalerResolutionInfo | Resolution info with a Range clamp (or None when min == max). |