Guest User

Untitled

a guest
May 27th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.40 KB | None | 0 0
  1. Shader "Sprites/Blended Unlit"
  2. {
  3. Properties
  4. {
  5. _MainTex ("Main Texture", 2D) = "white" {}
  6. _Color ("Color", Color) = (1,1,1,1)
  7.  
  8. [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
  9. [PerRendererData] _AlphaTex ("External Alpha", 2D) = "white" {}
  10. [PerRendererData] _EnableExternalAlpha ("Enable External Alpha", Float) = 0
  11.  
  12. _ZWrite ("Depth Write", Float) = 0.0
  13. _Cutoff ("Depth alpha cutoff", Range(0,1)) = 0.0
  14. _ShadowAlphaCutoff ("Shadow alpha cutoff", Range(0,1)) = 0.1
  15. _CustomRenderQueue ("Custom Render Queue", Float) = 0.0
  16.  
  17. _OverlayColor ("Overlay Color", Color) = (0,0,0,0)
  18. _Hue("Hue", Range(-0.5,0.5)) = 0.0
  19. _Saturation("Saturation", Range(0,2)) = 1.0
  20. _Brightness("Brightness", Range(0,2)) = 1.0
  21.  
  22. _BlendTex ("Blend Texture", 2D) = "white" {}
  23. _BlendAmount ("Blend", Range(0,1)) = 0.0
  24.  
  25. [HideInInspector] _SrcBlend ("__src", Float) = 1.0
  26. [HideInInspector] _DstBlend ("__dst", Float) = 0.0
  27. [HideInInspector] _RenderQueue ("__queue", Float) = 0.0
  28. [HideInInspector] _Cull ("__cull", Float) = 0.0
  29. }
  30.  
  31. SubShader
  32. {
  33. Tags { "Queue"="Transparent" "RenderType"="Sprite" "AlphaDepth"="False" "CanUseSpriteAtlas"="True" "IgnoreProjector"="True" }
  34. LOD 100
  35.  
  36. Pass
  37. {
  38. Blend [_SrcBlend] [_DstBlend]
  39. Lighting Off
  40. ZWrite [_ZWrite]
  41. ZTest LEqual
  42. Cull [_Cull]
  43. Lighting Off
  44.  
  45. CGPROGRAM
  46. #pragma shader_feature _ _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ADDITIVEBLEND _ADDITIVEBLEND_SOFT _MULTIPLYBLEND _MULTIPLYBLEND_X2
  47. #pragma shader_feature _ALPHA_CLIP
  48. #pragma shader_feature _TEXTURE_BLEND
  49. #pragma shader_feature _COLOR_ADJUST
  50. #pragma shader_feature _FOG
  51.  
  52. #pragma fragmentoption ARB_precision_hint_fastest
  53. #pragma multi_compile_fog
  54. #pragma multi_compile _ PIXELSNAP_ON
  55. #pragma multi_compile _ ETC1_EXTERNAL_ALPHA
  56.  
  57. #pragma vertex vert
  58. #pragma fragment frag
  59.  
  60. #include "CGIncludes/SpriteUnlit.cginc"
  61. ENDCG
  62. }
  63. Pass
  64. {
  65. Name "ShadowCaster"
  66. Tags { "LightMode"="ShadowCaster" }
  67. Offset 1, 1
  68.  
  69. Fog { Mode Off }
  70. ZWrite On
  71. ZTest LEqual
  72. Cull Off
  73. Lighting Off
  74.  
  75. CGPROGRAM
  76. #pragma fragmentoption ARB_precision_hint_fastest
  77. #pragma multi_compile_shadowcaster
  78. #pragma multi_compile _ PIXELSNAP_ON
  79. #pragma multi_compile _ ETC1_EXTERNAL_ALPHA
  80.  
  81. #pragma vertex vert
  82. #pragma fragment frag
  83.  
  84. #include "CGIncludes/SpriteShadows.cginc"
  85. ENDCG
  86. }
  87. }
  88.  
  89. CustomEditor "SpriteShaderGUI"
  90. }
Add Comment
Please, Sign In to add comment