Created
September 20, 2018 11:33
-
-
Save ikoan310/708fd08a49ecee51a3909e22b7907569 to your computer and use it in GitHub Desktop.
shaderの効果を画面全体にかけるために、MonoBehaviourのOnRenderImageを使います。今回はブラーの効果を全体にかけるために、いくつかの命名にblurを使用しています。
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
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