I added the [Deferred Night Vision Effect](https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/deferred-night-vision-43423) script to my main camera and it works in the Unity GUI as you can see here:
![alt text][1]
But when I build the project and run the executable, I get the following:
![alt text][2] [1]: /storage/temp/150278-ingui.png [2]: /storage/temp/150279-inexecutable.png
I looked at the DeferredNightVisionEffect.cs (free Unity asset) and I cannot figure out why it's working in the GUI but not in the executable. The error in output_log.txt is:
ArgumentNullException: Argument cannot be null. Parameter name: mat at (wrapper managed-to-native) UnityEngine.Graphics:Internal_BlitMaterial (UnityEngine.Texture,UnityEngine.RenderTexture,UnityEngine.Material,int,bool) at UnityEngine.Graphics.Blit (UnityEngine.Texture source, UnityEngine.RenderTexture dest, UnityEngine.Material mat, Int32 pass) [0x00000] in:0
at UnityEngine.Graphics.Blit (UnityEngine.Texture source, UnityEngine.RenderTexture dest, UnityEngine.Material mat) [0x00000] in :0
at DeferredNightVisionEffect.OnRenderImage (UnityEngine.RenderTexture source, UnityEngine.RenderTexture destination) [0x00015] in [*project_root*]\Assets\Shaders\DeferredNV\DeferredNightVisionEffect.cs:117
(Filename: [*project_root*]/Assets/Shaders/DeferredNV/DeferredNightVisionEffect.cs Line: 117)
Any guidance appreciated, thanks in advance!
![alt text][1]
But when I build the project and run the executable, I get the following:
![alt text][2] [1]: /storage/temp/150278-ingui.png [2]: /storage/temp/150279-inexecutable.png
I looked at the DeferredNightVisionEffect.cs (free Unity asset) and I cannot figure out why it's working in the GUI but not in the executable. The error in output_log.txt is:
ArgumentNullException: Argument cannot be null. Parameter name: mat at (wrapper managed-to-native) UnityEngine.Graphics:Internal_BlitMaterial (UnityEngine.Texture,UnityEngine.RenderTexture,UnityEngine.Material,int,bool) at UnityEngine.Graphics.Blit (UnityEngine.Texture source, UnityEngine.RenderTexture dest, UnityEngine.Material mat, Int32 pass) [0x00000] in
Any guidance appreciated, thanks in advance!