1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- Shader "UI/Sprite Blur" {
- Properties {
- _MainTex ("Main Texture", 2D) = "white" {}
- _Size ("Size", Range(0, 10)) = 5.0
- [HideInInspector]
- _StencilComp ("Stencil Comparison", Float) = 8
- [HideInInspector]
- _Stencil ("Stencil ID", Float) = 0
- [HideInInspector]
- _StencilOp ("Stencil Operation", Float) = 0
- [HideInInspector]
- _StencilWriteMask ("Stencil Write Mask", Float) = 255
- [HideInInspector]
- _StencilReadMask ("Stencil Read Mask", Float) = 255
- }
-
- Category {
-
- Tags {
- "Queue"="Transparent"
- "IgnoreProjector"="True"
- "RenderType"="Opaque"
- }
- Cull Off
-
- Stencil {
- Ref [_Stencil]
- Comp [_StencilComp]
- Pass [_StencilOp]
- ReadMask [_StencilReadMask]
- WriteMask [_StencilWriteMask]
- }
- SubShader {
- GrabPass {
- "_SpriteBlurTextureV"
- }
-
- // Vertical
- Pass {
- Name "VERTICAL"
- Tags { "LightMode" = "Always" }
-
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment fragY
- #pragma fragmentoption ARB_precision_hint_fastest
- #include "UnityCG.cginc"
- #include "BlurCG.cginc"
- ENDCG
- }
- GrabPass {
- "_SpriteBlurTextureH"
- }
- // Horizontal
- Pass {
- Name "HORIZONTAL"
-
- Tags { "LightMode" = "Always" }
-
- CGPROGRAM
- #pragma vertex vert
- #pragma fragment fragX
- #pragma fragmentoption ARB_precision_hint_fastest
- #include "UnityCG.cginc"
- #include "BlurCG.cginc"
- ENDCG
- }
- }
- }
- }
|