// Made with Amplify Shader Editor v1.9.3.2 // Available at the Unity Asset Store - http://u3d.as/y3X Shader "Circle" { Properties { _TextureSample0("Texture Sample 0", 2D) = "white" {} _ScaleUV("ScaleUV", Range( -1 , 1)) = 0 _TextureSample1("Texture Sample 1", 2D) = "white" {} [HideInInspector] _texcoord( "", 2D ) = "white" {} [HideInInspector] __dirty( "", Int ) = 1 } SubShader { Tags{ "RenderType" = "Transparent" "Queue" = "Transparent+0" "IgnoreProjector" = "True" "IsEmissive" = "true" } Cull Back CGINCLUDE #include "UnityPBSLighting.cginc" #include "Lighting.cginc" #pragma target 3.0 struct Input { float2 uv_texcoord; }; uniform sampler2D _TextureSample0; uniform float _ScaleUV; uniform sampler2D _TextureSample1; uniform float4 _TextureSample1_ST; float2 ASESafeNormalize(float2 inVec) { float dp3 = max(1.175494351e-38, dot(inVec, inVec)); return inVec* rsqrt(dp3); } void surf( Input i , inout SurfaceOutputStandard o ) { float2 temp_cast_0 = (0.5).xx; float2 normalizeResult12 = ASESafeNormalize( ( i.uv_texcoord - temp_cast_0 ) ); float2 clampResult16 = clamp( ( ( _ScaleUV * normalizeResult12 ) + i.uv_texcoord ) , float2( 0,0 ) , float2( 1,1 ) ); float4 tex2DNode2 = tex2D( _TextureSample0, clampResult16 ); o.Emission = tex2DNode2.rgb; float2 uv_TextureSample1 = i.uv_texcoord * _TextureSample1_ST.xy + _TextureSample1_ST.zw; o.Alpha = ( tex2DNode2.a * tex2D( _TextureSample1, uv_TextureSample1 ).a ); } ENDCG CGPROGRAM #pragma surface surf Standard alpha:fade keepalpha fullforwardshadows ENDCG Pass { Name "ShadowCaster" Tags{ "LightMode" = "ShadowCaster" } ZWrite On CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma target 3.0 #pragma multi_compile_shadowcaster #pragma multi_compile UNITY_PASS_SHADOWCASTER #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #include "HLSLSupport.cginc" #if ( SHADER_API_D3D11 || SHADER_API_GLCORE || SHADER_API_GLES || SHADER_API_GLES3 || SHADER_API_METAL || SHADER_API_VULKAN ) #define CAN_SKIP_VPOS #endif #include "UnityCG.cginc" #include "Lighting.cginc" #include "UnityPBSLighting.cginc" sampler3D _DitherMaskLOD; struct v2f { V2F_SHADOW_CASTER; float2 customPack1 : TEXCOORD1; float3 worldPos : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; v2f vert( appdata_full v ) { v2f o; UNITY_SETUP_INSTANCE_ID( v ); UNITY_INITIALIZE_OUTPUT( v2f, o ); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); UNITY_TRANSFER_INSTANCE_ID( v, o ); Input customInputData; float3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz; half3 worldNormal = UnityObjectToWorldNormal( v.normal ); o.customPack1.xy = customInputData.uv_texcoord; o.customPack1.xy = v.texcoord; o.worldPos = worldPos; TRANSFER_SHADOW_CASTER_NORMALOFFSET( o ) return o; } half4 frag( v2f IN #if !defined( CAN_SKIP_VPOS ) , UNITY_VPOS_TYPE vpos : VPOS #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID( IN ); Input surfIN; UNITY_INITIALIZE_OUTPUT( Input, surfIN ); surfIN.uv_texcoord = IN.customPack1.xy; float3 worldPos = IN.worldPos; half3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) ); SurfaceOutputStandard o; UNITY_INITIALIZE_OUTPUT( SurfaceOutputStandard, o ) surf( surfIN, o ); #if defined( CAN_SKIP_VPOS ) float2 vpos = IN.pos; #endif half alphaRef = tex3D( _DitherMaskLOD, float3( vpos.xy * 0.25, o.Alpha * 0.9375 ) ).a; clip( alphaRef - 0.01 ); SHADOW_CASTER_FRAGMENT( IN ) } ENDCG } } Fallback "Diffuse" // CustomEditor "ASEMaterialInspector" } /*ASEBEGIN Version=19302 Node;AmplifyShaderEditor.TextureCoordinatesNode;3;-1151.554,60.11714;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;5;-1159.385,209.2955;Inherit;False;Constant;_Float0;Float 0;1;0;Create;True;0;0;0;False;0;False;0.5;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleSubtractOpNode;4;-887.8567,123.6783;Inherit;True;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.NormalizeNode;12;-667.2484,103.6899;Inherit;False;True;1;0;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.RangedFloatNode;9;-949.4094,-92.58674;Inherit;False;Property;_ScaleUV;ScaleUV;1;0;Create;True;0;0;0;False;0;False;0;0;-1;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;13;-577.8527,-82.41675;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;10;-569.5618,-330.7091;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleAddOpNode;11;-152.4689,-234.5762;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 Node;AmplifyShaderEditor.ClampOpNode;16;46.67834,-203.0212;Inherit;False;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT2;1,1;False;1;FLOAT2;0 Node;AmplifyShaderEditor.SamplerNode;2;53.74615,-45.42908;Inherit;True;Property;_TextureSample0;Texture Sample 0;0;0;Create;True;0;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.SamplerNode;14;14.59283,223.8083;Inherit;True;Property;_TextureSample1;Texture Sample 1;2;0;Create;True;0;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.SimpleMultiplyOpNode;15;382.4243,152.9958;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;690.9335,-110.7786;Float;False;True;-1;2;ASEMaterialInspector;0;0;Standard;Circle;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;False;False;False;False;False;False;Back;0;False;;0;False;;False;0;False;;0;False;;False;0;Transparent;0.5;True;True;0;False;Transparent;;Transparent;All;12;all;True;True;True;True;0;False;;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;2;15;10;25;False;0.5;True;2;5;False;;10;False;;0;0;False;;0;False;;0;False;;0;False;;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;True;Relative;0;;-1;-1;-1;-1;0;False;0;0;False;;-1;0;False;;0;0;0;False;0.1;False;;0;False;;False;17;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;16;FLOAT4;0,0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0 WireConnection;4;0;3;0 WireConnection;4;1;5;0 WireConnection;12;0;4;0 WireConnection;13;0;9;0 WireConnection;13;1;12;0 WireConnection;11;0;13;0 WireConnection;11;1;10;0 WireConnection;16;0;11;0 WireConnection;2;1;16;0 WireConnection;15;0;2;4 WireConnection;15;1;14;4 WireConnection;0;2;2;0 WireConnection;0;9;15;0 ASEEND*/ //CHKSM=E0141B8838A07E33E54C07A7967F6D2810EE15BC