From c66ab6136d9601ab3bd7662988623345514d3dc4 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Wed, 26 Jun 2024 11:44:26 +0200 Subject: [PATCH] Applied correct macros to input and output texture definitions for HDRP support --- .../Shaders/FSR3/ffx_fsr3upscaler_rcas_pass.compute | 2 ++ .../fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/ffx_fsr3upscaler_rcas_pass.compute b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/ffx_fsr3upscaler_rcas_pass.compute index 04c2fe4..be7bbb5 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/ffx_fsr3upscaler_rcas_pass.compute +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/ffx_fsr3upscaler_rcas_pass.compute @@ -24,6 +24,8 @@ #pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_JITTERED_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_INVERTED_DEPTH +#pragma multi_compile_local __ UNITY_FSR3UPSCALER_HDRP + #include "ffx_fsr3upscaler_unity_common.cginc" #include "shaders/ffx_fsr3upscaler_rcas_pass.hlsl" diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h index c70bc1d..13b317a 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h @@ -359,10 +359,10 @@ SamplerState s_LinearClamp : register(s1); Texture2D r_auto_exposure : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_AUTO_EXPOSURE); #endif #if defined FSR3UPSCALER_BIND_SRV_REACTIVE_MASK - Texture2D r_reactive_mask : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_REACTIVE_MASK); + UNITY_FSR3_TEX2D(FfxFloat32) r_reactive_mask : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_REACTIVE_MASK); #endif #if defined FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK - Texture2D r_transparency_and_composition_mask : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK); + UNITY_FSR3_TEX2D(FfxFloat32) r_transparency_and_composition_mask : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK); #endif #if defined FSR3UPSCALER_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH Texture2D r_reconstructed_previous_nearest_depth : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH); @@ -511,14 +511,14 @@ FfxFloat32 SampleInputDepth(FfxFloat32x2 fUV) #if defined(FSR3UPSCALER_BIND_SRV_REACTIVE_MASK) FfxFloat32 LoadReactiveMask(FfxUInt32x2 iPxPos) { - return r_reactive_mask[iPxPos]; + return r_reactive_mask[UNITY_FSR3_POS(iPxPos)]; } #endif #if defined(FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK) FfxFloat32 LoadTransparencyAndCompositionMask(FfxUInt32x2 iPxPos) { - return r_transparency_and_composition_mask[iPxPos]; + return r_transparency_and_composition_mask[UNITY_FSR3_POS(iPxPos)]; } #endif