Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ブラーシェーダ作ってみた ref: http://qiita.com/Es_Program/items/9b40785242b4a48486ce
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