// Made with Amplify Shader Editor // Available at the Unity Asset Store - http://u3d.as/y3X Shader "DawnShader/EyesGradianShader" { Properties { _ShadowColor("Shadow Color", Color) = (0,0,0,0) _AlphaMap("Alpha Map", 2D) = "white" {} _OpacityBoots("Opacity Boots", Range( 0 , 4)) = 0.5 _DitherBoosts("Dither Boosts", Range( 0 , 20)) = 9.5 [HideInInspector] _texcoord( "", 2D ) = "white" {} [HideInInspector] __dirty( "", Int ) = 1 } SubShader { Tags{ "RenderType" = "Transparent" "Queue" = "AlphaTest+0" "IgnoreProjector" = "True" } Cull Off Blend SrcAlpha OneMinusSrcAlpha CGPROGRAM #include "UnityShaderVariables.cginc" #pragma target 3.0 #pragma surface surf Standard keepalpha noshadow exclude_path:deferred vertex:vertexDataFunc struct Input { float2 uv_texcoord; float4 screenPosition; }; uniform float4 _ShadowColor; uniform sampler2D _AlphaMap; SamplerState sampler_AlphaMap; uniform float4 _AlphaMap_ST; uniform float _DitherBoosts; uniform float _OpacityBoots; inline float Dither8x8Bayer( int x, int y ) { const float dither[ 64 ] = { 1, 49, 13, 61, 4, 52, 16, 64, 33, 17, 45, 29, 36, 20, 48, 32, 9, 57, 5, 53, 12, 60, 8, 56, 41, 25, 37, 21, 44, 28, 40, 24, 3, 51, 15, 63, 2, 50, 14, 62, 35, 19, 47, 31, 34, 18, 46, 30, 11, 59, 7, 55, 10, 58, 6, 54, 43, 27, 39, 23, 42, 26, 38, 22}; int r = y * 8 + x; return dither[r] / 64; // same # of instructions as pre-dividing due to compiler magic } void vertexDataFunc( inout appdata_full v, out Input o ) { UNITY_INITIALIZE_OUTPUT( Input, o ); float4 ase_screenPos = ComputeScreenPos( UnityObjectToClipPos( v.vertex ) ); o.screenPosition = ase_screenPos; } void surf( Input i , inout SurfaceOutputStandard o ) { float2 uv_AlphaMap = i.uv_texcoord * _AlphaMap_ST.xy + _AlphaMap_ST.zw; float4 tex2DNode1 = tex2D( _AlphaMap, uv_AlphaMap ); o.Albedo = ( _ShadowColor * tex2DNode1.a ).rgb; float4 ase_screenPos = i.screenPosition; float4 ase_screenPosNorm = ase_screenPos / ase_screenPos.w; ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5; float2 clipScreen6 = ase_screenPosNorm.xy * _ScreenParams.xy; float dither6 = Dither8x8Bayer( fmod(clipScreen6.x, 8), fmod(clipScreen6.y, 8) ); dither6 = step( dither6, ( tex2DNode1.a * _DitherBoosts ) ); o.Alpha = ( dither6 + ( _OpacityBoots * tex2DNode1.a ) ); } ENDCG } CustomEditor "ASEMaterialInspector" } /*ASEBEGIN Version=18500 2560;0;2560;1059;1744.183;-389.8394;1;True;False Node;AmplifyShaderEditor.SamplerNode;1;-1020.375,852.8875;Inherit;True;Property;_AlphaMap;Alpha Map;2;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;5;-997.5505,1202.999;Float;False;Property;_DitherBoosts;Dither Boosts;4;0;Create;True;0;0;False;0;False;9.5;0;0;20;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;3;-975.1755,704.032;Float;False;Property;_OpacityBoots;Opacity Boots;3;0;Create;True;0;0;False;0;False;0.5;0;0;4;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;4;-664.1737,1058.062;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.ColorNode;10;-1032.96,362.918;Float;False;Property;_ShadowColor;Shadow Color;1;0;Create;True;0;0;False;0;False;0,0,0,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;7;-683.2873,778.4368;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.DitheringNode;6;-487.0787,989.6296;Inherit;False;1;False;3;0;FLOAT;0;False;1;SAMPLER2D;;False;2;FLOAT4;0,0,0,0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;11;-782.9644,437.788;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleAddOpNode;8;-266.649,816.4826;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;-14,189;Float;False;True;-1;2;ASEMaterialInspector;0;0;Standard;DawnShader/EyesGradianShader;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;False;False;False;False;False;False;Off;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.5;True;False;0;False;Transparent;;AlphaTest;ForwardOnly;14;all;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;False;2;5;False;-1;10;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;0;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;False;16;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0 WireConnection;4;0;1;4 WireConnection;4;1;5;0 WireConnection;7;0;3;0 WireConnection;7;1;1;4 WireConnection;6;0;4;0 WireConnection;11;0;10;0 WireConnection;11;1;1;4 WireConnection;8;0;6;0 WireConnection;8;1;7;0 WireConnection;0;0;11;0 WireConnection;0;9;8;0 ASEEND*/ //CHKSM=D741F1C4FDF558AF35A2289B6FF909FE2B0FE6E9