daily pastebin goal
75%
SHARE
TWEET

Demo 50 - Camera script

tonynogo Jul 6th, 2017 2,129 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using UnityEngine;
  2.  
  3. [ExecuteInEditMode]
  4. public class CameraScript : MonoBehaviour {
  5.  
  6.         public Material mat;
  7.  
  8.         void Start()
  9.         {
  10.             GetComponent<Camera>().depthTextureMode = DepthTextureMode.Depth;
  11.         }
  12.  
  13.         void OnRenderImage(RenderTexture source, RenderTexture destination)
  14.         {
  15.             Graphics.Blit(source, destination, mat);
  16.         }
  17. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top