// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X 
Shader "Zyc/JgPbr"
{
	Properties
	{
		_Light("Light", Vector) = (0.3,1,0,0)
		_Color0("Color 0", Color) = (1,1,1,0)
		_light("light", Range( 0 , 3)) = 2.122295
		_albedo("albedo", 2D) = "white" {}
		_nom("nom", 2D) = "bump" {}
		_highlight("highlight", Range( 1 , 90)) = 4.604562
		_R_mateG_ao("R_mateG_ao", 2D) = "white" {}
		_Color1("Color 1", Color) = (0,0,0,0)
		[HideInInspector] _texcoord( "", 2D ) = "white" {}
		[HideInInspector] __dirty( "", Int ) = 1
	}

	SubShader
	{
		Tags{ "RenderType" = "Opaque"  "Queue" = "Geometry+0" "IgnoreProjector" = "True" "IsEmissive" = "true"  }
		Cull Back
		CGPROGRAM
		#include "UnityPBSLighting.cginc"
		#pragma target 3.0
		#pragma surface surf StandardCustomLighting keepalpha noshadow 
		struct Input
		{
			float2 uv_texcoord;
			float3 viewDir;
			INTERNAL_DATA
		};

		struct SurfaceOutputCustomLightingCustom
		{
			half3 Albedo;
			half3 Normal;
			half3 Emission;
			half Metallic;
			half Smoothness;
			half Occlusion;
			half Alpha;
			Input SurfInput;
			UnityGIInput GIData;
		};

		uniform float4 _Color1;
		uniform sampler2D _albedo;
		uniform float4 _albedo_ST;
		uniform sampler2D _R_mateG_ao;
		SamplerState sampler_R_mateG_ao;
		uniform float4 _R_mateG_ao_ST;
		uniform float4 _Color0;
		uniform float4 _Light;
		uniform sampler2D _nom;
		uniform float4 _nom_ST;
		uniform float _light;
		uniform float _highlight;

		inline half4 LightingStandardCustomLighting( inout SurfaceOutputCustomLightingCustom s, half3 viewDir, UnityGI gi )
		{
			UnityGIInput data = s.GIData;
			Input i = s.SurfInput;
			half4 c = 0;
			c.rgb = 0;
			c.a = 1;
			return c;
		}

		inline void LightingStandardCustomLighting_GI( inout SurfaceOutputCustomLightingCustom s, UnityGIInput data, inout UnityGI gi )
		{
			s.GIData = data;
		}

		void surf( Input i , inout SurfaceOutputCustomLightingCustom o )
		{
			o.SurfInput = i;
			o.Normal = float3(0,0,1);
			float2 uv_albedo = i.uv_texcoord * _albedo_ST.xy + _albedo_ST.zw;
			float4 tex2DNode14 = tex2D( _albedo, uv_albedo );
			float2 uv_R_mateG_ao = i.uv_texcoord * _R_mateG_ao_ST.xy + _R_mateG_ao_ST.zw;
			float4 tex2DNode42 = tex2D( _R_mateG_ao, uv_R_mateG_ao );
			float4 lerpResult41 = lerp( tex2DNode14 , float4( 0,0,0,0 ) , tex2DNode42.r);
			float4 normalizeResult2 = normalize( _Light );
			float2 uv_nom = i.uv_texcoord * _nom_ST.xy + _nom_ST.zw;
			float dotResult9 = dot( UnpackNormal( tex2D( _nom, uv_nom ) ) , i.viewDir );
			float4 temp_cast_0 = (dotResult9).xxxx;
			float dotResult7 = dot( normalizeResult2 , temp_cast_0 );
			float clampResult35 = clamp( dotResult9 , 0.0 , 1.0 );
			o.Emission = ( _Color1 * ( ( lerpResult41 + ( ( ( ( _Color0 * dotResult7 ) * _light ) * tex2DNode14 ) + pow( clampResult35 , _highlight ) ) ) * tex2DNode42.g ) ).rgb;
		}

		ENDCG
	}
	CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=18703
-24.8;798.4;1279;742;929.3853;616.797;1;True;False
Node;AmplifyShaderEditor.ViewDirInputsCoordNode;8;-2592.47,263.5588;Inherit;False;Tangent;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
Node;AmplifyShaderEditor.SamplerNode;30;-2764.536,-3.637239;Inherit;True;Property;_nom;nom;4;0;Create;True;0;0;False;0;False;-1;191b7a4fd3b599245a499bbda776aad8;376b1e66d7e93d643b22f8a5dfa1de4e;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.Vector4Node;1;-2555.503,-326.0607;Inherit;False;Property;_Light;Light;0;0;Create;True;0;0;False;0;False;0.3,1,0,0;0.39,1,0.36,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.DotProductOpNode;9;-2305.843,107.805;Inherit;True;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0
Node;AmplifyShaderEditor.NormalizeNode;2;-2289.767,-317.4783;Inherit;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0
Node;AmplifyShaderEditor.DotProductOpNode;7;-2090.603,-94.07986;Inherit;True;2;0;FLOAT4;0,0,0,0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.ColorNode;10;-2035.154,-386.2777;Inherit;False;Property;_Color0;Color 0;1;0;Create;True;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.SimpleMultiplyOpNode;11;-1751.391,-380.1587;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.RangedFloatNode;12;-1639.798,-310.1879;Inherit;False;Property;_light;light;2;0;Create;True;0;0;False;0;False;2.122295;0.8;0;3;0;1;FLOAT;0
Node;AmplifyShaderEditor.ClampOpNode;35;-2004.772,142.3304;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;13;-1355.661,-372.3248;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.SamplerNode;14;-1504.994,-214.356;Inherit;True;Property;_albedo;albedo;3;0;Create;True;0;0;False;0;False;-1;None;fdd9a95f1684ade4cbf4e5d3c2753d31;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;37;-1742.327,240.1456;Inherit;False;Property;_highlight;highlight;5;0;Create;True;0;0;False;0;False;4.604562;18.4;1;90;0;1;FLOAT;0
Node;AmplifyShaderEditor.PowerNode;36;-1419.347,72.94846;Inherit;True;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;16;-1091.251,-281.5429;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.SamplerNode;42;-1076.753,80.64703;Inherit;True;Property;_R_mateG_ao;R_mateG_ao;6;0;Create;True;0;0;False;0;False;-1;None;e38f5c09f4fe39041a5eb85adde5e4fb;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.SimpleAddOpNode;38;-1091.374,-36.38488;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.LerpOp;41;-745.4623,-320.1482;Inherit;True;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.SimpleAddOpNode;43;-391.8393,-145.4138;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.ColorNode;45;-339.042,-484.7491;Inherit;False;Property;_Color1;Color 1;8;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;39;-121.963,-112.2616;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;46;36.81013,-335.0103;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.RangedFloatNode;44;-165.4189,30.34528;Inherit;False;Property;_Float0;Float 0;7;0;Create;True;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;263.814,-226.1458;Float;False;True;-1;2;ASEMaterialInspector;0;0;CustomLighting;Zyc/JgPbr;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;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;False;0;False;Opaque;;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;False;0;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;;-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;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,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;9;0;30;0
WireConnection;9;1;8;0
WireConnection;2;0;1;0
WireConnection;7;0;2;0
WireConnection;7;1;9;0
WireConnection;11;0;10;0
WireConnection;11;1;7;0
WireConnection;35;0;9;0
WireConnection;13;0;11;0
WireConnection;13;1;12;0
WireConnection;36;0;35;0
WireConnection;36;1;37;0
WireConnection;16;0;13;0
WireConnection;16;1;14;0
WireConnection;38;0;16;0
WireConnection;38;1;36;0
WireConnection;41;0;14;0
WireConnection;41;2;42;1
WireConnection;43;0;41;0
WireConnection;43;1;38;0
WireConnection;39;0;43;0
WireConnection;39;1;42;2
WireConnection;46;0;45;0
WireConnection;46;1;39;0
WireConnection;0;2;46;0
ASEEND*/
//CHKSM=B5AEE4797BCC59A72A68BB719F1D831E8E3F61AA