Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Made with Amplify Shader Editor
- // Available at the Unity Asset Store - http://u3d.as/y3X
- Shader "Automatic/AutoTexture2"
- {
- Properties
- {
- _Angle1("Angle1", Range( -1 , 1)) = 0.5
- _Texture1("Texture1", 2D) = "white" {}
- _Normal1("Normal1", 2D) = "bump" {}
- _Texture2("Texture2", 2D) = "white" {}
- _Normal2("Normal2", 2D) = "bump" {}
- [HideInInspector] __dirty( "", Int ) = 1
- _Absolute("Absolute", Range( 0 , 1)) = 1
- }
- SubShader
- {
- Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" }
- Cull Back
- CGPROGRAM
- #pragma target 3.0
- #pragma surface surf Standard keepalpha addshadow fullforwardshadows
- struct Input
- {
- float3 worldNormal;
- INTERNAL_DATA
- float2 uv_Normal1;
- float2 uv_Normal2;
- float2 uv_Texture1;
- float2 uv_Texture2;
- };
- uniform float _Absolute;
- uniform float _Angle1;
- uniform sampler2D _Normal1;
- uniform sampler2D _Normal2;
- uniform sampler2D _Texture1;
- uniform sampler2D _Texture2;
- void surf( Input input , inout SurfaceOutputStandard output )
- {
- float _normal = ( ( _Absolute > 0.0 ) ? abs( input.worldNormal.y ) : input.worldNormal.y ) ;
- output.Normal = ( _normal - 0.0 > _Angle1 ? UnpackNormal( tex2D( _Normal1,input.uv_Normal1) ) : _normal - 0.0 <= _Angle1 && _normal + 0.0 >= _Angle1 ? UnpackNormal( tex2D( _Normal2,input.uv_Normal2) ) : UnpackNormal( tex2D( _Normal2,input.uv_Normal2) ) ) ;
- float4 tex2DNode10 = tex2D( _Texture2,input.uv_Texture2);
- float3 FLOATToFLOAT3520= ( _normal - 0.0 > _Angle1 ? tex2D( _Texture1,input.uv_Texture1) : _normal - 0.0 <= _Angle1 && _normal + 0.0 >= _Angle1 ? tex2DNode10 : tex2DNode10 ) ;
- output.Albedo = FLOATToFLOAT3520;
- }
- ENDCG
- }
- Fallback "Diffuse"
- }
- /*ASEBEGIN
- Version=21
- 1927;29;1906;1014;763.6346;77.3678;1.3;True;True
- Node;AmplifyShaderEditor.CommentaryNode;37;-624.8143,-546.3958;1015.414;369.8057;Variable;7;42;38;39;40;41;44;51
- Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;1147.137,10.46317;True;Standard;Automatic/AutoTexture2;False;False;False;False;False;False;False;False;False;False;False;False;Back;On;LEqual;Opaque;0.5;True;True;0;False;Opaque;Geometry;0,0,0;0,0,0;0,0,0;0.0;0.0;0.0;0.0;0.0;0.0;0.0;0.0;0,0,0
- Node;AmplifyShaderEditor.WorldNormalInputsNode;38;-574.8143,-365.59
- Node;AmplifyShaderEditor.RangedFloatNode;44;-451.2381,-488.468;Property;_Absolute;Absolute;-1;1;0;1
- Node;AmplifyShaderEditor.TFHCCompareGreater;51;-68.83755,-382.8677;0.0;0.0;0.0;0.0
- Node;AmplifyShaderEditor.RangedFloatNode;21;-126.8373,215.1047;Property;_Angle1;Angle1;-10;0.5;-1;1
- Node;AmplifyShaderEditor.RegisterLocalVarNode;41;189.6003,-371.7951;_normal;-100;0.0
- Node;AmplifyShaderEditor.TFHCIf;53;647.3637,610.7321;0.0;0.0;0.0,0,0;0.0,0,0;0.0,0,0;0.0
- Node;AmplifyShaderEditor.SamplerNode;9;-125.3791,307.0836;Property;_Texture1;Texture1;-9;None;True;0;False;white;Auto;False;Object;-1;0,0;1.0
- Node;AmplifyShaderEditor.SamplerNode;23;-123.3791,491.6841;Property;_Normal1;Normal1;-8;None;True;0;False;bump;Auto;True;Object;-1;0,0;1.0
- Node;AmplifyShaderEditor.SamplerNode;24;-377.8313,913.6588;Property;_Normal2;Normal2;-6;None;True;0;False;bump;Auto;True;Object;-1;0,0;1.0
- Node;AmplifyShaderEditor.GetLocalVarNode;27;322.3824,32.00516;41
- Node;AmplifyShaderEditor.AbsOpNode;39;-293.9795,-368.1901;0.0
- Node;AmplifyShaderEditor.SamplerNode;10;-380.2312,730.759;Property;_Texture2;Texture2;-7;None;True;0;False;white;Auto;False;Object;-1;0,0;1.0
- Node;AmplifyShaderEditor.TFHCIf;52;645.7639,345.1325;0.0;0.0;0.0,0,0,0;0.0,0,0,0;0.0,0,0,0;0.0
- WireConnection;0;0;52;0
- WireConnection;0;1;53;0
- WireConnection;51;0;44;0
- WireConnection;51;2;39;0
- WireConnection;51;3;38;2
- WireConnection;41;0;51;0
- WireConnection;53;0;27;0
- WireConnection;53;1;21;0
- WireConnection;53;2;23;0
- WireConnection;53;3;24;0
- WireConnection;53;4;24;0
- WireConnection;39;0;38;2
- WireConnection;52;0;27;0
- WireConnection;52;1;21;0
- WireConnection;52;2;9;0
- WireConnection;52;3;10;0
- WireConnection;52;4;10;0
- ASEEND*/
- //CHKSM=D116A564395F5691B4399790076B1C1CB6238825
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement