From 341921bdda2a19dcf483f0a6d84f1a13014e38b0 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Sun, 5 Mar 2023 00:18:24 +0100 Subject: [PATCH] Perform camera scaling in OnPreCull, instead of OnPreRender. Fixed compatibility with post-FX executing OnPreRender before FSR2, and which retrieve camera resolution values to perform their rendering. For example: HBAO. --- Assets/Scripts/Fsr2Controller.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Scripts/Fsr2Controller.cs b/Assets/Scripts/Fsr2Controller.cs index f16b55f..a5e93ed 100644 --- a/Assets/Scripts/Fsr2Controller.cs +++ b/Assets/Scripts/Fsr2Controller.cs @@ -164,7 +164,7 @@ namespace FidelityFX _reset = true; } - private void OnPreRender() + private void OnPreCull() { // Render to a smaller portion of the screen by manipulating the camera's viewport rect _originalRect = _renderCamera.rect;