diff --git a/Assets/Scripts/Core/Fsr2Pipeline.cs b/Assets/Scripts/Core/Fsr2Pipeline.cs index 80d9f99..f6b9686 100644 --- a/Assets/Scripts/Core/Fsr2Pipeline.cs +++ b/Assets/Scripts/Core/Fsr2Pipeline.cs @@ -108,7 +108,11 @@ namespace FidelityFX private void LoadComputeShader(string name, Fsr2.InitializationFlags flags, ref ComputeShader shaderRef, out int kernelIndex) { if (shaderRef == null) + { shaderRef = ContextDescription.Callbacks.LoadComputeShader(name); + if (shaderRef == null) + throw new MissingReferenceException($"Shader '{name}' could not be loaded! Please ensure it is included in the project correctly."); + } kernelIndex = shaderRef.FindKernel("CS");