Browse Source

Also use HDRP texture array workaround for opaque-only color input buffer

mac-autoexp
Nico de Poel 3 years ago
parent
commit
26cb485c30
  1. 6
      Assets/Resources/FSR2/shaders/ffx_fsr2_callbacks_hlsl.h

6
Assets/Resources/FSR2/shaders/ffx_fsr2_callbacks_hlsl.h

@ -237,7 +237,7 @@ SamplerState s_LinearClamp : register(s1);
// SRVs // SRVs
#if defined(FFX_INTERNAL) #if defined(FFX_INTERNAL)
Texture2D<FfxFloat32x4> r_input_opaque_only : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_OPAQUE_ONLY);
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_opaque_only : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_OPAQUE_ONLY);
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_COLOR); UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_COLOR);
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_MOTION_VECTORS); UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_MOTION_VECTORS);
UNITY_FSR2_TEX2D(FfxFloat32) r_input_depth : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_DEPTH); UNITY_FSR2_TEX2D(FfxFloat32) r_input_depth : FFX_FSR2_DECLARE_SRV(FFX_FSR2_RESOURCE_IDENTIFIER_INPUT_DEPTH);
@ -294,7 +294,7 @@ SamplerState s_LinearClamp : register(s1);
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_COLOR); UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_COLOR);
#endif #endif
#if defined FSR2_BIND_SRV_INPUT_OPAQUE_ONLY #if defined FSR2_BIND_SRV_INPUT_OPAQUE_ONLY
Texture2D<FfxFloat32x4> r_input_opaque_only : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_OPAQUE_ONLY);
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_opaque_only : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_OPAQUE_ONLY);
#endif #endif
#if defined FSR2_BIND_SRV_INPUT_MOTION_VECTORS #if defined FSR2_BIND_SRV_INPUT_MOTION_VECTORS
UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_MOTION_VECTORS); UNITY_FSR2_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_MOTION_VECTORS);
@ -770,7 +770,7 @@ void StoreDilatedReactiveMasks(FFX_PARAMETER_IN FfxUInt32x2 iPxPos, FFX_PARAMETE
#if defined(FSR2_BIND_SRV_INPUT_OPAQUE_ONLY) || defined(FFX_INTERNAL) #if defined(FSR2_BIND_SRV_INPUT_OPAQUE_ONLY) || defined(FFX_INTERNAL)
FfxFloat32x3 LoadOpaqueOnly(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos) FfxFloat32x3 LoadOpaqueOnly(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos)
{ {
return r_input_opaque_only[iPxPos].xyz;
return r_input_opaque_only[UNITY_FSR2_POS(iPxPos)].xyz;
} }
#endif #endif

Loading…
Cancel
Save