using UnityEngine; [ExecuteInEditMode] public class CopyToScreenRT : MonoBehaviour { private RenderTexture activeRT; private void OnPostRender() { if (GetComponent().actualRenderingPath == RenderingPath.DeferredShading) { activeRT = RenderTexture.active; } else { activeRT = null; } } private void OnRenderImage(RenderTexture src, RenderTexture dest) { if (GetComponent().actualRenderingPath == RenderingPath.DeferredShading && (bool)activeRT) { if (src.format == activeRT.format) { Graphics.Blit(src, activeRT); } else { Debug.LogWarning("Cant resolve texture, because of different formats!"); } } Graphics.Blit(src, dest); } }