Browse Source

Swapped the order of the render targets around for the depth clip pass. Fixes prepared input color being black in NGGC because... I don't know, probably an alignment issue of some sort? PS5 is being really stupid here.

asr-console
Nico de Poel 10 months ago
parent
commit
16cf41493a
  1. 4
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Runtime/AsrPass.cs
  2. 6
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_depth_clip_pass_fs.hlsl
  3. 2
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/fsr2/ffxm_fsr2_depth_clip.h

4
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.SrvDilatedDepth, AsrShaderIDs.UavDilatedDepth);
commandBuffer.SetGlobalTexture(AsrShaderIDs.SrvPrevDilatedMotionVectors, Resources.DilatedMotionVectors[frameIndex ^ 1]); 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); FragmentProperties.SetConstantBuffer(AsrShaderIDs.CbFsr2, Constants, 0, Constants.stride);
BlitFragment(commandBuffer, _mrt); BlitFragment(commandBuffer, _mrt);

6
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/ASR/Shaders/shaders/ffxm_fsr2_depth_clip_pass_fs.hlsl

@ -52,8 +52,8 @@
struct DepthClipOutputsFS struct DepthClipOutputsFS
{ {
FfxFloat32x2 fDilatedReactiveMasks : SV_TARGET0;
FfxFloat32x4 fTonemapped : SV_TARGET1;
FfxFloat32x4 fTonemapped : SV_TARGET0;
FfxFloat32x2 fDilatedReactiveMasks : SV_TARGET1;
}; };
DepthClipOutputsFS main(float4 SvPosition : SV_POSITION) DepthClipOutputsFS main(float4 SvPosition : SV_POSITION)
@ -61,7 +61,7 @@ DepthClipOutputsFS main(float4 SvPosition : SV_POSITION)
uint2 uPixelCoord = uint2(SvPosition.xy); uint2 uPixelCoord = uint2(SvPosition.xy);
DepthClipOutputs result = DepthClip(uPixelCoord); DepthClipOutputs result = DepthClip(uPixelCoord);
DepthClipOutputsFS output = (DepthClipOutputsFS)0; DepthClipOutputsFS output = (DepthClipOutputsFS)0;
output.fDilatedReactiveMasks = result.fDilatedReactiveMasks;
output.fTonemapped = result.fTonemapped; output.fTonemapped = result.fTonemapped;
output.fDilatedReactiveMasks = result.fDilatedReactiveMasks;
return output; return output;
} }

2
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 struct DepthClipOutputs
{ {
FfxFloat32x2 fDilatedReactiveMasks;
FfxFloat32x4 fTonemapped; FfxFloat32x4 fTonemapped;
FfxFloat32x2 fDilatedReactiveMasks;
}; };
FFXM_STATIC const FfxFloat32 DepthClipBaseScale = 4.0f; FFXM_STATIC const FfxFloat32 DepthClipBaseScale = 4.0f;

Loading…
Cancel
Save