Skip to content

Instantly share code, notes, and snippets.

@chuckbergeron
Created September 18, 2016 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuckbergeron/50adf7f5099bc85a25c9606246aca963 to your computer and use it in GitHub Desktop.
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
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