From 1ca5a36f3ee15adda25c282f2403d23dd6e0e125 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Fri, 24 Feb 2023 13:36:45 +0100 Subject: [PATCH] Cleanup and minor details --- Assets/Scripts/Fsr2Controller.cs | 2 +- Assets/Scripts/Fsr2Pipeline.cs | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/Assets/Scripts/Fsr2Controller.cs b/Assets/Scripts/Fsr2Controller.cs index 6d656d9..198fa93 100644 --- a/Assets/Scripts/Fsr2Controller.cs +++ b/Assets/Scripts/Fsr2Controller.cs @@ -74,7 +74,7 @@ public class Fsr2Controller : MonoBehaviour // 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 - _outputRT = new RenderTexture(DisplaySize.x, DisplaySize.y, 24, RenderTextureFormat.ARGBHalf) { enableRandomWrite = true }; + _outputRT = new RenderTexture(DisplaySize.x, DisplaySize.y, 24, RenderTextureFormat.ARGBHalf) { name = "FSR2 Upscaled Output", enableRandomWrite = true }; _outputRT.Create(); } diff --git a/Assets/Scripts/Fsr2Pipeline.cs b/Assets/Scripts/Fsr2Pipeline.cs index 182b4b2..136e801 100644 --- a/Assets/Scripts/Fsr2Pipeline.cs +++ b/Assets/Scripts/Fsr2Pipeline.cs @@ -24,7 +24,6 @@ namespace FidelityFX protected static readonly int SrvInputDepth = Shader.PropertyToID("r_input_depth"); protected static readonly int SrvInputExposure = Shader.PropertyToID("r_input_exposure"); protected static readonly int SrvDilatedMotionVectors = Shader.PropertyToID("r_dilated_motion_vectors"); - protected static readonly int SrvDilatedDepth = Shader.PropertyToID("r_dilatedDepth"); protected static readonly int SrvReactiveMask = Shader.PropertyToID("r_reactive_mask"); protected static readonly int SrvTransparencyAndCompositionMask = Shader.PropertyToID("r_transparency_and_composition_mask"); protected static readonly int SrvPrevDilatedMotionVectors = Shader.PropertyToID("r_previous_dilated_motion_vectors"); @@ -171,12 +170,6 @@ namespace FidelityFX public override void ScheduleDispatch(CommandBuffer commandBuffer, Fsr2.DispatchDescription dispatchParams, int frameIndex, int dispatchX, int dispatchY) { - // Problems to solve: - // - How do resources (render textures) relate to SRV/UAV bindings? How are those tied together? - // - What about the SRV/UAVs that are not related to any resources? Where are those filled in? - // - How do we clear the resources that need to be cleared at dispatch? (SetBufferData) - // - Shouldn't we use a ComputeBuffer for resources that are one-dimensional and clearly not image data? e.g. SPD atomic counter & Lanczos LUT data - commandBuffer.SetComputeTextureParam(ComputeShader, KernelIndex, SrvInputColor, dispatchParams.ColorDepth, 0, RenderTextureSubElement.Color); commandBuffer.SetComputeTextureParam(ComputeShader, KernelIndex, UavExposureMipLumaChange, Resources.SceneLuminance, ShadingChangeMipLevel);