I am trying to implement a simple Graphics.Blit setup to show an effect shader. Unfortunately, MonoBehaviour.OnRenderImage is not being called for some reason. The script is attached to the main camera.
I’ve been over the docs for these methods and searched on ‘the google’ and as far as I can tell I’m doing it correctly. Did something change in 2019.3 that isn’t reflected in the docs?
You are probably using URP or HDRP as your renderpipeline.
in SRP (Scriptable render pipeline) OnRenderImage is no longer called.
In the URP there is a feature called “Render Features” witch allow you to do rendering calls inside different points in the renderpipeline.
In the hdrp there is something similar called Custom-Pass:
https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@9.0/manual/Custom-Pass.html
The following tutorial covers the new method of applying effects of this sort when using the Universal Render Pipeline: Custom Render Passes with URP - Unity Learn
Note that there is a missing instruction in that tutorial (unless they have fixed it). Right at the end, go to Edit → Project Settings → Quality and make sure that the render pipeline asset that you create in the tutorial is selected.