@ -35,6 +35,8 @@ namespace UnityEngine.Rendering.PostProcessing
[Tooltip("Strength of the sharpening effect.")]
[Tooltip("Strength of the sharpening effect.")]
[Range(0, 1)] public float sharpness = 0.8f ;
[Range(0, 1)] public float sharpness = 0.8f ;
public bool enableFP16 = true ;
[Tooltip("Choose where to get the exposure value from. Use auto-exposure from either the upscaler or Unity, provide a manual exposure texture, or use a default value.")]
[Tooltip("Choose where to get the exposure value from. Use auto-exposure from either the upscaler or Unity, provide a manual exposure texture, or use a default value.")]
public ExposureSource exposureSource = ExposureSource . Auto ;
public ExposureSource exposureSource = ExposureSource . Auto ;
[Tooltip("Value by which the input signal will be divided, to get back to the original signal produced by the game.")]
[Tooltip("Value by which the input signal will be divided, to get back to the original signal produced by the game.")]
@ -112,6 +114,7 @@ namespace UnityEngine.Rendering.PostProcessing
private Fsr2 . QualityMode _prevQualityMode ;
private Fsr2 . QualityMode _prevQualityMode ;
private ExposureSource _prevExposureSource ;
private ExposureSource _prevExposureSource ;
private Vector2Int _prevUpscaleSize ;
private Vector2Int _prevUpscaleSize ;
private bool _prevFP16 ;
private Rect _originalRect ;
private Rect _originalRect ;
@ -165,7 +168,7 @@ namespace UnityEngine.Rendering.PostProcessing
// Monitor for any resolution changes and recreate the upscaler context if necessary
// Monitor for any resolution changes and recreate the upscaler context if necessary
// We can't create an upscaler context without info from the post-processing context, so delay the initial setup until here
// We can't create an upscaler context without info from the post-processing context, so delay the initial setup until here
if ( ! _initialized | | _upscaler = = null | | _upscaleSize . x ! = _prevUpscaleSize . x | | _upscaleSize . y ! = _prevUpscaleSize . y | |
if ( ! _initialized | | _upscaler = = null | | _upscaleSize . x ! = _prevUpscaleSize . x | | _upscaleSize . y ! = _prevUpscaleSize . y | |
upscalerType ! = _prevUpscalerType | | qualityMode ! = _prevQualityMode | | exposureSource ! = _prevExposureSource )
upscalerType ! = _prevUpscalerType | | qualityMode ! = _prevQualityMode | | exposureSource ! = _prevExposureSource | | enableFP16 ! = _prevFP16 )
{
{
DestroyUpscaler ( ) ;
DestroyUpscaler ( ) ;
CreateUpscaler ( context ) ;
CreateUpscaler ( context ) ;
@ -199,6 +202,7 @@ namespace UnityEngine.Rendering.PostProcessing
_prevQualityMode = qualityMode ;
_prevQualityMode = qualityMode ;
_prevExposureSource = exposureSource ;
_prevExposureSource = exposureSource ;
_prevUpscaleSize = _upscaleSize ;
_prevUpscaleSize = _upscaleSize ;
_prevFP16 = enableFP16 ;
_callbacks = callbacksFactory ( context ) ;
_callbacks = callbacksFactory ( context ) ;