Browse Source

Applied correct macros to input and output texture definitions for HDRP support

fsr3
Nico de Poel 2 years ago
parent
commit
c66ab6136d
  1. 2
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/ffx_fsr3upscaler_rcas_pass.compute
  2. 8
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Shaders/FSR3/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h

2
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_JITTERED_MOTION_VECTORS
#pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_INVERTED_DEPTH #pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_INVERTED_DEPTH
#pragma multi_compile_local __ UNITY_FSR3UPSCALER_HDRP
#include "ffx_fsr3upscaler_unity_common.cginc" #include "ffx_fsr3upscaler_unity_common.cginc"
#include "shaders/ffx_fsr3upscaler_rcas_pass.hlsl" #include "shaders/ffx_fsr3upscaler_rcas_pass.hlsl"

8
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<FfxFloat32x2> r_auto_exposure : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_AUTO_EXPOSURE); Texture2D<FfxFloat32x2> r_auto_exposure : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_AUTO_EXPOSURE);
#endif #endif
#if defined FSR3UPSCALER_BIND_SRV_REACTIVE_MASK #if defined FSR3UPSCALER_BIND_SRV_REACTIVE_MASK
Texture2D<FfxFloat32> 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 #endif
#if defined FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK #if defined FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK
Texture2D<FfxFloat32> 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 #endif
#if defined FSR3UPSCALER_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH #if defined FSR3UPSCALER_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH
Texture2D<FfxUInt32> r_reconstructed_previous_nearest_depth : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH); Texture2D<FfxUInt32> 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) #if defined(FSR3UPSCALER_BIND_SRV_REACTIVE_MASK)
FfxFloat32 LoadReactiveMask(FfxUInt32x2 iPxPos) FfxFloat32 LoadReactiveMask(FfxUInt32x2 iPxPos)
{ {
return r_reactive_mask[iPxPos];
return r_reactive_mask[UNITY_FSR3_POS(iPxPos)];
} }
#endif #endif
#if defined(FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK) #if defined(FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK)
FfxFloat32 LoadTransparencyAndCompositionMask(FfxUInt32x2 iPxPos) FfxFloat32 LoadTransparencyAndCompositionMask(FfxUInt32x2 iPxPos)
{ {
return r_transparency_and_composition_mask[iPxPos];
return r_transparency_and_composition_mask[UNITY_FSR3_POS(iPxPos)];
} }
#endif #endif

Loading…
Cancel
Save