Skip to content

Instantly share code, notes, and snippets.

@JLChnToZ
Last active June 27, 2017 14:07
Show Gist options
  • Select an option

  • Save JLChnToZ/667effd8d976a0fdc2f8da9265684689 to your computer and use it in GitHub Desktop.

Select an option

Save JLChnToZ/667effd8d976a0fdc2f8da9265684689 to your computer and use it in GitHub Desktop.
Camera Fork
using UnityEngine;
[ExecuteInEditMode, RequireComponent(typeof(Camera))]
public class ScreenFork: MonoBehaviour {
public RenderTexture copyTo;
private void OnRenderImage(RenderTexture src, RenderTexture dest) {
Graphics.Blit(src, dest);
if(copyTo != null)
Graphics.Blit(src, copyTo);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment