Created
September 18, 2016 23:07
-
-
Save chuckbergeron/50adf7f5099bc85a25c9606246aca963 to your computer and use it in GitHub Desktop.
Put this Monobehaviour on your Camera, it will take the `Custom/Plot.shader` file and render it over the screen -- https://gist.github.com/chuckbergeron/a9518c103a93318ffb092c2f4aa87133
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
public class BookOfShadersBlit : MonoBehaviour { | |
private Material _material; | |
private void Awake() | |
{ | |
_material = new Material(Shader.Find("Custom/PlotShader")); | |
} | |
private void OnRenderImage(RenderTexture source, RenderTexture destination) | |
{ | |
Graphics.Blit(source, destination, _material); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment