BEGIN_OPTIONS ShaderName "AwesomeTechnologies/Development/Standard/StandardShader" Tags { "RenderType" = "Opaque" "Queue" = "Geometry+100" } // tags are always in standard pipeline style Workflow "Metallic" // Metallic, Specular, or Unlit END_OPTIONS BEGIN_SUBSHADERS "../Instanced_Indirect_Stacked.surfshader" "../DitherCrossfade_Stacked.surfshader" END_SUBSHADERS BEGIN_PROPERTIES _Color ("Color", Color) = (1,1,1,1) _MainTex ("Albedo (RGB)", 2D) = "white" {} _BumpMap ("Bumpmap", 2D) = "bump" {} _DetailAlbedoMap ("DetailAlbedoMap", 2D) = "gray" {} _DetailNormalMap ("DetailNormalMap", 2D) = "bump" {} _OcclusionMap ("OcclusionMap", 2D) = "white" {} _Glossiness ("Smoothness", Range(0,1)) = 0.5 _Metallic ("Metallic", Range(0,1)) = 0.0 _LODDebugColor ("LOD Debug color", Color) = (1,1,1,1) END_PROPERTIES BEGIN_DEFINES #pragma target 5.0 END_DEFINES BEGIN_CODE half _Glossiness; half _Metallic; fixed4 _Color; sampler2D _MainTex; sampler2D _BumpMap; sampler2D _DetailAlbedoMap; sampler2D _DetailNormalMap; sampler2D _OcclusionMap; fixed4 _LODDebugColor; void SurfaceFunction(inout Surface o, ShaderData d) { fixed4 oc = tex2D(_OcclusionMap, d.texcoord0.xy); fixed4 c = tex2D (_MainTex, d.texcoord0.xy) * _Color; o.Normal = UnpackNormal (tex2D (_BumpMap, d.texcoord0.xy)); o.Albedo = c.rgb * oc.rgb; o.Albedo *= tex2D (_DetailAlbedoMap, d.texcoord0.xy).rgb * 2; o.Albedo *= _LODDebugColor.rgb; o.Metallic = _Metallic; o.Smoothness = _Glossiness; o.Alpha = c.a; } END_CODE