using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// Material就是附在相机的image effect。
/// </summary>
public class MaterialDraw : MonoBehaviour {
public Material material;
private void OnRenderImage(RenderTexture source, RenderTexture target) {
Graphics.Blit(source, target, material);
}
}
在主相机上添加一个脚本代码如上;
即可把 Material 图片显示到相机的渲染层