// Made with Amplify Shader Editor // Available at the Unity Asset Store - http://u3d.as/y3X Shader "PBR/MpMaterial" { Properties { _Tex_D("Tex_D", 2D) = "white" {} _MainCol("MainCol", Color) = (1,1,1,0) _Tex_Mp("Tex_Mp", 2D) = "white" {} _Int_M("Int_M", Range( 0 , 1)) = 1 _Int_S("Int_S", Range( 0 , 1)) = 1 _Int_ao("Int_ao", Range( 0 , 2)) = 1 _Tex_N1("Tex_N1", 2D) = "bump" {} _Int_N1("Int_N1", Range( 0 , 3)) = 1 _Tex_N2("Tex_N2", 2D) = "bump" {} _Int_N2("Int_N2", Range( 0 , 3)) = 1 _Tex_E("Tex_E", 2D) = "black" {} _Whiteint("White int", Range( 0 , 1)) = 0 [Toggle]_SwitchOfEmi("SwitchOfEmi", Float) = 0 [HDR]_EmiCol("EmiCol", Color) = (8,0,0,0) [HideInInspector] _texcoord( "", 2D ) = "white" {} [HideInInspector] __dirty( "", Int ) = 1 } SubShader { Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" "IsEmissive" = "true" } Cull Back CGPROGRAM #include "UnityStandardUtils.cginc" #pragma target 3.0 #pragma surface surf Standard keepalpha addshadow fullforwardshadows struct Input { float2 uv_texcoord; }; uniform sampler2D _Tex_N1; uniform float _Int_N1; uniform sampler2D _Tex_N2; uniform float _Int_N2; uniform sampler2D _Tex_D; uniform float4 _MainCol; uniform float _Whiteint; uniform float _SwitchOfEmi; uniform sampler2D _Tex_E; uniform float4 _EmiCol; uniform sampler2D _Tex_Mp; uniform float _Int_M; uniform float _Int_S; uniform float _Int_ao; void surf( Input i , inout SurfaceOutputStandard o ) { float3 tex2DNode2 = UnpackNormal( tex2D( _Tex_N1, i.uv_texcoord ) ); float3 appendResult19 = (float3(( tex2DNode2.r * _Int_N1 ) , ( tex2DNode2.g * _Int_N1 ) , tex2DNode2.b)); float3 tex2DNode3 = UnpackNormal( tex2D( _Tex_N2, i.uv_texcoord ) ); float3 appendResult47 = (float3(( tex2DNode3.r * _Int_N2 ) , ( tex2DNode3.g * _Int_N2 ) , tex2DNode3.b)); float3 Normal22 = BlendNormals( appendResult19 , appendResult47 ); o.Normal = Normal22; float4 temp_cast_0 = ((1.0 + (_Whiteint - 0.0) * (0.0 - 1.0) / (1.0 - 0.0))).xxxx; float4 BaseTex24 = pow( ( tex2D( _Tex_D, i.uv_texcoord ) * _MainCol ) , temp_cast_0 ); o.Albedo = BaseTex24.rgb; float4 Emission41 = (( _SwitchOfEmi )?( ( tex2D( _Tex_E, i.uv_texcoord ) * _EmiCol ) ):( float4( 0,0,0,0 ) )); o.Emission = Emission41.rgb; float4 tex2DNode4 = tex2D( _Tex_Mp, i.uv_texcoord ); float Metalness28 = ( tex2DNode4.r * _Int_M ); o.Metallic = Metalness28; float Smoothness29 = ( tex2DNode4.b * _Int_S ); o.Smoothness = Smoothness29; float AmbientOcclusion30 = pow( tex2DNode4.g , _Int_ao ); o.Occlusion = AmbientOcclusion30; o.Alpha = 1; } ENDCG } Fallback "Diffuse" CustomEditor "ASEMaterialInspector" } /*ASEBEGIN Version=18935 66;732;1241;551;3281.761;1602.3;1.882119;True;True Node;AmplifyShaderEditor.CommentaryNode;58;-3165.146,753.4503;Inherit;False;1515.344;687.8996;法线;13;15;48;2;3;46;45;12;18;47;19;44;22;53;N;1,1,1,1;0;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;53;-3058.097,1067.869;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;48;-2776.618,1325.35;Inherit;False;Property;_Int_N2;Int_N2;9;0;Create;True;0;0;0;False;0;False;1;1;0;3;0;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;3;-2782.087,1122.238;Inherit;True;Property;_Tex_N2;Tex_N2;8;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;bump;Auto;True;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;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;15;-2776.901,1023.345;Inherit;False;Property;_Int_N1;Int_N1;7;0;Create;True;0;0;0;False;0;False;1;1;0;3;0;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;54;-3204.588,-868.9603;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.CommentaryNode;56;-3166.394,1620.99;Inherit;False;1464.678;593.5877;金属度&粗糙度&环境光遮蔽;11;4;11;9;10;13;14;29;28;30;55;72;M&R&ao;1,1,1,1;0;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;52;-3232.285,-1794.029;Inherit;True;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.SamplerNode;2;-2781.136,803.4503;Inherit;True;Property;_Tex_N1;Tex_N1;6;0;Create;True;0;0;0;False;0;False;-1;095b5bb7b257d5044a0b26e14592c207;095b5bb7b257d5044a0b26e14592c207;True;0;True;bump;Auto;True;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;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SamplerNode;1;-2926.998,-1783.285;Inherit;True;Property;_Tex_D;Tex_D;0;0;Create;True;0;0;0;False;0;False;-1;ad25aa5846bbe1f41afaf271bfa53e74;ad25aa5846bbe1f41afaf271bfa53e74;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.ColorNode;5;-2859.327,-1551.641;Inherit;False;Property;_MainCol;MainCol;1;0;Create;True;0;0;0;False;0;False;1,1,1,0;1,1,1,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.RangedFloatNode;75;-2956.494,-1221.42;Inherit;False;Property;_Whiteint;White int;11;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;18;-2440.802,999.045;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TextureCoordinatesNode;55;-3116.394,1721.609;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.ColorNode;81;-2824.244,-662.8876;Inherit;False;Property;_EmiCol;EmiCol;13;1;[HDR];Create;True;0;0;0;False;0;False;8,0,0,0;32,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;12;-2445.802,849.0443;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;46;-2442.952,1267.35;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;45;-2447.952,1117.35;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode;37;-2901.66,-912.414;Inherit;True;Property;_Tex_E;Tex_E;10;0;Create;True;0;0;0;False;0;False;-1;dd71a43e709951743854a48bddfb35f8;dd71a43e709951743854a48bddfb35f8;True;0;False;black;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;4;-2813.737,1670.99;Inherit;True;Property;_Tex_Mp;Tex_Mp;2;0;Create;True;0;0;0;False;0;False;-1;58e7b5467a5f44e44b86d55a22b00f4c;58e7b5467a5f44e44b86d55a22b00f4c;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;80;-2551.406,-790.8154;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RangedFloatNode;10;-2810.668,1878.88;Inherit;False;Property;_Int_M;Int_M;3;0;Create;True;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;6;-2582.604,-1584.274;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.DynamicAppendNode;47;-2286.951,1183.35;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.DynamicAppendNode;19;-2284.801,915.0447;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.RangedFloatNode;9;-2821.207,1988.544;Inherit;False;Property;_Int_S;Int_S;4;0;Create;True;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode;11;-2816.561,2098.578;Inherit;False;Property;_Int_ao;Int_ao;5;0;Create;True;0;0;0;False;0;False;1;1;0;2;0;1;FLOAT;0 Node;AmplifyShaderEditor.TFHCRemapNode;76;-2570.781,-1248.82;Inherit;False;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;1;False;4;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.PowerNode;77;-2387.609,-1413.791;Inherit;True;False;2;0;COLOR;0,0,0,0;False;1;FLOAT;1;False;1;COLOR;0 Node;AmplifyShaderEditor.ToggleSwitchNode;79;-2232.815,-797.2021;Inherit;True;Property;_SwitchOfEmi;SwitchOfEmi;12;0;Create;True;0;0;0;False;0;False;0;True;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;14;-2282.775,1813.95;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode;13;-2276.037,1690.628;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.PowerNode;72;-2208.533,2034.831;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.BlendNormalsNode;44;-2113.549,1055.037;Inherit;False;0;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;28;-1929.149,1756.509;Inherit;False;Metalness;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;41;-1950.896,-798.1003;Inherit;True;Emission;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;30;-1945.718,2032.615;Inherit;False;AmbientOcclusion;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;24;-1737.076,-1370.18;Inherit;False;BaseTex;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;29;-1926.38,1878.614;Inherit;False;Smoothness;-1;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RegisterLocalVarNode;22;-1873.802,1060.394;Inherit;False;Normal;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.GetLocalVarNode;26;-473.7759,-132.9712;Inherit;False;22;Normal;1;0;OBJECT;;False;1;FLOAT3;0 Node;AmplifyShaderEditor.GetLocalVarNode;43;-477.1973,-57.97;Inherit;False;41;Emission;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;32;-470.8406,23.49832;Inherit;False;28;Metalness;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;27;-473.6052,-211.7178;Inherit;False;24;BaseTex;1;0;OBJECT;;False;1;COLOR;0 Node;AmplifyShaderEditor.GetLocalVarNode;31;-498.8406,230.4985;Inherit;False;30;AmbientOcclusion;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.GetLocalVarNode;33;-480.8406,117.4983;Inherit;False;29;Smoothness;1;0;OBJECT;;False;1;FLOAT;0 Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;-146.0046,-76.68896;Float;False;True;-1;2;ASEMaterialInspector;0;0;Standard;PBR/MpMaterial;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Opaque;0.5;True;True;0;False;Opaque;;Geometry;All;18;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;0;0;False;-1;0;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;True;Relative;0;;-1;-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;3;1;53;0 WireConnection;2;1;53;0 WireConnection;1;1;52;0 WireConnection;18;0;2;2 WireConnection;18;1;15;0 WireConnection;12;0;2;1 WireConnection;12;1;15;0 WireConnection;46;0;3;2 WireConnection;46;1;48;0 WireConnection;45;0;3;1 WireConnection;45;1;48;0 WireConnection;37;1;54;0 WireConnection;4;1;55;0 WireConnection;80;0;37;0 WireConnection;80;1;81;0 WireConnection;6;0;1;0 WireConnection;6;1;5;0 WireConnection;47;0;45;0 WireConnection;47;1;46;0 WireConnection;47;2;3;3 WireConnection;19;0;12;0 WireConnection;19;1;18;0 WireConnection;19;2;2;3 WireConnection;76;0;75;0 WireConnection;77;0;6;0 WireConnection;77;1;76;0 WireConnection;79;1;80;0 WireConnection;14;0;4;3 WireConnection;14;1;9;0 WireConnection;13;0;4;1 WireConnection;13;1;10;0 WireConnection;72;0;4;2 WireConnection;72;1;11;0 WireConnection;44;0;19;0 WireConnection;44;1;47;0 WireConnection;28;0;13;0 WireConnection;41;0;79;0 WireConnection;30;0;72;0 WireConnection;24;0;77;0 WireConnection;29;0;14;0 WireConnection;22;0;44;0 WireConnection;0;0;27;0 WireConnection;0;1;26;0 WireConnection;0;2;43;0 WireConnection;0;3;32;0 WireConnection;0;4;33;0 WireConnection;0;5;31;0 ASEEND*/ //CHKSM=D07F61113DCAD7C788C2A23EFD3E2243B3B96977