From 8c95269c698293651c4405b3886690d020f962cc Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Mon, 27 Mar 2023 15:33:39 +0200 Subject: [PATCH] Added explanatory comments to the helper script --- Assets/Scripts/Fsr2ImageEffectHelper.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Assets/Scripts/Fsr2ImageEffectHelper.cs b/Assets/Scripts/Fsr2ImageEffectHelper.cs index 084a232..25b2902 100644 --- a/Assets/Scripts/Fsr2ImageEffectHelper.cs +++ b/Assets/Scripts/Fsr2ImageEffectHelper.cs @@ -18,13 +18,19 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -using System; using System.Collections; -using System.Collections.Generic; using UnityEngine; namespace FidelityFX { + /// + /// Small helper script to be used in conjunction with the Fsr2ImageEffect script. + /// The FSR2 image effect needs to be the last effect in the post-processing chain but for render scaling to work properly, it also needs to be the first to execute OnPreCull. + /// Unfortunately altering the script execution order does not affect the order in which OnPreCull is executed. Only the order of scripts on the same game object matters. + /// + /// When combining FSR2 upscaling with other post-processing effects (most notably Unity's Post-Processing Stack V2), + /// this script should be added to the same camera and moved up above any other scripts that have an OnPreCull method. + /// [RequireComponent(typeof(Camera), typeof(Fsr2ImageEffect))] public class Fsr2ImageEffectHelper : MonoBehaviour {