Skip to content

Instantly share code, notes, and snippets.

@EsProgram
Last active September 11, 2015 15:31
Show Gist options
  • Save EsProgram/cc0d0db39128e62dbc98 to your computer and use it in GitHub Desktop.
Save EsProgram/cc0d0db39128e62dbc98 to your computer and use it in GitHub Desktop.
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