Skip to content

Instantly share code, notes, and snippets.

@ikoan310
Created September 20, 2018 11:33
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 ikoan310/708fd08a49ecee51a3909e22b7907569 to your computer and use it in GitHub Desktop.
Save ikoan310/708fd08a49ecee51a3909e22b7907569 to your computer and use it in GitHub Desktop.
shaderの効果を画面全体にかけるために、MonoBehaviourのOnRenderImageを使います。今回はブラーの効果を全体にかけるために、いくつかの命名にblurを使用しています。
public class BlurCamera : MonoBehaviour {
[SerializeField] Material blurMaterial;
private void OnRenderImage(RenderTexture source, RenderTexture destination)
{
Graphics.Blit(source, destination, blurMaterial, 0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment