Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (13 sloc) 380 Bytes
using UnityEngine;
[ExecuteInEditMode]
public class PostProcess : MonoBehaviour {
public Material material;
private Camera cam;
void Start () {
cam = GetComponent<Camera>();
cam.depthTextureMode = DepthTextureMode.Depth;
}
void OnRenderImage (RenderTexture source, RenderTexture destination) {
Graphics.Blit(source, destination, material);
}
}
You can’t perform that action at this time.