Unity的特效后处理OnRenderImage

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq826364410/article/details/86521648
using UnityEngine;

public class RenderImage : MonoBehaviour
{
    public Material m_Material;
    /// <summary>
    /// 当完成所有的渲染后,调用
    /// </summary>
    private void OnRenderImage(RenderTexture source, RenderTexture destination)
    {
        //拷贝Source RenderTexture,经过材质的shader的后处理,发送到destination RenderTexture
        Graphics.Blit(source, destination, m_Material);
    }
}

猜你喜欢

转载自blog.csdn.net/qq826364410/article/details/86521648