Class FSRUtils
Utility functions relating to FidelityFX Super Resolution (FSR)
These functions are expected to be used in conjuction with the helper functions provided by FSRCommon.hlsl.
Inherited Members
Namespace: UnityEngine.Rendering
Assembly: Unity.RenderPipelines.Core.Runtime.dll
Syntax
public static class FSRUtils
Fields
| Name | Description |
|---|---|
| kDefaultSharpnessLinear | The default RCAS sharpness parameter as a linear value |
| kDefaultSharpnessStops | AMD's FidelityFX Super Resolution integration guide recommends a value of 0.2 for the RCAS sharpness parameter when specified in stops |
Methods
| Name | Description |
|---|---|
| IsSupported() | Returns true if FidelityFX Super Resolution (FSR) is supported on the current system FSR requires the textureGather shader instruction which wasn't supported by OpenGL ES until version 3.1 |
| SetEasuConstants(BaseCommandBuffer, Vector2, Vector2, Vector2) | |
| SetEasuConstants(CommandBuffer, Vector2, Vector2, Vector2) | Sets the constant values required by the FSR EASU shader on the provided command buffer Logic ported from "FsrEasuCon()" in Runtime/PostProcessing/Shaders/ffx/ffx_fsr1.hlsl |
| SetRcasConstants(CommandBuffer, float) | Sets the constant values required by the FSR RCAS shader on the provided command buffer Logic ported from "FsrRcasCon()" in Runtime/PostProcessing/Shaders/ffx/ffx_fsr1.hlsl For a more user-friendly version of this function, see SetRcasConstantsLinear(). |
| SetRcasConstantsLinear(RasterCommandBuffer, float) | |
| SetRcasConstantsLinear(CommandBuffer, float) | Sets the constant values required by the FSR RCAS shader on the provided command buffer Equivalent to SetRcasConstants(), but handles the sharpness parameter as a linear value instead of one specified in stops. This is intended to simplify code that allows users to configure the sharpening behavior from a GUI. |