Browse Source

Ported back a few fixes from Isonzo:

- Detect if the native plugin is missing, in which case the upscaler won't be initialized.
- Use the transparency & composition mask as input for the reactive mask initially.
pssr
Nico de Poel 1 year ago
parent
commit
da270aef75
  1. 16
      Packages/com.unity.postprocessing@3.2.2/PostProcessing/Runtime/Effects/Upscaling/PSSRUpscaler.cs

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

@ -25,10 +25,20 @@ namespace UnityEngine.Rendering.PostProcessing
static PSSRUpscaler()
{
if (PSSRPlugin.InitPssr() < 0)
try
{
Debug.LogError("Failed to initialize PSSR plugin!");
if (PSSRPlugin.InitPssr() < 0)
{
Debug.LogError("Failed to initialize PSSR plugin!");
PluginInitialized = false;
return;
}
}
catch (DllNotFoundException)
{
Debug.LogError("PSSR plugin not found!");
PluginInitialized = false;
return;
}
PluginInitialized = true;
@ -125,7 +135,7 @@ namespace UnityEngine.Rendering.PostProcessing
// We need to provide copies of the previous depth and motion vector buffers anyway, so we can turn this otherwise wasteful copying into a benefit
PrepareInputs(cmd, context, config, _inputColor, _inputDepth[frameIndex], _inputMotionVectors[frameIndex]);
Texture reactiveMask = config.reactiveMask;
Texture reactiveMask = config.transparencyAndCompositionMask;
if (config.autoGenerateReactiveMask || config.autoGenerateTransparencyAndComposition)
{
reactiveMask = GenerateReactiveMask(cmd, context, config);

Loading…
Cancel
Save