diff --git a/Runtime/FSR2/Fsr2Context.cs b/Runtime/FSR2/Fsr2Context.cs index babd4d3..71bdedb 100644 --- a/Runtime/FSR2/Fsr2Context.cs +++ b/Runtime/FSR2/Fsr2Context.cs @@ -137,7 +137,7 @@ namespace FidelityFX.FSR2 } if (dispatchParams.UseTextureArrays) - commandBuffer.EnableShaderKeyword("UNITY_FSR_TEXTURE2D_X_ARRAY"); + commandBuffer.EnableShaderKeyword("UNITY_FFX_TEXTURE2D_X_ARRAY"); if (_firstExecution) { @@ -261,7 +261,7 @@ namespace FidelityFX.FSR2 Fsr2Resources.DestroyAliasableResources(commandBuffer); - commandBuffer.DisableShaderKeyword("UNITY_FSR_TEXTURE2D_X_ARRAY"); + commandBuffer.DisableShaderKeyword("UNITY_FFX_TEXTURE2D_X_ARRAY"); commandBuffer.EndSample(_sampler); } diff --git a/Runtime/FSR3/Fsr3UpscalerContext.cs b/Runtime/FSR3/Fsr3UpscalerContext.cs index c21a80a..b677f81 100644 --- a/Runtime/FSR3/Fsr3UpscalerContext.cs +++ b/Runtime/FSR3/Fsr3UpscalerContext.cs @@ -154,7 +154,7 @@ namespace FidelityFX.FSR3 } if (dispatchParams.UseTextureArrays) - commandBuffer.EnableShaderKeyword("UNITY_FSR_TEXTURE2D_X_ARRAY"); + commandBuffer.EnableShaderKeyword("UNITY_FFX_TEXTURE2D_X_ARRAY"); if (_firstExecution) { @@ -284,7 +284,7 @@ namespace FidelityFX.FSR3 Fsr3UpscalerResources.DestroyAliasableResources(commandBuffer); - commandBuffer.DisableShaderKeyword("UNITY_FSR_TEXTURE2D_X_ARRAY"); + commandBuffer.DisableShaderKeyword("UNITY_FFX_TEXTURE2D_X_ARRAY"); commandBuffer.EndSample(_sampler); } diff --git a/Shaders/ffx_fsr2_accumulate_pass.compute b/Shaders/ffx_fsr2_accumulate_pass.compute index 34a29c4..116006a 100644 --- a/Shaders/ffx_fsr2_accumulate_pass.compute +++ b/Shaders/ffx_fsr2_accumulate_pass.compute @@ -28,7 +28,7 @@ #pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH #pragma multi_compile_local __ FFX_FSR2_OPTION_APPLY_SHARPENING -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr2_autogen_reactive_pass.compute b/Shaders/ffx_fsr2_autogen_reactive_pass.compute index 9ec77c5..91f19d2 100644 --- a/Shaders/ffx_fsr2_autogen_reactive_pass.compute +++ b/Shaders/ffx_fsr2_autogen_reactive_pass.compute @@ -25,7 +25,7 @@ #pragma multi_compile_local __ FFX_FSR2_OPTION_JITTERED_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr2_compute_luminance_pyramid_pass.compute b/Shaders/ffx_fsr2_compute_luminance_pyramid_pass.compute index b3559e1..2c47f2a 100644 --- a/Shaders/ffx_fsr2_compute_luminance_pyramid_pass.compute +++ b/Shaders/ffx_fsr2_compute_luminance_pyramid_pass.compute @@ -25,7 +25,7 @@ #pragma multi_compile_local __ FFX_FSR2_OPTION_JITTERED_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr2_depth_clip_pass.compute b/Shaders/ffx_fsr2_depth_clip_pass.compute index d5ce2bf..970defd 100644 --- a/Shaders/ffx_fsr2_depth_clip_pass.compute +++ b/Shaders/ffx_fsr2_depth_clip_pass.compute @@ -25,7 +25,7 @@ #pragma multi_compile_local __ FFX_FSR2_OPTION_JITTERED_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr2_lock_pass.compute b/Shaders/ffx_fsr2_lock_pass.compute index eb584fb..7fa4ee5 100644 --- a/Shaders/ffx_fsr2_lock_pass.compute +++ b/Shaders/ffx_fsr2_lock_pass.compute @@ -25,7 +25,7 @@ #pragma multi_compile_local __ FFX_FSR2_OPTION_JITTERED_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr2_rcas_pass.compute b/Shaders/ffx_fsr2_rcas_pass.compute index 36f827d..8445044 100644 --- a/Shaders/ffx_fsr2_rcas_pass.compute +++ b/Shaders/ffx_fsr2_rcas_pass.compute @@ -24,7 +24,7 @@ #pragma multi_compile_local __ FFX_FSR2_OPTION_JITTERED_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr2_reconstruct_previous_depth_pass.compute b/Shaders/ffx_fsr2_reconstruct_previous_depth_pass.compute index 644adc8..ba7f307 100644 --- a/Shaders/ffx_fsr2_reconstruct_previous_depth_pass.compute +++ b/Shaders/ffx_fsr2_reconstruct_previous_depth_pass.compute @@ -26,7 +26,7 @@ #pragma multi_compile_local __ FFX_FSR2_OPTION_JITTERED_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr2_tcr_autogen_pass.compute b/Shaders/ffx_fsr2_tcr_autogen_pass.compute index 53a0833..72e1011 100644 --- a/Shaders/ffx_fsr2_tcr_autogen_pass.compute +++ b/Shaders/ffx_fsr2_tcr_autogen_pass.compute @@ -25,7 +25,7 @@ #pragma multi_compile_local __ FFX_FSR2_OPTION_JITTERED_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR2_OPTION_INVERTED_DEPTH -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_accumulate_pass.compute b/Shaders/ffx_fsr3upscaler_accumulate_pass.compute index c599a5b..8c2e1ed 100644 --- a/Shaders/ffx_fsr3upscaler_accumulate_pass.compute +++ b/Shaders/ffx_fsr3upscaler_accumulate_pass.compute @@ -26,7 +26,7 @@ #pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_LOW_RESOLUTION_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_APPLY_SHARPENING -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_autogen_reactive_pass.compute b/Shaders/ffx_fsr3upscaler_autogen_reactive_pass.compute index 79c5604..03e937f 100644 --- a/Shaders/ffx_fsr3upscaler_autogen_reactive_pass.compute +++ b/Shaders/ffx_fsr3upscaler_autogen_reactive_pass.compute @@ -22,7 +22,7 @@ #pragma multi_compile_local __ FFX_HALF -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_debug_view_pass.compute b/Shaders/ffx_fsr3upscaler_debug_view_pass.compute index 2eecb3b..d4aaf19 100644 --- a/Shaders/ffx_fsr3upscaler_debug_view_pass.compute +++ b/Shaders/ffx_fsr3upscaler_debug_view_pass.compute @@ -22,7 +22,7 @@ #pragma multi_compile_local __ FFX_HALF -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_luma_instability_pass.compute b/Shaders/ffx_fsr3upscaler_luma_instability_pass.compute index 450f8ba..b77652e 100644 --- a/Shaders/ffx_fsr3upscaler_luma_instability_pass.compute +++ b/Shaders/ffx_fsr3upscaler_luma_instability_pass.compute @@ -22,7 +22,7 @@ #pragma multi_compile_local __ FFX_HALF -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_luma_pyramid_pass.compute b/Shaders/ffx_fsr3upscaler_luma_pyramid_pass.compute index 7f3249c..b94f382 100644 --- a/Shaders/ffx_fsr3upscaler_luma_pyramid_pass.compute +++ b/Shaders/ffx_fsr3upscaler_luma_pyramid_pass.compute @@ -22,7 +22,7 @@ #pragma multi_compile_local __ FFX_HALF -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_prepare_inputs_pass.compute b/Shaders/ffx_fsr3upscaler_prepare_inputs_pass.compute index 60db3d2..5f33ec8 100644 --- a/Shaders/ffx_fsr3upscaler_prepare_inputs_pass.compute +++ b/Shaders/ffx_fsr3upscaler_prepare_inputs_pass.compute @@ -24,7 +24,7 @@ #pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_LOW_RESOLUTION_MOTION_VECTORS #pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_INVERTED_DEPTH -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_prepare_reactivity_pass.compute b/Shaders/ffx_fsr3upscaler_prepare_reactivity_pass.compute index 9388c8d..ed7d2aa 100644 --- a/Shaders/ffx_fsr3upscaler_prepare_reactivity_pass.compute +++ b/Shaders/ffx_fsr3upscaler_prepare_reactivity_pass.compute @@ -22,7 +22,7 @@ #pragma multi_compile_local __ FFX_HALF -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_rcas_pass.compute b/Shaders/ffx_fsr3upscaler_rcas_pass.compute index a34842c..ea83679 100644 --- a/Shaders/ffx_fsr3upscaler_rcas_pass.compute +++ b/Shaders/ffx_fsr3upscaler_rcas_pass.compute @@ -20,7 +20,7 @@ #pragma kernel CS -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_shading_change_pass.compute b/Shaders/ffx_fsr3upscaler_shading_change_pass.compute index bd54e34..8add698 100644 --- a/Shaders/ffx_fsr3upscaler_shading_change_pass.compute +++ b/Shaders/ffx_fsr3upscaler_shading_change_pass.compute @@ -22,7 +22,7 @@ #pragma multi_compile_local __ FFX_HALF -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_shading_change_pyramid_pass.compute b/Shaders/ffx_fsr3upscaler_shading_change_pyramid_pass.compute index 3a8c865..4816cf2 100644 --- a/Shaders/ffx_fsr3upscaler_shading_change_pyramid_pass.compute +++ b/Shaders/ffx_fsr3upscaler_shading_change_pyramid_pass.compute @@ -22,7 +22,7 @@ #pragma multi_compile_local __ FFX_HALF -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_fsr3upscaler_tcr_autogen_pass.compute b/Shaders/ffx_fsr3upscaler_tcr_autogen_pass.compute index e18265e..6161e39 100644 --- a/Shaders/ffx_fsr3upscaler_tcr_autogen_pass.compute +++ b/Shaders/ffx_fsr3upscaler_tcr_autogen_pass.compute @@ -23,7 +23,7 @@ #pragma multi_compile_local __ FFX_HALF #pragma multi_compile_local __ FFX_FSR3UPSCALER_OPTION_JITTERED_MOTION_VECTORS -#pragma multi_compile __ UNITY_FSR_TEXTURE2D_X_ARRAY +#pragma multi_compile __ UNITY_FFX_TEXTURE2D_X_ARRAY #include "ffx_unity_common.cginc" diff --git a/Shaders/ffx_unity_common.cginc b/Shaders/ffx_unity_common.cginc index b1bcb5c..ea14122 100644 --- a/Shaders/ffx_unity_common.cginc +++ b/Shaders/ffx_unity_common.cginc @@ -52,7 +52,7 @@ #endif // Control if TEXTURE2D_X macros will expand to texture arrays -#if defined(UNITY_TEXTURE2D_X_ARRAY_SUPPORTED) && defined(UNITY_FSR_TEXTURE2D_X_ARRAY) +#if defined(UNITY_TEXTURE2D_X_ARRAY_SUPPORTED) && defined(UNITY_FFX_TEXTURE2D_X_ARRAY) #define USE_TEXTURE2D_X_AS_ARRAY #endif @@ -73,10 +73,10 @@ #endif // Declare and sample camera buffers as texture arrays - #define UNITY_FSR_TEX2D(type) Texture2DArray - #define UNITY_FSR_RWTEX2D(type) RWTexture2DArray - #define UNITY_FSR_POS(pxPos) FfxUInt32x3(pxPos, SLICE_ARRAY_INDEX) - #define UNITY_FSR_UV(uv) FfxFloat32x3(uv, SLICE_ARRAY_INDEX) - #define UNITY_FSR_GETDIMS(tex, w, h) { FfxUInt32 uElements; (tex).GetDimensions((w), (h), uElements); } + #define UNITY_FFX_TEX2D(type) Texture2DArray + #define UNITY_FFX_RWTEX2D(type) RWTexture2DArray + #define UNITY_FFX_POS(pxPos) FfxUInt32x3(pxPos, SLICE_ARRAY_INDEX) + #define UNITY_FFX_UV(uv) FfxFloat32x3(uv, SLICE_ARRAY_INDEX) + #define UNITY_FFX_GETDIMS(tex, w, h) { FfxUInt32 uElements; (tex).GetDimensions((w), (h), uElements); } #endif diff --git a/Shaders/shaders/fsr2/ffx_fsr2_callbacks_hlsl.h b/Shaders/shaders/fsr2/ffx_fsr2_callbacks_hlsl.h index c52cc1a..2029ee5 100644 --- a/Shaders/shaders/fsr2/ffx_fsr2_callbacks_hlsl.h +++ b/Shaders/shaders/fsr2/ffx_fsr2_callbacks_hlsl.h @@ -340,17 +340,17 @@ FfxUInt32x2 SPD_RenderSize() #endif // #if defined(FSR2_BIND_CB_SPD) // Declare and sample camera buffers as regular textures, unless overridden -#if !defined(UNITY_FSR_TEX2D) -#define UNITY_FSR_TEX2D(type) Texture2D +#if !defined(UNITY_FFX_TEX2D) +#define UNITY_FFX_TEX2D(type) Texture2D #endif -#if !defined(UNITY_FSR_RWTEX2D) -#define UNITY_FSR_RWTEX2D(type) RWTexture2D +#if !defined(UNITY_FFX_RWTEX2D) +#define UNITY_FFX_RWTEX2D(type) RWTexture2D #endif -#if !defined(UNITY_FSR_POS) -#define UNITY_FSR_POS(pxPos) (pxPos) +#if !defined(UNITY_FFX_POS) +#define UNITY_FFX_POS(pxPos) (pxPos) #endif -#if !defined(UNITY_FSR_UV) -#define UNITY_FSR_UV(uv) (uv) +#if !defined(UNITY_FFX_UV) +#define UNITY_FFX_UV(uv) (uv) #endif SamplerState s_PointClamp : register(s0); @@ -358,16 +358,16 @@ SamplerState s_LinearClamp : register(s1); // SRVs #if defined FSR2_BIND_SRV_INPUT_COLOR - UNITY_FSR_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_COLOR); + UNITY_FFX_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_COLOR); #endif #if defined FSR2_BIND_SRV_INPUT_OPAQUE_ONLY - UNITY_FSR_TEX2D(FfxFloat32x4) r_input_opaque_only : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_OPAQUE_ONLY); + UNITY_FFX_TEX2D(FfxFloat32x4) r_input_opaque_only : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_OPAQUE_ONLY); #endif #if defined FSR2_BIND_SRV_INPUT_MOTION_VECTORS - UNITY_FSR_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_MOTION_VECTORS); + UNITY_FFX_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_MOTION_VECTORS); #endif #if defined FSR2_BIND_SRV_INPUT_DEPTH - UNITY_FSR_TEX2D(FfxFloat32) r_input_depth : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_DEPTH); + UNITY_FFX_TEX2D(FfxFloat32) r_input_depth : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_DEPTH); #endif #if defined FSR2_BIND_SRV_INPUT_EXPOSURE Texture2D r_input_exposure : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_INPUT_EXPOSURE); @@ -376,10 +376,10 @@ SamplerState s_LinearClamp : register(s1); Texture2D r_auto_exposure : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_AUTO_EXPOSURE); #endif #if defined FSR2_BIND_SRV_REACTIVE_MASK - UNITY_FSR_TEX2D(FfxFloat32) r_reactive_mask : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_REACTIVE_MASK); + UNITY_FFX_TEX2D(FfxFloat32) r_reactive_mask : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_REACTIVE_MASK); #endif #if defined FSR2_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK - UNITY_FSR_TEX2D(FfxFloat32) r_transparency_and_composition_mask : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK); + UNITY_FFX_TEX2D(FfxFloat32) r_transparency_and_composition_mask : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK); #endif #if defined FSR2_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH Texture2D r_reconstructed_previous_nearest_depth : FFX_FSR2_DECLARE_SRV(FSR2_BIND_SRV_RECONSTRUCTED_PREV_NEAREST_DEPTH); @@ -463,7 +463,7 @@ SamplerState s_LinearClamp : register(s1); RWTexture2D rw_luma_history : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_LUMA_HISTORY); #endif #if defined FSR2_BIND_UAV_UPSCALED_OUTPUT - UNITY_FSR_RWTEX2D(FfxFloat32x4) rw_upscaled_output : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_UPSCALED_OUTPUT); + UNITY_FFX_RWTEX2D(FfxFloat32x4) rw_upscaled_output : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_UPSCALED_OUTPUT); #endif #if defined FSR2_BIND_UAV_EXPOSURE_MIP_LUMA_CHANGE globallycoherent RWTexture2D rw_img_mip_shading_change : FFX_FSR2_DECLARE_UAV(FSR2_BIND_UAV_EXPOSURE_MIP_LUMA_CHANGE); @@ -514,42 +514,42 @@ FfxFloat32 SampleMipLuma(FfxFloat32x2 fUV, FfxUInt32 mipLevel) #if defined(FSR2_BIND_SRV_INPUT_DEPTH) FfxFloat32 LoadInputDepth(FfxUInt32x2 iPxPos) { - return r_input_depth[UNITY_FSR_POS(iPxPos)]; + return r_input_depth[UNITY_FFX_POS(iPxPos)]; } #endif #if defined(FSR2_BIND_SRV_INPUT_DEPTH) FfxFloat32 SampleInputDepth(FfxFloat32x2 fUV) { - return r_input_depth.SampleLevel(s_LinearClamp, UNITY_FSR_UV(fUV), 0).x; + return r_input_depth.SampleLevel(s_LinearClamp, UNITY_FFX_UV(fUV), 0).x; } #endif #if defined(FSR2_BIND_SRV_REACTIVE_MASK) FfxFloat32 LoadReactiveMask(FfxUInt32x2 iPxPos) { - return r_reactive_mask[UNITY_FSR_POS(iPxPos)]; + return r_reactive_mask[UNITY_FFX_POS(iPxPos)]; } #endif #if defined(FSR2_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK) FfxFloat32 LoadTransparencyAndCompositionMask(FfxUInt32x2 iPxPos) { - return r_transparency_and_composition_mask[UNITY_FSR_POS(iPxPos)]; + return r_transparency_and_composition_mask[UNITY_FFX_POS(iPxPos)]; } #endif #if defined(FSR2_BIND_SRV_INPUT_COLOR) FfxFloat32x3 LoadInputColor(FfxUInt32x2 iPxPos) { - return r_input_color_jittered[UNITY_FSR_POS(iPxPos)].rgb; + return r_input_color_jittered[UNITY_FFX_POS(iPxPos)].rgb; } #endif #if defined(FSR2_BIND_SRV_INPUT_COLOR) FfxFloat32x3 SampleInputColor(FfxFloat32x2 fUV) { - return r_input_color_jittered.SampleLevel(s_LinearClamp, UNITY_FSR_UV(fUV), 0).rgb; + return r_input_color_jittered.SampleLevel(s_LinearClamp, UNITY_FFX_UV(fUV), 0).rgb; } #endif @@ -563,7 +563,7 @@ FfxFloat32x3 LoadPreparedInputColor(FfxUInt32x2 iPxPos) #if defined(FSR2_BIND_SRV_INPUT_MOTION_VECTORS) FfxFloat32x2 LoadInputMotionVector(FfxUInt32x2 iPxDilatedMotionVectorPos) { - FfxFloat32x2 fSrcMotionVector = r_input_motion_vectors[UNITY_FSR_POS(iPxDilatedMotionVectorPos)].xy; + FfxFloat32x2 fSrcMotionVector = r_input_motion_vectors[UNITY_FFX_POS(iPxDilatedMotionVectorPos)].xy; FfxFloat32x2 fUvMotionVector = fSrcMotionVector * MotionVectorScale(); @@ -622,7 +622,7 @@ void StoreInternalColorAndWeight(FfxUInt32x2 iPxPos, FfxFloat32x4 fColorAndWeigh #if defined(FSR2_BIND_UAV_UPSCALED_OUTPUT) void StoreUpscaledOutput(FfxUInt32x2 iPxPos, FfxFloat32x3 fColor) { - rw_upscaled_output[UNITY_FSR_POS(iPxPos)] = FfxFloat32x4(fColor, 1.f); + rw_upscaled_output[UNITY_FFX_POS(iPxPos)] = FfxFloat32x4(fColor, 1.f); } #endif @@ -833,7 +833,7 @@ void StoreDilatedReactiveMasks(FFX_PARAMETER_IN FfxUInt32x2 iPxPos, FFX_PARAMETE #if defined(FSR2_BIND_SRV_INPUT_OPAQUE_ONLY) FfxFloat32x3 LoadOpaqueOnly(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos) { - return r_input_opaque_only[UNITY_FSR_POS(iPxPos)].xyz; + return r_input_opaque_only[UNITY_FFX_POS(iPxPos)].xyz; } #endif diff --git a/Shaders/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h b/Shaders/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h index 1c3fc99..45bfd43 100644 --- a/Shaders/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h +++ b/Shaders/shaders/fsr3upscaler/ffx_fsr3upscaler_callbacks_hlsl.h @@ -320,20 +320,20 @@ FfxUInt32x2 SPD_RenderSize() #endif // #if defined(FSR3UPSCALER_BIND_CB_SPD) // Declare and sample camera buffers as regular textures, unless overridden -#if !defined(UNITY_FSR_TEX2D) -#define UNITY_FSR_TEX2D(type) Texture2D +#if !defined(UNITY_FFX_TEX2D) +#define UNITY_FFX_TEX2D(type) Texture2D #endif -#if !defined(UNITY_FSR_RWTEX2D) -#define UNITY_FSR_RWTEX2D(type) RWTexture2D +#if !defined(UNITY_FFX_RWTEX2D) +#define UNITY_FFX_RWTEX2D(type) RWTexture2D #endif -#if !defined(UNITY_FSR_POS) -#define UNITY_FSR_POS(pxPos) (pxPos) +#if !defined(UNITY_FFX_POS) +#define UNITY_FFX_POS(pxPos) (pxPos) #endif -#if !defined(UNITY_FSR_UV) -#define UNITY_FSR_UV(uv) (uv) +#if !defined(UNITY_FFX_UV) +#define UNITY_FFX_UV(uv) (uv) #endif -#if !defined(UNITY_FSR_GETDIMS) -#define UNITY_FSR_GETDIMS(tex, w, h) (tex).GetDimensions((w), (h)) +#if !defined(UNITY_FFX_GETDIMS) +#define UNITY_FFX_GETDIMS(tex, w, h) (tex).GetDimensions((w), (h)) #endif SamplerState s_PointClamp : register(s0); @@ -359,85 +359,85 @@ FfxFloat32x2 SampleSPDMipLevel(FfxFloat32x2 fUV, FfxUInt32 mipLevel) #endif #if defined(FSR3UPSCALER_BIND_SRV_INPUT_DEPTH) -UNITY_FSR_TEX2D(FfxFloat32) r_input_depth : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_INPUT_DEPTH); +UNITY_FFX_TEX2D(FfxFloat32) r_input_depth : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_INPUT_DEPTH); FfxFloat32 LoadInputDepth(FfxUInt32x2 iPxPos) { - return r_input_depth[UNITY_FSR_POS(iPxPos)]; + return r_input_depth[UNITY_FFX_POS(iPxPos)]; } FfxFloat32 SampleInputDepth(FfxFloat32x2 fUV) { - return r_input_depth.SampleLevel(s_LinearClamp, UNITY_FSR_UV(fUV), 0).x; + return r_input_depth.SampleLevel(s_LinearClamp, UNITY_FFX_UV(fUV), 0).x; } #endif #if defined(FSR3UPSCALER_BIND_SRV_REACTIVE_MASK) -UNITY_FSR_TEX2D(FfxFloat32) r_reactive_mask : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_REACTIVE_MASK); +UNITY_FFX_TEX2D(FfxFloat32) r_reactive_mask : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_REACTIVE_MASK); FfxFloat32 LoadReactiveMask(FfxUInt32x2 iPxPos) { - return r_reactive_mask[UNITY_FSR_POS(iPxPos)]; + return r_reactive_mask[UNITY_FFX_POS(iPxPos)]; } FfxInt32x2 GetReactiveMaskResourceDimensions() { FfxUInt32 uWidth; FfxUInt32 uHeight; - UNITY_FSR_GETDIMS(r_reactive_mask, uWidth, uHeight); + UNITY_FFX_GETDIMS(r_reactive_mask, uWidth, uHeight); return FfxInt32x2(uWidth, uHeight); } FfxFloat32 SampleReactiveMask(FfxFloat32x2 fUV) { - return r_reactive_mask.SampleLevel(s_LinearClamp, UNITY_FSR_UV(fUV), 0).x; + return r_reactive_mask.SampleLevel(s_LinearClamp, UNITY_FFX_UV(fUV), 0).x; } #endif #if defined(FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK) -UNITY_FSR_TEX2D(FfxFloat32) r_transparency_and_composition_mask : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK); +UNITY_FFX_TEX2D(FfxFloat32) r_transparency_and_composition_mask : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_TRANSPARENCY_AND_COMPOSITION_MASK); FfxFloat32 LoadTransparencyAndCompositionMask(FfxUInt32x2 iPxPos) { - return r_transparency_and_composition_mask[UNITY_FSR_POS(iPxPos)]; + return r_transparency_and_composition_mask[UNITY_FFX_POS(iPxPos)]; } FfxInt32x2 GetTransparencyAndCompositionMaskResourceDimensions() { FfxUInt32 uWidth; FfxUInt32 uHeight; - UNITY_FSR_GETDIMS(r_transparency_and_composition_mask, uWidth, uHeight); + UNITY_FFX_GETDIMS(r_transparency_and_composition_mask, uWidth, uHeight); return FfxInt32x2(uWidth, uHeight); } FfxFloat32 SampleTransparencyAndCompositionMask(FfxFloat32x2 fUV) { - return r_transparency_and_composition_mask.SampleLevel(s_LinearClamp, UNITY_FSR_UV(fUV), 0).x; + return r_transparency_and_composition_mask.SampleLevel(s_LinearClamp, UNITY_FFX_UV(fUV), 0).x; } #endif #if defined(FSR3UPSCALER_BIND_SRV_INPUT_COLOR) -UNITY_FSR_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_INPUT_COLOR); +UNITY_FFX_TEX2D(FfxFloat32x4) r_input_color_jittered : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_INPUT_COLOR); FfxFloat32x3 LoadInputColor(FfxUInt32x2 iPxPos) { - return r_input_color_jittered[UNITY_FSR_POS(iPxPos)].rgb; + return r_input_color_jittered[UNITY_FFX_POS(iPxPos)].rgb; } FfxFloat32x3 SampleInputColor(FfxFloat32x2 fUV) { - return r_input_color_jittered.SampleLevel(s_LinearClamp, UNITY_FSR_UV(fUV), 0).rgb; + return r_input_color_jittered.SampleLevel(s_LinearClamp, UNITY_FFX_UV(fUV), 0).rgb; } #endif #if defined(FSR3UPSCALER_BIND_SRV_INPUT_MOTION_VECTORS) -UNITY_FSR_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_INPUT_MOTION_VECTORS); +UNITY_FFX_TEX2D(FfxFloat32x4) r_input_motion_vectors : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_INPUT_MOTION_VECTORS); FfxFloat32x2 LoadInputMotionVector(FfxUInt32x2 iPxDilatedMotionVectorPos) { - FfxFloat32x2 fSrcMotionVector = r_input_motion_vectors[UNITY_FSR_POS(iPxDilatedMotionVectorPos)].xy; + FfxFloat32x2 fSrcMotionVector = r_input_motion_vectors[UNITY_FFX_POS(iPxDilatedMotionVectorPos)].xy; FfxFloat32x2 fUvMotionVector = fSrcMotionVector * MotionVectorScale(); @@ -515,11 +515,11 @@ void StoreInternalColorAndWeight(FfxUInt32x2 iPxPos, FfxFloat32x4 fColorAndWeigh #endif #if defined(FSR3UPSCALER_BIND_UAV_UPSCALED_OUTPUT) -UNITY_FSR_RWTEX2D(FfxFloat32x4) rw_upscaled_output : FFX_FSR3UPSCALER_DECLARE_UAV(FSR3UPSCALER_BIND_UAV_UPSCALED_OUTPUT); +UNITY_FFX_RWTEX2D(FfxFloat32x4) rw_upscaled_output : FFX_FSR3UPSCALER_DECLARE_UAV(FSR3UPSCALER_BIND_UAV_UPSCALED_OUTPUT); void StoreUpscaledOutput(FfxUInt32x2 iPxPos, FfxFloat32x3 fColor) { - rw_upscaled_output[UNITY_FSR_POS(iPxPos)] = FfxFloat32x4(fColor, 1.f); + rw_upscaled_output[UNITY_FFX_POS(iPxPos)] = FfxFloat32x4(fColor, 1.f); } #endif @@ -830,11 +830,11 @@ void StoreDilatedReactiveMasks(FFX_PARAMETER_IN FfxUInt32x2 iPxPos, FFX_PARAMETE #endif #if defined(FSR3UPSCALER_BIND_SRV_INPUT_OPAQUE_ONLY) -UNITY_FSR_TEX2D(FfxFloat32x4) r_input_opaque_only : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_INPUT_OPAQUE_ONLY); +UNITY_FFX_TEX2D(FfxFloat32x4) r_input_opaque_only : FFX_FSR3UPSCALER_DECLARE_SRV(FSR3UPSCALER_BIND_SRV_INPUT_OPAQUE_ONLY); FfxFloat32x3 LoadOpaqueOnly(FFX_PARAMETER_IN FFX_MIN16_I2 iPxPos) { - return r_input_opaque_only[UNITY_FSR_POS(iPxPos)].xyz; + return r_input_opaque_only[UNITY_FFX_POS(iPxPos)].xyz; } #endif