From 72f2aa9da28b9d67be1ada2ed6a45e33097ce4cb Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Wed, 5 Jun 2024 13:01:02 +0200 Subject: [PATCH] HDRP-ified input reactive and T&C masks, which is necessary to make them work inside of HDRP's current upscaling framework --- .../fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Assets/Shaders/FSR3/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h b/Assets/Shaders/FSR3/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h index c70bc1d..13b317a 100644 --- a/Assets/Shaders/FSR3/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h +++ b/Assets/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