SHARE
TWEET

ThermalBlit.cs

a guest Dec 17th, 2019 108 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System.Collections;
  2. using UnityEngine;
  3.  
  4. [ExecuteInEditMode]
  5. public class ThermalBlit : MonoBehaviour
  6. {
  7.     [SerializeField]
  8.     private Material material;
  9.    
  10.     public void Start()
  11.     {
  12.         Camera.main.depthTextureMode = DepthTextureMode.DepthNormals;// depthnormals are needed for outline effect
  13.     }
  14.  
  15.     // Postprocess the image
  16.     void OnRenderImage(RenderTexture source, RenderTexture destination)
  17.     {      
  18.         Graphics.Blit(source, destination, material);
  19.     }
  20. }
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