// Alloy Physical Shader Framework // Copyright 2013-2017 RUST LLC. // http://www.alloy.rustltd.com/ Shader "Alloy Mods/Transition Lite" { Properties { // Global Settings [Toggle(EFFECT_BUMP)] _HasBumpMap ("'Normals Source' {Dropdown:{VertexNormals:{_BumpMap,_BumpScale,_DetailNormalMap,_DetailNormalMapScale,_WetNormalMap,_WetNormalMapScale,_BumpMap2,_BumpScale2}, NormalMaps:{}}}", Float) = 1 [Toggle(_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A)] _MainRoughnessSource ("'Roughness Source' {Dropdown:{PackedMapAlpha:{}, BaseColorAlpha:{_SpecTex,_Occlusion,_MaterialMap2,_Occlusion2}}}", Float) = 0 // Main Textures _MainTextures ("'Main Textures' {Section:{Color:0}}", Float) = 0 [LM_Albedo] [LM_Transparency] _Color ("'Tint' {}", Color) = (1,1,1,1) [LM_MasterTilingOffset] [LM_Albedo] _MainTex ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {} _MainTexVelocity ("Scroll", Vector) = (0,0,0,0) _MainTexUV ("UV Set", Float) = 0 [LM_Metallic] _SpecTex ("'Metal(R) AO(G) Spec(B) Rough(A)' {Visualize:{R, G, B, A}, Parent:_MainTex}", 2D) = "white" {} [LM_NormalMap] _BumpMap ("'Normals' {Visualize:{NRM}, Parent:_MainTex}", 2D) = "bump" {} _BaseColorVertexTint ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0 // Main Properties _MainPhysicalProperties ("'Main Properties' {Section:{Color:1}}", Float) = 0 [LM_Metallic] _Metal ("'Metallic' {Min:0, Max:1}", Float) = 1 _Specularity ("'Specularity' {Min:0, Max:1}", Float) = 1 _SpecularTint ("'Specular Tint' {Min:0, Max:1}", Float) = 0 _Roughness ("'Roughness' {Min:0, Max:1}", Float) = 1 _Occlusion ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1 _BumpScale ("'Normal Strength' {}", Float) = 1 // Dissolve [Toggle(_DISSOLVE_ON)] _Dissolve ("'Dissolve' {Feature:{Color:12}}", Float) = 0 [HDR] _DissolveGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1) _DissolveTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {} _DissolveTexUV ("UV Set", Float) = 0 _DissolveCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0 // Transition _TransitionProperties ("'Transition' {Section:{Color:14}}", Float) = 0 [HDR] _TransitionGlowColor ("'Glow Tint' {}", Color) = (1,1,1,1) _TransitionTex ("'Glow Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {} _TransitionTexUV ("UV Set", Float) = 0 _TransitionCutoff ("'Cutoff' {Min:0, Max:1}", Float) = 0 // Secondary Textures _SecondaryTextures ("'Secondary Textures' {Section:{Color:15}}", Float) = 0 _Color2 ("'Tint' {}", Color) = (1,1,1,1) _MainTex2 ("'Base Color(RGB) Opacity(A)' {Visualize:{RGB, A}}", 2D) = "white" {} _MainTex2Velocity ("Scroll", Vector) = (0,0,0,0) _MainTex2UV ("UV Set", Float) = 0 _MaterialMap2 ("'Metal(R) AO(G) Spec(B) Rough(A)' {Visualize:{R, G, B, A}, Parent:_MainTex2}", 2D) = "white" {} _BumpMap2 ("'Normals' {Visualize:{NRM}, Parent:_MainTex2}", 2D) = "bump" {} _BaseColorVertexTint2 ("'Vertex Color Tint' {Min:0, Max:1}", Float) = 0 // Secondary Properties _SecondaryPhysicalProperties ("'Secondary Properties' {Section:{Color:16}}", Float) = 0 _Metallic2 ("'Metallic' {Min:0, Max:1}", Float) = 1 _Specularity2 ("'Specularity' {Min:0, Max:1}", Float) = 1 _SpecularTint2 ("'Specular Tint' {Min:0, Max:1}", Float) = 0 _Roughness2 ("'Roughness' {Min:0, Max:1}", Float) = 1 _Occlusion2 ("'Occlusion Strength' {Min:0, Max:1}", Float) = 1 _BumpScale2 ("'Normal Strength' {}", Float) = 1 // Forward Rendering Options _ForwardRenderingOptions ("'Forward Rendering Options' {Section:{Color:19}}", Float) = 0 [ToggleOff] _SpecularHighlights ("'Specular Highlights' {Toggle:{On:{}, Off:{}}}", Float) = 1.0 [ToggleOff] _GlossyReflections ("'Glossy Reflections' {Toggle:{On:{}, Off:{}}}", Float) = 1.0 // Advanced Options _AdvancedOptions ("'Advanced Options' {Section:{Color:20}}", Float) = 0 _Lightmapping ("'GI' {LightmapEmissionProperty:{}}", Float) = 1 _RenderQueue ("'Render Queue' {RenderQueue:{}}", Float) = 0 _EnableInstancing ("'Enable Instancing' {EnableInstancing:{}}", Float) = 0 } SubShader { Tags { "Queue" = "Geometry" "RenderType" = "Opaque" //"DisableBatching" = "LODFading" } LOD 300 Pass { Name "FORWARD" Tags { "LightMode" = "ForwardBase" } CGPROGRAM #pragma target 3.0 #pragma exclude_renderers gles #pragma shader_feature EFFECT_BUMP #pragma shader_feature _DISSOLVE_ON #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A #pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF #pragma shader_feature _ _GLOSSYREFLECTIONS_OFF //#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE #pragma multi_compile_fwdbase #pragma multi_compile_fog #pragma multi_compile_instancing //#pragma multi_compile __ VTRANSPARENCY_ON #pragma vertex aMainVertexShader #pragma fragment aMainFragmentShader #define UNITY_PASS_FORWARDBASE #include "Assets/Alloy/Mods/Shaders/Definition/TransitionLite.cginc" #include "Assets/Alloy/Shaders/Forward/Base.cginc" ENDCG } Pass { Name "FORWARD_DELTA" Tags { "LightMode" = "ForwardAdd" } Blend One One ZWrite Off CGPROGRAM #pragma target 3.0 #pragma exclude_renderers gles #pragma shader_feature EFFECT_BUMP #pragma shader_feature _DISSOLVE_ON #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A #pragma shader_feature _ _SPECULARHIGHLIGHTS_OFF //#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE #pragma multi_compile_fwdadd_fullshadows #pragma multi_compile_fog //#pragma multi_compile __ VTRANSPARENCY_ON #pragma vertex aMainVertexShader #pragma fragment aMainFragmentShader #define UNITY_PASS_FORWARDADD #include "Assets/Alloy/Mods/Shaders/Definition/TransitionLite.cginc" #include "Assets/Alloy/Shaders/Forward/Add.cginc" ENDCG } Pass { Name "SHADOWCASTER" Tags { "LightMode" = "ShadowCaster" } CGPROGRAM #pragma target 3.0 #pragma exclude_renderers gles #pragma shader_feature _DISSOLVE_ON #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A #pragma multi_compile_shadowcaster #pragma multi_compile_instancing #pragma vertex aMainVertexShader #pragma fragment aMainFragmentShader #define UNITY_PASS_SHADOWCASTER #include "Assets/Alloy/Mods/Shaders/Definition/TransitionLite.cginc" #include "Assets/Alloy/Shaders/Forward/Shadow.cginc" ENDCG } Pass { Name "DEFERRED" Tags { "LightMode" = "Deferred" } CGPROGRAM #pragma target 3.0 #pragma exclude_renderers nomrt gles #pragma shader_feature EFFECT_BUMP #pragma shader_feature _DISSOLVE_ON #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A #pragma shader_feature _ _GLOSSYREFLECTIONS_OFF //#pragma multi_compile __ LOD_FADE_PERCENTAGE LOD_FADE_CROSSFADE #pragma multi_compile_prepassfinal #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_instancing #pragma vertex aMainVertexShader #pragma fragment aMainFragmentShader #define UNITY_PASS_DEFERRED #include "Assets/Alloy/Mods/Shaders/Definition/TransitionLite.cginc" #include "Assets/Alloy/Shaders/Forward/Gbuffer.cginc" ENDCG } Pass { Name "Meta" Tags { "LightMode" = "Meta" } Cull Off CGPROGRAM #pragma target 3.0 #pragma exclude_renderers nomrt gles #pragma shader_feature _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A #pragma vertex aMainVertexShader #pragma fragment aMainFragmentShader #define UNITY_PASS_META #include "Assets/Alloy/Mods/Shaders/Definition/TransitionLite.cginc" #include "Assets/Alloy/Shaders/Forward/Meta.cginc" ENDCG } } FallBack "VertexLit" CustomEditor "AlloyFieldBasedEditor" }