Created
September 20, 2018 09:48
-
-
Save ikoan310/16c6b9f03c6969e4a432dcc473edb58b to your computer and use it in GitHub Desktop.
単純なブラー処理を行うピクセルシェーダー
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
fixed4 frag (v2f i) : SV_Target | |
{ | |
fixed4 col = tex2D(_MainTex, i.uv); | |
col += tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * fixed2( _Param, 0 )); | |
col += tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * fixed2( -_Param, 0 )); | |
col += tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * fixed2( 0, _Param )); | |
col += tex2D(_MainTex, i.uv + _MainTex_TexelSize.xy * fixed2( 0, -_Param )); | |
return col / 26; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment