From cc74a9cd2fb7af3dd0a3335aee12f9c8f7a09315 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Tue, 25 Mar 2025 11:00:30 +0100 Subject: [PATCH] Use implicit register binding for fragment shader random write targets. Fixes UAVs not binding properly on PS5. --- .../ASR/Shaders/shaders/fsr2/ffxm_fsr2_callbacks_hlsl.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_callbacks_hlsl.h b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_callbacks_hlsl.h index 6159912..1963bd8 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_callbacks_hlsl.h +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_callbacks_hlsl.h @@ -379,7 +379,11 @@ SamplerState s_LinearClamp : register(s1); // UAV declarations #if defined FSR2_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH + #if defined(SHADER_API_PSSL) + RWTexture2D rw_reconstructed_previous_nearest_depth; // Need to use implicit register binding for random write targets on PS4/5 + #else RWTexture2D rw_reconstructed_previous_nearest_depth : FFXM_FSR2_DECLARE_UAV(FSR2_BIND_UAV_RECONSTRUCTED_PREV_NEAREST_DEPTH); + #endif #endif #if defined FSR2_BIND_UAV_DILATED_MOTION_VECTORS RWTexture2D rw_dilated_motion_vectors : FFXM_FSR2_DECLARE_UAV(FSR2_BIND_UAV_DILATED_MOTION_VECTORS);