// Called by camera to apply image effect void OnRenderImage(RenderTexture source, RenderTexture destination) { NVIDIA.VRWorks.Feature feature = m_VRWorks.GetActiveFeature(); if (feature == NVIDIA.VRWorks.Feature.LensMatchedShading || feature == NVIDIA.VRWorks.Feature.MultiResolution) { UnityEngine.Rendering.CommandBuffer buf = new UnityEngine.Rendering.CommandBuffer(); buf.SetRenderTarget(destination); buf.IssuePluginCustomBlit(PluginExtGetIssueEventCallback(), kPluginExtCommandUpscale, source, destination, 0, VerticalFlip ? 1U : 0U); Graphics.ExecuteCommandBuffer(buf); } else { Graphics.Blit(source, destination); } }