Browse Source

Added optional CAS sharpening step with halved sharpness range. Fixed the CAS shader to keep the output in HDR.

pssr
Nico de Poel 1 year ago
parent
commit
b3da3e5cee
  1. 12
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/PSSRUpscaler.cs
  2. 2
      Packages/fidelityfx.fsr

12
Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/PSSRUpscaler.cs

@ -165,8 +165,16 @@ namespace UnityEngine.Rendering.PostProcessing
// Convert the native texture into Unity-land using a blind texture data copy // Convert the native texture into Unity-land using a blind texture data copy
cmd.CopyTexture(_outputIntermediate, _outputColor); cmd.CopyTexture(_outputIntermediate, _outputColor);
// TODO: optional sharpening
cmd.BlitFullscreenTriangle(_outputColor, context.destination);
if (config.performSharpenPass)
{
// PSSR output is already pretty sharp and we don't want to over-sharpen the image, so cut the sharpness range by half
ApplySharpening(cmd, context, config.UpscaleSize, config.sharpness * 0.5f, _outputColor, context.destination);
}
else
{
// Convert the PSSR output from R11G11B10 to the expected destination format
cmd.BlitFullscreenTriangle(_outputColor, context.destination);
}
cmd.EndSample("PSSR"); cmd.EndSample("PSSR");
} }

2
Packages/fidelityfx.fsr

@ -1 +1 @@
Subproject commit d65cc3a35de270a1011c8158810e3d56c579953f
Subproject commit 30235b37a5a4a437e0f5e64ee4a0024cf03814b9
Loading…
Cancel
Save