Skip to content

Instantly share code, notes, and snippets.

@EsProgram
Last active May 16, 2016 00:36
Show Gist options
  • Save EsProgram/58c2eeea7ae5646d8699 to your computer and use it in GitHub Desktop.
Save EsProgram/58c2eeea7ae5646d8699 to your computer and use it in GitHub Desktop.
ブラーシェーダ作ってみた 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