-
-
Save isaveu/e7abf6e8fa10b36fec17f1f0ac22c58f to your computer and use it in GitHub Desktop.
ブラーシェーダ作ってみた ref: http://qiita.com/Es_Program/items/9b40785242b4a48486ce
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
Shader "Custom/BlurVF" { | |
Properties{ | |
_MainTex("Texture", 2D) = "white" {} | |
_Diff("Diff", Range(0, 1)) = 0.1 | |
} | |
SubShader{ | |
Pass{ | |
CGPROGRAM | |
#pragma fragment frag | |
#pragma vertex vert_img | |
#include "UnityCG.cginc" | |
sampler2D _MainTex; | |
float _Diff; | |
float4 frag(v2f_img i) :COLOR{ | |
float4 col = tex2D(_MainTex, i.uv - _Diff) + tex2D(_MainTex, i.uv + _Diff); | |
return col / 2; | |
} | |
ENDCG | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment