123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- // Made with Amplify Shader Editor
- // Available at the Unity Asset Store - http://u3d.as/y3X
- Shader "UV"
- {
- Properties
- {
- _TMD("TMD", Float) = 0
- _AO("AO", 2D) = "white" {}
- _Int("Int", Float) = 0
- _MASK("MASK", 2D) = "white" {}
- _Float0("Float 0", Float) = 0
- [HideInInspector] _texcoord2( "", 2D ) = "white" {}
- [HideInInspector] _texcoord( "", 2D ) = "white" {}
- [HideInInspector] __dirty( "", Int ) = 1
- }
- SubShader
- {
- Pass
- {
- ColorMask 0
- ZTest LEqual
- ZWrite On
- }
- Tags{ "RenderType" = "Transparent" "Queue" = "Geometry+0" "IsEmissive" = "true" }
- Cull Back
- ZWrite Off
- Blend SrcAlpha OneMinusSrcAlpha , SrcAlpha OneMinusSrcAlpha
-
- CGINCLUDE
- #include "UnityPBSLighting.cginc"
- #include "Lighting.cginc"
- #pragma target 3.0
- struct Input
- {
- float2 uv_texcoord;
- float2 uv2_texcoord2;
- };
- uniform sampler2D _AO;
- uniform float4 _AO_ST;
- uniform float _Int;
- uniform float _TMD;
- uniform sampler2D _MASK;
- uniform float _Float0;
- inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
- {
- return half4 ( 0, 0, 0, s.Alpha );
- }
- void surf( Input i , inout SurfaceOutput o )
- {
- float2 uv_AO = i.uv_texcoord * _AO_ST.xy + _AO_ST.zw;
- o.Emission = ( tex2D( _AO, uv_AO ) * _Int ).rgb;
- float4 temp_cast_1 = (_TMD).xxxx;
- o.Alpha = max( temp_cast_1 , ( tex2D( _MASK, i.uv2_texcoord2 ) * _Float0 ) ).r;
- }
- ENDCG
- CGPROGRAM
- #pragma surface surf Unlit 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;
- float4 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.customPack1.zw = customInputData.uv2_texcoord2;
- o.customPack1.zw = v.texcoord1;
- 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;
- surfIN.uv2_texcoord2 = IN.customPack1.zw;
- float3 worldPos = IN.worldPos;
- half3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) );
- SurfaceOutput o;
- UNITY_INITIALIZE_OUTPUT( SurfaceOutput, 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=18703
- 1934;128;1906;967;1214.932;398.2451;1.460677;True;True
- Node;AmplifyShaderEditor.TextureCoordinatesNode;93;-342.9869,132.2362;Inherit;False;1;-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.SamplerNode;92;-23.80075,129.9149;Inherit;True;Property;_MASK;MASK;4;0;Create;True;0;0;False;0;False;-1;None;af74e589ca46f32409cc29d79a3d5fab;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;95;178.5536,444.5653;Inherit;False;Property;_Float0;Float 0;5;0;Create;True;0;0;False;0;False;0;0.95;0;0;0;1;FLOAT;0
- Node;AmplifyShaderEditor.SamplerNode;88;10.19949,-748.707;Inherit;True;Property;_AO;AO;2;0;Create;True;0;0;False;0;False;-1;None;bd67a39ef7b25384f879fc48014d7c98;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;90;126.5354,-413.7923;Inherit;False;Property;_Int;Int;3;0;Create;True;0;0;False;0;False;0;1;0;0;0;1;FLOAT;0
- Node;AmplifyShaderEditor.RangedFloatNode;77;89.88595,-198.7182;Inherit;False;Property;_TMD;TMD;1;0;Create;True;0;0;False;0;False;0;1;0;0;0;1;FLOAT;0
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;94;453.1608,320.4077;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
- Node;AmplifyShaderEditor.SimpleMultiplyOpNode;89;350.5354,-552.7923;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
- Node;AmplifyShaderEditor.SimpleMaxOpNode;91;479.6775,63.62598;Inherit;False;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
- Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;634.314,-506.8333;Float;False;True;-1;2;ASEMaterialInspector;0;0;Unlit;UV;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;2;False;-1;0;False;-1;False;0;False;-1;0;False;-1;True;3;Custom;0.5;True;True;0;True;Transparent;;Geometry;All;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;True;2;5;False;-1;10;False;-1;2;5;False;-1;10;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;15;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;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;92;1;93;0
- WireConnection;94;0;92;0
- WireConnection;94;1;95;0
- WireConnection;89;0;88;0
- WireConnection;89;1;90;0
- WireConnection;91;0;77;0
- WireConnection;91;1;94;0
- WireConnection;0;2;89;0
- WireConnection;0;9;91;0
- ASEEND*/
- //CHKSM=BE6AA1339E3BE8CCA2EF3815D66EED4332DBA5B5
|