|
|
@ -70,7 +70,7 @@ public class Fsr2Controller : MonoBehaviour |
|
|
|
|
|
|
|
|
// TODO: destroy and recreate context on screen resolution and/or quality mode change
|
|
|
// TODO: destroy and recreate context on screen resolution and/or quality mode change
|
|
|
// TODO: enable motion vector jitter cancellation or not?
|
|
|
// TODO: enable motion vector jitter cancellation or not?
|
|
|
_context = Fsr2.CreateContext(DisplaySize, RenderSize); |
|
|
|
|
|
|
|
|
_context = Fsr2.CreateContext(DisplaySize, RenderSize, Fsr2.InitializationFlags.EnableMotionVectorsJitterCancellation); |
|
|
|
|
|
|
|
|
// TODO: do we need a depth buffer for the output? We will need depth & motion vectors for subsequent post-FX. How should FSR2 output these?
|
|
|
// TODO: do we need a depth buffer for the output? We will need depth & motion vectors for subsequent post-FX. How should FSR2 output these?
|
|
|
// TODO: can probably be a temporary RT
|
|
|
// TODO: can probably be a temporary RT
|
|
|
@ -120,7 +120,7 @@ public class Fsr2Controller : MonoBehaviour |
|
|
_dispatchDescription.Output = _outputRT; |
|
|
_dispatchDescription.Output = _outputRT; |
|
|
_dispatchDescription.Exposure = null; |
|
|
_dispatchDescription.Exposure = null; |
|
|
_dispatchDescription.Reactive = null; |
|
|
_dispatchDescription.Reactive = null; |
|
|
_dispatchDescription.PreExposure = 1.0f; |
|
|
|
|
|
|
|
|
_dispatchDescription.PreExposure = 0; |
|
|
_dispatchDescription.EnableSharpening = performSharpenPass; |
|
|
_dispatchDescription.EnableSharpening = performSharpenPass; |
|
|
_dispatchDescription.Sharpness = sharpness; |
|
|
_dispatchDescription.Sharpness = sharpness; |
|
|
_dispatchDescription.MotionVectorScale.x = gameCamera.pixelWidth; |
|
|
_dispatchDescription.MotionVectorScale.x = gameCamera.pixelWidth; |
|
|
@ -136,6 +136,7 @@ public class Fsr2Controller : MonoBehaviour |
|
|
RenderTexture.ReleaseTemporary(motionVectors); |
|
|
RenderTexture.ReleaseTemporary(motionVectors); |
|
|
|
|
|
|
|
|
// Output upscaled image to screen
|
|
|
// Output upscaled image to screen
|
|
|
|
|
|
// TODO: we should probably use a shader to include depth & motion vectors into the output
|
|
|
Graphics.Blit(_outputRT, dest); |
|
|
Graphics.Blit(_outputRT, dest); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |