@ -130,8 +130,12 @@ namespace FidelityFX
bool resetAccumulation = dispatchParams . Reset | | _firstExecution ;
_firstExecution = false ;
// TODO: auto-exposure flag
if ( dispatchParams . Exposure = = null ) dispatchParams . Exposure = _resources . DefaultExposure ;
// if auto exposure is enabled use the auto exposure SRV, otherwise what the app sends.
if ( ( _contextDescription . Flags & Fsr2 . InitializationFlags . EnableAutoExposure ) ! = 0 )
dispatchParams . Exposure = _resources . AutoExposure ;
else if ( dispatchParams . Exposure = = null )
dispatchParams . Exposure = _resources . DefaultExposure ;
if ( dispatchParams . Reactive = = null ) dispatchParams . Reactive = _resources . DefaultReactive ;
if ( dispatchParams . TransparencyAndComposition = = null ) dispatchParams . TransparencyAndComposition = _resources . DefaultReactive ;
Fsr2Pipeline . RegisterResources ( commandBuffer , _contextDescription , dispatchParams ) ;
@ -347,8 +351,7 @@ namespace FidelityFX
spdConstants . renderSizeY = ( uint ) dispatchParams . RenderSize . y ;
}
private static void SpdSetup ( RectInt rectInfo ,
out Vector2Int dispatchThreadGroupCount , out Vector2Int workGroupOffset , out Vector2Int numWorkGroupsAndMips , int mips = - 1 )
private static void SpdSetup ( RectInt rectInfo , out Vector2Int dispatchThreadGroupCount , out Vector2Int workGroupOffset , out Vector2Int numWorkGroupsAndMips , int mips = - 1 )
{
workGroupOffset = new Vector2Int ( rectInfo . x / 6 4 , rectInfo . y / 6 4 ) ;
@ -367,7 +370,7 @@ namespace FidelityFX
private void DebugCheckDispatch ( Fsr2 . DispatchDescription dispatchParams )
{
// Global texture binding may happen as part of the command list, which is why we check these after running the process at least once
// Global texture binding may be queued as part of the command list, which is why we check these after running the process at least once
if ( ! _firstExecution )
{
if ( ! dispatchParams . Color . HasValue & & Shader . GetGlobalTexture ( Fsr2Pipeline . SrvInputColor ) = = null )
@ -443,7 +446,7 @@ namespace FidelityFX
if ( infiniteDepth )
{
if ( dispatchParams . CameraNear ! = float . MaxValue )
if ( dispatchParams . CameraNear < float . MaxValue )
{
Debug . LogWarning ( "EnableDepthInfinite and EnableDepthInverted present, yet CameraNear != float.MaxValue" ) ;
}
@ -463,7 +466,7 @@ namespace FidelityFX
if ( infiniteDepth )
{
if ( dispatchParams . CameraFar ! = float . MaxValue )
if ( dispatchParams . CameraFar < float . MaxValue )
{
Debug . LogWarning ( "EnableDepthInfinite present, yet CameraFar != float.MaxValue" ) ;
}