Last active
May 16, 2016 00:36
-
-
Save EsProgram/58c2eeea7ae5646d8699 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