@ -98,6 +98,10 @@ namespace UnityEngine.Rendering.PostProcessing
// TODO: if PSSR needs a copy of the previous depth and motion vectors anyway, why not just double-buffer those resources ourselves and make good use of these otherwise dumb copies?
PrepareInputs ( cmd , context , config , _inputColor , _inputDepth , _inputMotionVectors ) ;
var flags = PSSRPlugin . OptionFlags . None ;
if ( SystemInfo . usesReversedZBuffer ) flags | = PSSRPlugin . OptionFlags . ReverseDepth ;
if ( config . exposureSource = = Upscaling . ExposureSource . Auto ) flags | = PSSRPlugin . OptionFlags . AutoExposure ;
_dispatchParams . color = ToNativePtr ( _inputColor ) ;
_dispatchParams . depth = ToNativePtr ( _inputDepth ) ;
@ -119,6 +123,7 @@ namespace UnityEngine.Rendering.PostProcessing
_dispatchParams . FromCamera ( context . camera ) ;
_dispatchParams . preExposure = config . preExposure ;
_dispatchParams . resetHistory = config . Reset ? 1 u : 0 u ;
_dispatchParams . flags = flags ;
Marshal . StructureToPtr ( _dispatchParams , _dispatchParamsBuffer , false ) ;
cmd . IssuePluginEventAndData ( PSSRPlugin . GetRenderEventAndDataFunc ( ) , 1 , _dispatchParamsBuffer ) ;
@ -185,12 +190,11 @@ namespace UnityEngine.Rendering.PostProcessing
public double camPositionX ;
public double camPositionY ;
public double camPositionZ ;
public float pad ;
public float camNear ;
public float camFar ;
public float preExposure ;
public uint resetHistory ;
public OptionFlags flags ;
public void FromCamera ( Camera cam )
{
@ -201,12 +205,20 @@ namespace UnityEngine.Rendering.PostProcessing
camPositionX = cam . transform . position . x ;
camPositionY = cam . transform . position . y ;
camPositionZ = cam . transform . position . z ;
pad = 0f ;
camNear = cam . nearClipPlane ;
camFar = cam . farClipPlane ;
}
}
[Flags]
public enum OptionFlags : uint
{
None = 0 u ,
ViewSpaceDepth = 1 u < < 1 4 ,
ReverseDepth = 1 u < < 1 5 ,
AutoExposure = 1 u < < 1 6 ,
PassThrough = 1 u < < 3 1 ,
}
}
#else
public static bool IsSupported = > false ;