diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/Asr.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/Asr.cs index 1074a9c..c9a5511 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/Asr.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/Asr.cs @@ -44,7 +44,7 @@ namespace ArmASR flags |= InitializationFlags.EnableDebugChecking; #endif - Debug.Log($"Setting up ASR with render size: {maxRenderSize.x}x{maxRenderSize.y}, display size: {displaySize.x}x{displaySize.y}, flags: {flags}"); + Debug.Log($"Setting up ASR {variant} with render size: {maxRenderSize.x}x{maxRenderSize.y}, display size: {displaySize.x}x{displaySize.y}, flags: {flags}"); var contextDescription = new ContextDescription { diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrContext.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrContext.cs index cdcca6b..0d50ed9 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrContext.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrContext.cs @@ -96,7 +96,7 @@ namespace ArmASR _lockPass = new AsrLockPass(_contextDescription, _resources, _upscalerConstantsBuffer); _accumulatePass = new AsrAccumulatePass(_contextDescription, _resources, _upscalerConstantsBuffer); _sharpenPass = new AsrSharpenPass(_contextDescription, _resources, _upscalerConstantsBuffer, _rcasConstantsBuffer); - _generateReactivePass = new AsrGenerateReactivePass(_contextDescription, _resources, _generateReactiveConstantsBuffer); + _generateReactivePass = new AsrGenerateReactivePass(_contextDescription, _resources, _upscalerConstantsBuffer, _generateReactiveConstantsBuffer); } public void Destroy() @@ -198,6 +198,9 @@ namespace ArmASR commandBuffer.SetRenderTarget(AsrShaderIDs.UavReconstructedPrevNearestDepth); commandBuffer.ClearRenderTarget(false, true, depthInverted ? Color.clear : Color.white); + commandBuffer.SetRenderTarget(AsrShaderIDs.UavNewLocks); + commandBuffer.ClearRenderTarget(false, true, Color.clear); + // Auto exposure SetupSpdConstants(dispatchParams, out var dispatchThreadGroupCount); diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrPass.cs b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrPass.cs index 4139b64..764e02b 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrPass.cs +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrPass.cs @@ -215,8 +215,8 @@ namespace ArmASR commandBuffer.SetGlobalTexture(AsrShaderIDs.SrvDilatedDepth, AsrShaderIDs.UavDilatedDepth); commandBuffer.SetGlobalTexture(AsrShaderIDs.SrvPrevDilatedMotionVectors, Resources.DilatedMotionVectors[frameIndex ^ 1]); - _mrt[0] = AsrShaderIDs.RtDilatedReactiveMasks; // fDilatedReactiveMasks - _mrt[1] = AsrShaderIDs.RtPreparedInputColor; // fTonemapped + _mrt[0] = AsrShaderIDs.RtPreparedInputColor; // fTonemapped + _mrt[1] = AsrShaderIDs.RtDilatedReactiveMasks; // fDilatedReactiveMasks FragmentProperties.SetConstantBuffer(AsrShaderIDs.CbFsr2, Constants, 0, Constants.stride); BlitFragment(commandBuffer, _mrt); @@ -277,9 +277,7 @@ namespace ArmASR commandBuffer.SetGlobalTexture(AsrShaderIDs.SrvAutoExposure, Resources.AutoExposure[frameIndex]); commandBuffer.SetGlobalTexture(AsrShaderIDs.SrvLumaHistory, Resources.LumaHistory[frameIndex ^ 1]); commandBuffer.SetGlobalTexture(AsrShaderIDs.SrvInternalTemporalReactive, Resources.InternalReactive[frameIndex ^ 1]); - - // UAV binding in fragment shader, index needs to match the register binding in HLSL - commandBuffer.SetRandomWriteTarget(4, AsrShaderIDs.UavNewLocks); + commandBuffer.SetGlobalTexture(AsrShaderIDs.SrvNewLocks, AsrShaderIDs.UavNewLocks); if (ContextDescription.Variant == Asr.Variant.Quality) { @@ -329,8 +327,8 @@ namespace ArmASR { private readonly ComputeBuffer _generateReactiveConstants; - public AsrGenerateReactivePass(Asr.ContextDescription contextDescription, AsrResources resources, ComputeBuffer generateReactiveConstants) - : base(contextDescription, resources, null) + public AsrGenerateReactivePass(Asr.ContextDescription contextDescription, AsrResources resources, ComputeBuffer constants, ComputeBuffer generateReactiveConstants) + : base(contextDescription, resources, constants) { _generateReactiveConstants = generateReactiveConstants; @@ -348,6 +346,7 @@ namespace ArmASR commandBuffer.SetGlobalResource(AsrShaderIDs.SrvOpaqueOnly, dispatchParams.ColorOpaqueOnly); commandBuffer.SetGlobalResource(AsrShaderIDs.SrvInputColor, dispatchParams.ColorPreUpscale); + FragmentProperties.SetConstantBuffer(AsrShaderIDs.CbFsr2, Constants, 0, Constants.stride); FragmentProperties.SetConstantBuffer(AsrShaderIDs.CbGenReactive, _generateReactiveConstants, 0, _generateReactiveConstants.stride); BlitFragment(commandBuffer, dispatchParams.OutReactive.RenderTarget); diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/ffxm_fsr2_common.cginc b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/ffxm_fsr2_common.cginc index 83c4ae2..5be235b 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/ffxm_fsr2_common.cginc +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/ffxm_fsr2_common.cginc @@ -1,4 +1,4 @@ -#pragma warning(disable: 3078) // Loop control variable conflicts +#pragma warning(disable: 3078) // Loop control variable conflicts #pragma warning(disable: 3203) // Signed/unsigned mismatch #pragma warning(disable: 3205) // Conversion from larger type to smaller, possible loss of data #pragma warning(disable: 3556) // Integer divides might be much slower, try using uints if possible @@ -6,7 +6,7 @@ // Doesn't work for: // - DX11: forces use of DXC which is not supported // - XB1: native FP16 seems to be unsupported -#if defined(SHADER_API_VULKAN) +#if defined(SHADER_API_VULKAN) || defined(SHADER_API_PSSL) //#pragma require Native16Bit // *sigh* Unity STILL ignores the #if guard when compiling for standalone #endif @@ -38,3 +38,15 @@ #define InterlockedMin(dest, val) { (dest) = min((dest), (val)); } #define InterlockedMax(dest, val) { (dest) = max((dest), (val)); } #endif + +// PSSL uses different semantics and doesn't support certain type qualifiers +#if defined(SHADER_API_PSSL) +#define SV_VERTEXID S_VERTEX_ID +#define SV_POSITION S_POSITION +#define SV_TARGET0 S_TARGET_OUTPUT0 +#define SV_TARGET1 S_TARGET_OUTPUT1 +#define SV_TARGET2 S_TARGET_OUTPUT2 +#define SV_TARGET3 S_TARGET_OUTPUT3 +#define unorm +#define globallycoherent +#endif diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_common_types.h b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_common_types.h index be29d6c..8628721 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_common_types.h +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_common_types.h @@ -472,10 +472,7 @@ typedef FfxUInt32x4 Prefix##_U4; #if defined(SHADER_API_PSSL) -#define unorm -#define globallycoherent - -#if FFX_HALF +#if FFXM_HALF #define FFXM_MIN16_F half #define FFXM_MIN16_F2 half2 @@ -507,7 +504,7 @@ typedef FfxUInt32x4 Prefix##_U4; #define FFXM_16BIT_U3 ushort3 #define FFXM_16BIT_U4 ushort4 -#else // FFX_HALF +#else // FFXM_HALF #define FFXM_MIN16_F float #define FFXM_MIN16_F2 float2 @@ -539,7 +536,7 @@ typedef FfxUInt32x4 Prefix##_U4; #define FFXM_16BIT_U3 uint3 #define FFXM_16BIT_U4 uint4 -#endif // FFX_HALF +#endif // FFXM_HALF #endif // #if defined(SHADER_API_PSSL) diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_accumulate_pass_fs.hlsl b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_accumulate_pass_fs.hlsl index 5e846c4..8c23aab 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_accumulate_pass_fs.hlsl +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_accumulate_pass_fs.hlsl @@ -35,8 +35,7 @@ #define FSR2_BIND_SRV_AUTO_EXPOSURE 9 #define FSR2_BIND_SRV_LUMA_HISTORY 10 #define FSR2_BIND_SRV_TEMPORAL_REACTIVE 11 - -#define FSR2_BIND_UAV_NEW_LOCKS 4 +#define FSR2_BIND_SRV_NEW_LOCKS 12 #define FSR2_BIND_CB_FSR2 0 @@ -56,6 +55,12 @@ #include "fsr2/ffxm_fsr2_reproject.h" #include "fsr2/ffxm_fsr2_accumulate.h" +#if defined(SHADER_API_PSSL) +#pragma PSSL_target_output_format(target 0 FMT_FP16_ABGR) +#pragma PSSL_target_output_format(target 1 FMT_FP16_ABGR) +#pragma PSSL_target_output_format(target 2 FMT_FP16_ABGR) +#endif + struct AccumulateOutputsFS { #if !FFXM_SHADER_QUALITY_BALANCED_OR_PERFORMANCE @@ -63,14 +68,14 @@ struct AccumulateOutputsFS FfxFloat32x2 fLockStatus : SV_TARGET1; FfxFloat32x4 fLumaHistory : SV_TARGET2; #if FFXM_FSR2_OPTION_APPLY_SHARPENING == 0 - FfxFloat32x3 fColor : SV_TARGET3; + FfxFloat32x4 fColor : SV_TARGET3; #endif #else // FFXM_SHADER_QUALITY_BALANCED_OR_PERFORMANCE - FfxFloat32x3 fUpscaledColor : SV_TARGET0; + FfxFloat32x4 fUpscaledColor : SV_TARGET0; FfxFloat32 fTemporalReactive : SV_TARGET1; FfxFloat32x2 fLockStatus : SV_TARGET2; #if FFXM_FSR2_OPTION_APPLY_SHARPENING == 0 - FfxFloat32x3 fColor : SV_TARGET3; + FfxFloat32x4 fColor : SV_TARGET3; #endif #endif }; @@ -84,12 +89,12 @@ AccumulateOutputsFS main(float4 SvPosition : SV_POSITION) output.fColorAndWeight = result.fColorAndWeight; output.fLumaHistory = result.fLumaHistory; #else - output.fUpscaledColor = result.fUpscaledColor; + output.fUpscaledColor = FfxFloat32x4(result.fUpscaledColor, 1.0f); output.fTemporalReactive = result.fTemporalReactive; #endif output.fLockStatus = result.fLockStatus; #if FFXM_FSR2_OPTION_APPLY_SHARPENING == 0 - output.fColor = result.fColor; + output.fColor = FfxFloat32x4(result.fColor, 1.0f); #endif return output; } \ No newline at end of file diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_autogen_reactive_pass_fs.hlsl b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_autogen_reactive_pass_fs.hlsl index 34fa02f..64b5b29 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_autogen_reactive_pass_fs.hlsl +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_autogen_reactive_pass_fs.hlsl @@ -36,6 +36,10 @@ #include "fsr2/ffxm_fsr2_callbacks_hlsl.h" #include "fsr2/ffxm_fsr2_common.h" +#if defined(SHADER_API_PSSL) +#pragma PSSL_target_output_format(default FMT_FP16_ABGR) +#endif + struct GenReactiveMaskOutputs { FfxFloat32 fReactiveMask : SV_TARGET0; diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_depth_clip_pass_fs.hlsl b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_depth_clip_pass_fs.hlsl index 60c4dfa..dd80fa0 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_depth_clip_pass_fs.hlsl +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_depth_clip_pass_fs.hlsl @@ -45,10 +45,15 @@ #include "fsr2/ffxm_fsr2_sample.h" #include "fsr2/ffxm_fsr2_depth_clip.h" +#if defined(SHADER_API_PSSL) +#pragma PSSL_target_output_format(target 0 FMT_FP16_ABGR) +#pragma PSSL_target_output_format(target 1 FMT_FP16_ABGR) +#endif + struct DepthClipOutputsFS { - FfxFloat32x2 fDilatedReactiveMasks : SV_TARGET0; - FfxFloat32x4 fTonemapped : SV_TARGET1; + FfxFloat32x4 fTonemapped : SV_TARGET0; + FfxFloat32x2 fDilatedReactiveMasks : SV_TARGET1; }; DepthClipOutputsFS main(float4 SvPosition : SV_POSITION) @@ -56,7 +61,7 @@ DepthClipOutputsFS main(float4 SvPosition : SV_POSITION) uint2 uPixelCoord = uint2(SvPosition.xy); DepthClipOutputs result = DepthClip(uPixelCoord); DepthClipOutputsFS output = (DepthClipOutputsFS)0; - output.fDilatedReactiveMasks = result.fDilatedReactiveMasks; output.fTonemapped = result.fTonemapped; + output.fDilatedReactiveMasks = result.fDilatedReactiveMasks; return output; } diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_rcas_pass_fs.hlsl b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_rcas_pass_fs.hlsl index 6031679..b5585ec 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_rcas_pass_fs.hlsl +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_rcas_pass_fs.hlsl @@ -39,7 +39,7 @@ struct RCASOutputsFS { - FfxFloat32x3 fUpscaledColor : SV_TARGET0; + FfxFloat32x4 fUpscaledColor : SV_TARGET0; }; RCASOutputsFS main(float4 SvPosition : SV_POSITION) @@ -47,6 +47,6 @@ RCASOutputsFS main(float4 SvPosition : SV_POSITION) uint2 uPixelCoord = uint2(SvPosition.xy); RCASOutputs result = RCAS(uPixelCoord); RCASOutputsFS output = (RCASOutputsFS)0; - output.fUpscaledColor = result.fUpscaledColor; + output.fUpscaledColor = FfxFloat32x4(result.fUpscaledColor, 1.0f); return output; } diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_reconstruct_previous_depth_pass_fs.hlsl b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_reconstruct_previous_depth_pass_fs.hlsl index 57e3e68..1c27721 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_reconstruct_previous_depth_pass_fs.hlsl +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_reconstruct_previous_depth_pass_fs.hlsl @@ -41,6 +41,13 @@ #include "fsr2/ffxm_fsr2_sample.h" #include "fsr2/ffxm_fsr2_reconstruct_dilated_velocity_and_previous_depth.h" +#if defined(SHADER_API_PSSL) +#pragma PSSL_target_output_format(target 0 FMT_32_R) +#pragma PSSL_target_output_format(target 1 FMT_FP16_ABGR) +#pragma PSSL_target_output_format(target 2 FMT_32_R) +#pragma PSSL_target_output_format(target 3 FMT_32_R) +#endif + struct ReconstructPrevDepthOutputsFS { FfxFloat32 fDepth : SV_TARGET0; diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h index 1120019..35769f0 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_accumulate.h @@ -372,7 +372,6 @@ AccumulateOutputs Accumulate(FfxInt32x2 iPxHrPos) #if FFXM_FSR2_OPTION_APPLY_SHARPENING == 0 results.fColor = fHistoryColor; #endif - StoreNewLocks(iPxHrPos, 0); return results; } 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..77b235d 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) && defined(SHADER_STAGE_FRAGMENT) + 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); @@ -397,7 +401,11 @@ SamplerState s_LinearClamp : register(s1); RWTexture2D rw_lock_input_luma : FFXM_FSR2_DECLARE_UAV(FSR2_BIND_UAV_LOCK_INPUT_LUMA); #endif #if defined FSR2_BIND_UAV_NEW_LOCKS + #if defined(SHADER_API_PSSL) && defined(SHADER_STAGE_FRAGMENT) + RWTexture2D rw_new_locks; // Need to use implicit register binding for random write targets on PS4/5 + #else RWTexture2D rw_new_locks : FFXM_FSR2_DECLARE_UAV(FSR2_BIND_UAV_NEW_LOCKS); + #endif #endif #if defined FSR2_BIND_UAV_PREPARED_INPUT_COLOR RWTexture2D rw_prepared_input_color : FFXM_FSR2_DECLARE_UAV(FSR2_BIND_UAV_PREPARED_INPUT_COLOR); diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_depth_clip.h b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_depth_clip.h index 2ef4152..0b4a00d 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_depth_clip.h +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_depth_clip.h @@ -27,8 +27,8 @@ struct DepthClipOutputs { - FfxFloat32x2 fDilatedReactiveMasks; FfxFloat32x4 fTonemapped; + FfxFloat32x2 fDilatedReactiveMasks; }; FFXM_STATIC const FfxFloat32 DepthClipBaseScale = 4.0f; diff --git a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_reproject.h b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_reproject.h index 752a39a..b6d20b6 100644 --- a/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_reproject.h +++ b/Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_reproject.h @@ -331,7 +331,7 @@ void ReprojectHistoryColor(const AccumulationPassCommonParams params, FFXM_PARAM LockState ReprojectHistoryLockStatus(const AccumulationPassCommonParams params, FFXM_PARAMETER_OUT FfxFloat32x2 fReprojectedLockStatus) { LockState state = { FFXM_FALSE, FFXM_FALSE }; - const FfxFloat32 fNewLockIntensity = LoadRwNewLocks(params.iPxHrPos); + const FfxFloat32 fNewLockIntensity = LoadNewLocks(params.iPxHrPos); state.NewLock = fNewLockIntensity > (127.0f / 255.0f); FfxFloat32 fInPlaceLockLifetime = state.NewLock ? fNewLockIntensity : 0; @@ -368,7 +368,7 @@ void ReprojectHistoryColor(const AccumulationPassCommonParams params, FFXM_PARAM LockState ReprojectHistoryLockStatus(const AccumulationPassCommonParams params, FFXM_PARAMETER_OUT FfxFloat16x2 fReprojectedLockStatus) { LockState state = { FFXM_FALSE, FFXM_FALSE }; - const FfxFloat16 fNewLockIntensity = FfxFloat16(LoadRwNewLocks(params.iPxHrPos)); + const FfxFloat16 fNewLockIntensity = FfxFloat16(LoadNewLocks(params.iPxHrPos)); state.NewLock = fNewLockIntensity > (127.0f / 255.0f); FfxFloat16 fInPlaceLockLifetime = state.NewLock ? fNewLockIntensity : FfxFloat16(0);