From 0469bb921fbd4cc34cd9c69fc5ec07642fd6ee67 Mon Sep 17 00:00:00 2001 From: Nico de Poel Date: Sat, 21 Dec 2024 16:37:09 +0100 Subject: [PATCH] Reverted use of CBUFFER_ macros, as it was breaking the shaders on Vulkan --- .../Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_convert.compute | 5 +++-- .../Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_upscale.compute | 5 +++-- .../Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_activate.compute | 5 +++-- .../Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_convert.compute | 5 +++-- .../Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_upscale.compute | 5 +++-- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_convert.compute b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_convert.compute index a41837d..582c930 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_convert.compute +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_convert.compute @@ -15,7 +15,8 @@ TYPED_TEXTURE2D_X(float2, InputVelocity) : register(t2); RW_TEXTURE2D_X(half4, MotionDepthClipAlphaBuffer) : register(u0); RW_TEXTURE2D_X(uint, YCoCgColor) : register(u1); -CBUFFER_START(Params) +cbuffer Params : register(b0) +{ uint2 renderSize; uint2 displaySize; float2 renderSizeRcp; @@ -29,7 +30,7 @@ CBUFFER_START(Params) float MinLerpContribution; uint bSameCamera; uint reset; -CBUFFER_END +}; [numthreads(8, 8, 1)] void CS(uint3 gl_GlobalInvocationID : SV_DispatchThreadID) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_upscale.compute b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_upscale.compute index 163af87..c3a675e 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_upscale.compute +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/2_pass_cs/sgsr2_upscale.compute @@ -36,7 +36,8 @@ TYPED_TEXTURE2D_X(uint, YCoCgColor) : register(t2); RW_TEXTURE2D_X(half4, SceneColorOutput) : register(u0); RW_TEXTURE2D_X(half4, HistoryOutput) : register(u1); -CBUFFER_START(Params) +cbuffer Params : register(b0) +{ uint2 renderSize; uint2 displaySize; float2 renderSizeRcp; @@ -50,7 +51,7 @@ CBUFFER_START(Params) float MinLerpContribution; uint bSameCamera; uint reset; -CBUFFER_END +}; [numthreads(8, 8, 1)] void CS(uint3 gl_GlobalInvocationID : SV_DispatchThreadID) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_activate.compute b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_activate.compute index 2304fbd..380f122 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_activate.compute +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_activate.compute @@ -34,7 +34,8 @@ TYPED_TEXTURE2D_X(uint, YCoCgColor) : register(t2); RW_TEXTURE2D_X(half4, MotionDepthClipAlphaBuffer) : register(u0); RW_TEXTURE2D_X(uint, LumaHistory) : register(u1); -CBUFFER_START(Params) +cbuffer Params : register(b0) +{ uint2 renderSize; uint2 displaySize; float2 ViewportSizeInverse; @@ -48,7 +49,7 @@ CBUFFER_START(Params) float MinLerpContribution; uint bSameCamera; uint reset; -CBUFFER_END +}; [numthreads(8, 8, 1)] void CS(uint3 gl_GlobalInvocationID : SV_DispatchThreadID) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_convert.compute b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_convert.compute index 2674a0c..3038414 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_convert.compute +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_convert.compute @@ -16,7 +16,8 @@ TYPED_TEXTURE2D_X(float2, InputVelocity) : register(t3); RW_TEXTURE2D_X(half4, MotionDepthAlphaBuffer) : register(u0); RW_TEXTURE2D_X(uint, YCoCgColor) : register(u1); -CBUFFER_START(Params) +cbuffer Params : register(b0) +{ uint2 renderSize; uint2 displaySize; float2 ViewportSizeInverse; @@ -30,7 +31,7 @@ CBUFFER_START(Params) float MinLerpContribution; uint bSameCamera; uint reset; -CBUFFER_END +}; [numthreads(8, 8, 1)] void CS(uint3 gl_GlobalInvocationID : SV_DispatchThreadID) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_upscale.compute b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_upscale.compute index 4bc64f4..fbc1fed 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_upscale.compute +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/SGSR2/Shaders/3_pass_cs/sgsr2_upscale.compute @@ -36,7 +36,8 @@ TYPED_TEXTURE2D_X(uint, YCoCgColor) : register(t2); RW_TEXTURE2D_X(half4, SceneColorOutput) : register(u0); RW_TEXTURE2D_X(half4, HistoryOutput) : register(u1); -CBUFFER_START(Params) +cbuffer Params : register(b0) +{ uint2 renderSize; uint2 displaySize; float2 renderSizeRcp; @@ -50,7 +51,7 @@ CBUFFER_START(Params) float MinLerpContribution; uint bSameCamera; uint reset; -CBUFFER_END +}; [numthreads(8, 8, 1)] void CS(uint3 gl_GlobalInvocationID : SV_DispatchThreadID)