Browse Source

Added explanatory comments to the helper script

mac-autoexp
Nico de Poel 3 years ago
parent
commit
8c95269c69
  1. 10
      Assets/Scripts/Fsr2ImageEffectHelper.cs

10
Assets/Scripts/Fsr2ImageEffectHelper.cs

@ -18,13 +18,19 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE. // THE SOFTWARE.
using System;
using System.Collections; using System.Collections;
using System.Collections.Generic;
using UnityEngine; using UnityEngine;
namespace FidelityFX namespace FidelityFX
{ {
/// <summary>
/// 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.
/// </summary>
[RequireComponent(typeof(Camera), typeof(Fsr2ImageEffect))] [RequireComponent(typeof(Camera), typeof(Fsr2ImageEffect))]
public class Fsr2ImageEffectHelper : MonoBehaviour public class Fsr2ImageEffectHelper : MonoBehaviour
{ {

Loading…
Cancel
Save