Advertisement
Guest User

ThermalBlit.cs

a guest
Dec 17th, 2019
540
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement