From 5a0482f0bc8a71ea9472d32399c07b06ee432835 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Fri, 2 Jun 2023 13:08:23 +0200 Subject: [PATCH] Comments and tooltips --- Assets/Scripts/Fsr2ImageEffect.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Assets/Scripts/Fsr2ImageEffect.cs b/Assets/Scripts/Fsr2ImageEffect.cs index 3dfc2ea..e6e1f60 100644 --- a/Assets/Scripts/Fsr2ImageEffect.cs +++ b/Assets/Scripts/Fsr2ImageEffect.cs @@ -69,9 +69,13 @@ namespace FidelityFX [Serializable] public class GenerateReactiveParameters { + [Tooltip("A value to scale the output")] [Range(0, 2)] public float scale = 0.5f; + [Tooltip("A threshold value to generate a binary reactive mask")] [Range(0, 1)] public float cutoffThreshold = 0.2f; + [Tooltip("A value to set for the binary reactive mask")] [Range(0, 1)] public float binaryValue = 0.9f; + [Tooltip("Flags to determine how to generate the reactive mask")] public Fsr2.GenerateReactiveFlags flags = Fsr2.GenerateReactiveFlags.ApplyTonemap | Fsr2.GenerateReactiveFlags.ApplyThreshold | Fsr2.GenerateReactiveFlags.UseComponentsMax; } @@ -266,6 +270,7 @@ namespace FidelityFX _renderCamera.rect = new Rect(0, 0, _originalRect.width * _renderSize.x / _renderCamera.pixelWidth, _originalRect.height * _renderSize.y / _renderCamera.pixelHeight); } + // Set up the opaque-only command buffer to make a copy of the camera color buffer right before transparent drawing starts _opaqueInputCommandBuffer.Clear(); if (autoGenerateReactiveMask || autoGenerateTransparencyAndComposition) { @@ -314,6 +319,7 @@ namespace FidelityFX _dispatchDescription.Reset = _reset; _reset = false; + // Set up the parameters for the optional experimental auto-TCR feature _dispatchDescription.EnableAutoReactive = autoGenerateTransparencyAndComposition; if (autoGenerateTransparencyAndComposition) {