diff --git a/Assets/External/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMenuItems.cs b/Assets/External/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMenuItems.cs index 022d8d6b..7106245b 100644 --- a/Assets/External/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMenuItems.cs +++ b/Assets/External/AmplifyShaderEditor/Plugins/Editor/Templates/TemplateMenuItems.cs @@ -91,6 +91,11 @@ namespace AmplifyShaderEditor { AmplifyShaderEditorWindow.CreateConfirmationTemplateShader( "94348b07e5e8bab40bd6c8a1e3df54cd" ); } + [MenuItem( "Assets/Create/Amplify Shader/Universal/NiloToonEnvironment", false, 85 )] + public static void ApplyTemplateUniversalNiloToonEnvironment() + { + AmplifyShaderEditorWindow.CreateConfirmationTemplateShader( "2534d4d29a40afc46a3cc49af189fcb4" ); + } [MenuItem( "Assets/Create/Amplify Shader/Universal/Unlit", false, 85 )] public static void ApplyTemplateUniversalUnlit() { diff --git a/Assets/External/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/NiloToonEnvironment.shader b/Assets/External/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/NiloToonEnvironment.shader new file mode 100644 index 00000000..dd82211e --- /dev/null +++ b/Assets/External/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/NiloToonEnvironment.shader @@ -0,0 +1,1450 @@ +Shader /*ase_name*/ "Hidden/Universal/NiloToonEnvironment" /*end*/ +{ + Properties + { + /*ase_props*/ + + [ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0 + [ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0 + [ToggleUI] _ReceiveShadows("Receive Shadows", Float) = 1.0 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + + // NiloToon Screen Space Outline + _ScreenSpaceOutlineIntensity("Screen Space Outline Intensity", Range(0,1)) = 1 + [HDR]_ScreenSpaceOutlineColor("Screen Space Outline Color", Color) = (1,1,1,1) + _ScreenSpaceOutlineWidth("Screen Space Outline Width", Float) = 1 + } + + SubShader + { + /*ase_subshader_options:Name=Additional Options + Option:Workflow:Specular,Metallic:Metallic + Specular:SetDefine:_SPECULAR_SETUP 1 + Specular:ShowPort:Forward:Specular + Specular:HidePort:Forward:Metallic + Metallic:RemoveDefine:_SPECULAR_SETUP 1 + Metallic:ShowPort:Forward:Metallic + Metallic:HidePort:Forward:Specular + Option:Surface:Opaque,Transparent:Opaque + Opaque:SetPropertyOnSubShader:RenderType,Opaque + Opaque:SetPropertyOnSubShader:RenderQueue,Geometry + Opaque:SetPropertyOnSubShader:ZWrite,On + Opaque:HideOption: Blend + Opaque:RemoveDefine:_SURFACE_TYPE_TRANSPARENT 1 + Transparent:SetPropertyOnSubShader:RenderType,Transparent + Transparent:SetPropertyOnSubShader:RenderQueue,Transparent + Transparent:SetPropertyOnSubShader:ZWrite,Off + Transparent:ShowOption: Blend + Transparent:SetDefine:_SURFACE_TYPE_TRANSPARENT 1 + Option: Blend:Alpha,Premultiply,Additive,Multiply:Alpha + Alpha:SetPropertyOnPass:Forward:BlendRGB,SrcAlpha,OneMinusSrcAlpha + Premultiply:SetPropertyOnPass:Forward:BlendRGB,One,OneMinusSrcAlpha + Additive:SetPropertyOnPass:Forward:BlendRGB,One,One + Multiply:SetPropertyOnPass:Forward:BlendRGB,DstColor,Zero + Alpha,Premultiply,Additive:SetPropertyOnPass:Forward:BlendAlpha,One,OneMinusSrcAlpha + Multiply:SetPropertyOnPass:Forward:BlendAlpha,One,Zero + disable:SetPropertyOnPass:Forward:BlendRGB,One,Zero + disable:SetPropertyOnPass:Forward:BlendAlpha,One,Zero + Option:Two Sided:On,Cull Back,Cull Front:Cull Back + On:SetPropertyOnSubShader:CullMode,Off + Cull Back:SetPropertyOnSubShader:CullMode,Back + Cull Front:SetPropertyOnSubShader:CullMode,Front + Option:Alpha Clipping:false,true:false + true:ShowPort:Forward:Alpha Clip Threshold + true:SetDefine:Forward:pragma shader_feature_local_fragment _ALPHATEST_ON + true:SetDefine:ShadowCaster:pragma shader_feature_local _ALPHATEST_ON + true:SetDefine:DepthOnly:pragma shader_feature_local _ALPHATEST_ON + true:SetDefine:DepthNormals:pragma shader_feature_local _ALPHATEST_ON + false:HidePort:Forward:Alpha Clip Threshold + false:RemoveDefine:Forward:pragma shader_feature_local_fragment _ALPHATEST_ON + false:RemoveDefine:ShadowCaster:pragma shader_feature_local _ALPHATEST_ON + false:RemoveDefine:DepthOnly:pragma shader_feature_local _ALPHATEST_ON + false:RemoveDefine:DepthNormals:pragma shader_feature_local _ALPHATEST_ON + Option:Fragment Normal Space:Tangent,Object,World:Tangent + Tangent:SetDefine:_NORMAL_DROPOFF_TS 1 + Tangent:SetPortName:Forward:1,Normal + Object:SetDefine:_NORMAL_DROPOFF_OS 1 + Object:SetPortName:Forward:1,Object Normal + World:SetDefine:_NORMAL_DROPOFF_WS 1 + World:SetPortName:Forward:1,World Normal + Option:Cast Shadows:false,true:true + true:IncludePass:ShadowCaster + false,disable:ExcludePass:ShadowCaster + Option:Receive Shadows:Force Off,Force On,Material Toggle:Material Toggle + Force On:RemoveDefine:Forward:pragma shader_feature_local_fragment _RECEIVE_SHADOWS_OFF + Force On:SetShaderProperty:_ReceiveShadows,//[ToggleUI] _ReceiveShadows("Receive Shadows", Float) = 1.0 + Force Off:SetDefine:Forward:pragma multi_compile_local_fragment _RECEIVE_SHADOWS_OFF + Force Off:SetShaderProperty:_ReceiveShadows,//[ToggleUI] _ReceiveShadows("Receive Shadows", Float) = 1.0 + Material Toggle:SetDefine:Forward:pragma shader_feature_local_fragment _RECEIVE_SHADOWS_OFF + Material Toggle:SetShaderProperty:_ReceiveShadows,[ToggleUI] _ReceiveShadows("Receive Shadows", Float) = 1.0 + Option:Specular Highlights:Force Off,Force On,Material Toggle:Material Toggle + Force On:RemoveDefine:Forward:pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF + Force On:SetShaderProperty:_SpecularHighlights,//[ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0 + Force Off:SetDefine:Forward:pragma multi_compile_local_fragment _SPECULARHIGHLIGHTS_OFF + Force Off:SetShaderProperty:_SpecularHighlights,//[ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0 + Material Toggle:SetDefine:Forward:pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF + Material Toggle:SetShaderProperty:_SpecularHighlights,[ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0 + Option:Environment Reflections:Force Off,Force On,Material Toggle:Material Toggle + Force On:RemoveDefine:Forward:pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF + Force On:SetShaderProperty:_EnvironmentReflections,//[ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0 + Force Off:SetDefine:Forward:pragma multi_compile_local_fragment _ENVIRONMENTREFLECTIONS_OFF + Force Off:SetShaderProperty:_EnvironmentReflections,//[ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0 + Material Toggle:SetDefine:Forward:pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF + Material Toggle:SetShaderProperty:_EnvironmentReflections,[ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0 + Option:Receive SSAO:false,true:true + true:SetDefine:Forward:pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + false:RemoveDefine:Forward:pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + Option:GPU Instancing:false,true:true + true:SetDefine:Forward:pragma multi_compile_instancing + true:SetDefine:ShadowCaster:pragma multi_compile_instancing + true:SetDefine:DepthOnly:pragma multi_compile_instancing + true:SetDefine:DepthNormals:pragma multi_compile_instancing + true:SetDefine:Meta:pragma multi_compile_instancing + false:RemoveDefine:Forward:pragma multi_compile_instancing + false:RemoveDefine:ShadowCaster:pragma multi_compile_instancing + false:RemoveDefine:DepthOnly:pragma multi_compile_instancing + false:RemoveDefine:DepthNormals:pragma multi_compile_instancing + false:RemoveDefine:Meta:pragma multi_compile_instancing + Option:LOD CrossFade:false,true:true + true:SetDefine:Forward:pragma multi_compile _ LOD_FADE_CROSSFADE + true:SetDefine:ShadowCaster:pragma multi_compile _ LOD_FADE_CROSSFADE + true:SetDefine:DepthOnly:pragma multi_compile _ LOD_FADE_CROSSFADE + true:SetDefine:DepthNormals:pragma multi_compile _ LOD_FADE_CROSSFADE + false:RemoveDefine:Forward:pragma multi_compile _ LOD_FADE_CROSSFADE + false:RemoveDefine:ShadowCaster:pragma multi_compile _ LOD_FADE_CROSSFADE + false:RemoveDefine:DepthOnly:pragma multi_compile _ LOD_FADE_CROSSFADE + false:RemoveDefine:DepthNormals:pragma multi_compile _ LOD_FADE_CROSSFADE + Option:NiloToon Screen Space Outline:false,true:false + true:SetDefine:Forward:pragma multi_compile_fragment _ _NILOTOON_GLOBAL_ENABLE_SCREENSPACE_OUTLINE + false:RemoveDefine:Forward:pragma multi_compile_fragment _ _NILOTOON_GLOBAL_ENABLE_SCREENSPACE_OUTLINE + */ + + Tags + { + "RenderPipeline" = "UniversalPipeline" + "RenderType" = "Opaque" + "UniversalMaterialType" = "Lit" + "Queue" = "Geometry" + "IgnoreProjector" = "True" + } + + Cull Back + ZWrite On + ZTest LEqual + Offset 0,0 + AlphaToMask Off + + LOD 300 + + HLSLINCLUDE + #pragma target 3.0 + #pragma prefer_hlslcc gles + // GPU Instancing not available in WebGL + // #pragma exclude_renderers gles // + ENDHLSL + + /*ase_pass*/ + Pass + { + /*ase_main_pass*/ + Name "Forward" + Tags + { + "LightMode" = "UniversalForwardOnly" + } + + Blend One Zero + ZWrite On + ZTest LEqual + Offset 0,0 + ColorMask RGBA + + /*ase_stencil*/ + + HLSLPROGRAM + + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile _ EVALUATE_SH_MIXED EVALUATE_SH_VERTEX + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _REFLECTION_PROBE_ATLAS + #pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _CLUSTER_LIGHT_LOOP + + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ LIGHTMAP_BICUBIC_SAMPLING + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile _ USE_LEGACY_LIGHTMAPS + + #pragma vertex vert + #pragma fragment frag + + #if defined(_SPECULAR_SETUP) && defined(_SPECULAR_COLOR) + #define _SPECULAR_COLOR 1 + #endif + + #define SHADERPASS SHADERPASS_FORWARD + + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Fog.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ProbeVolumeVariants.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + // NiloToon Screen Space Outline Support + // Note: Include NiloToon's utility files for screen space outline functionality + #if defined(_NILOTOON_GLOBAL_ENABLE_SCREENSPACE_OUTLINE) + #include "../../../../../../NiloToonURP/ShaderLibrary/NiloUtilityHLSL/NiloAllUtilIncludes.hlsl" + #endif + + /*ase_pragma*/ + + #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #define ASE_SV_DEPTH SV_DepthLessEqual + #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid + #else + #define ASE_SV_DEPTH SV_Depth + #define ASE_SV_POSITION_QUALIFIERS + #endif + + struct Attributes + { + float4 positionOS : POSITION; + half3 normalOS : NORMAL; + half4 tangentOS : TANGENT; + float4 texcoord : TEXCOORD0; + #if defined(LIGHTMAP_ON) || defined(ASE_NEEDS_TEXTURE_COORDINATES1) + float4 texcoord1 : TEXCOORD1; + #endif + #if defined(DYNAMICLIGHTMAP_ON) || defined(ASE_NEEDS_TEXTURE_COORDINATES2) + float4 texcoord2 : TEXCOORD2; + #endif + /*ase_vdata:p=p;n=n;t=t;uv0=tc0;uv1=tc1;uv2=tc2*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; + float3 positionWS : TEXCOORD0; + half3 normalWS : TEXCOORD1; + float4 tangentWS : TEXCOORD2; + float4 lightmapUVOrVertexSH : TEXCOORD3; + #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX) + half4 fogFactorAndVertexLight : TEXCOORD4; + #endif + #if defined(DYNAMICLIGHTMAP_ON) + float2 dynamicLightmapUV : TEXCOORD5; + #endif + #if defined(USE_APV_PROBE_OCCLUSION) + float4 probeOcclusion : TEXCOORD6; + #endif + float4 screenPos : TEXCOORD11; // NiloToon screen pos + /*ase_interp(7,):sp=sp;wp=tc0.xyz;wn.xyz=tc1.xyz;wt=tc2*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + // NiloToon Screen Space Outline + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + // NiloToon Global Uniforms + float _NiloToonGlobalEnviMinimumShader; + float4 _NiloToonGlobalEnviShadowBorderTintColor; + float3 _NiloToonGlobalEnviGITintColor; + float3 _NiloToonGlobalEnviGIAddColor; + float4 _NiloToonGlobalEnviGIOverride; + float4 _NiloToonGlobalEnviAlbedoOverrideColor; + float4 _NiloToonGlobalEnviSurfaceColorResultOverrideColor; + float _GlobalScreenSpaceOutlineIntensityForEnvi; + float _GlobalScreenSpaceOutlineWidthMultiplierForEnvi; + float _GlobalScreenSpaceOutlineNormalsSensitivityOffsetForEnvi; + float _GlobalScreenSpaceOutlineDepthSensitivityOffsetForEnvi; + float _GlobalScreenSpaceOutlineDepthSensitivityDistanceFadeoutStrengthForEnvi; + half3 _GlobalScreenSpaceOutlineTintColorForEnvi; + float _CurrentCameraFOV; + + #ifdef SCENEPICKINGPASS + float4 _SelectionID; + #endif + + #ifdef SCENESELECTIONPASS + int _ObjectId; + int _PassValue; + #endif + + /*ase_globals*/ + + /*ase_funcs*/ + + PackedVaryings VertexFunction( Attributes input /*ase_vert_input*/ ) + { + PackedVaryings output = (PackedVaryings)0; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + /*ase_vert_code:input=Attributes;output=PackedVaryings*/ + + VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); + VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS, input.tangentOS ); + + output.positionCS = vertexInput.positionCS; + output.positionWS = vertexInput.positionWS; + output.normalWS = normalInput.normalWS; + + real sign = input.tangentOS.w * GetOddNegativeScale(); + half4 tangentWS = half4(normalInput.tangentWS.xyz, sign); + output.tangentWS = tangentWS; + + OUTPUT_LIGHTMAP_UV( input.texcoord1, unity_LightmapST, output.lightmapUVOrVertexSH.xy ); + #if defined(DYNAMICLIGHTMAP_ON) + output.dynamicLightmapUV = input.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + OUTPUT_SH4(vertexInput.positionWS, output.normalWS.xyz, GetWorldSpaceNormalizeViewDir(vertexInput.positionWS), output.lightmapUVOrVertexSH.xyz, output.probeOcclusion); + + half3 vertexLight = VertexLighting( vertexInput.positionWS, normalInput.normalWS ); + half fogFactor = 0; + #if !defined(_FOG_FRAGMENT) + fogFactor = ComputeFogFactor( vertexInput.positionCS.z ); + #endif + + #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX) + output.fogFactorAndVertexLight = half4(fogFactor, vertexLight); + #endif + + // NiloToon screen pos + output.screenPos = ComputeScreenPos(output.positionCS); + + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + half3 normalOS : NORMAL; + half4 tangentOS : TANGENT; + float4 texcoord : TEXCOORD0; + float4 texcoord1 : TEXCOORD1; + float4 texcoord2 : TEXCOORD2; + /*ase_vcontrol*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + output.tangentOS = input.tangentOS; + output.texcoord = input.texcoord; + output.texcoord1 = input.texcoord1; + output.texcoord2 = input.texcoord2; + /*ase_control_code:input=Attributes;output=VertexControl*/ + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = /*ase_inline_begin*/_TessValue/*ase_inline_end*/; float tessMin = /*ase_inline_begin*/_TessMin/*ase_inline_end*/; float tessMax = /*ase_inline_begin*/_TessMax/*ase_inline_end*/; + float edgeLength = /*ase_inline_begin*/_TessEdgeLength/*ase_inline_end*/; float tessMaxDisp = /*ase_inline_begin*/_TessMaxDisp/*ase_inline_end*/; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z; + output.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; + output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; + output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; + /*ase_domain_code:patch=VertexControl;output=Attributes;bary=SV_DomainLocation*/ + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = /*ase_inline_begin*/_TessPhongStrength/*ase_inline_end*/; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag ( PackedVaryings input + #if defined( ASE_DEPTH_WRITE_ON ) + ,out float outputDepth : ASE_SV_DEPTH + #endif + #ifdef _WRITE_RENDERING_LAYERS + , out uint outRenderingLayers : SV_Target1 + #endif + /*ase_frag_input*/ ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if defined( _SURFACE_TYPE_TRANSPARENT ) + const bool isTransparent = true; + #else + const bool isTransparent = false; + #endif + + #if defined(LOD_FADE_CROSSFADE) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined(MAIN_LIGHT_CALCULATE_SHADOWS) + float4 shadowCoord = TransformWorldToShadowCoord( input.positionWS ); + #else + float4 shadowCoord = float4(0, 0, 0, 0); + #endif + + float renormFactor = 1.0 / max( FLT_MIN, length( input.normalWS ) ); + + /*ase_local_var:wp*/float3 PositionWS = input.positionWS; + /*ase_local_var:wvd*/float3 ViewDirWS = GetWorldSpaceNormalizeViewDir( PositionWS ); + /*ase_local_var:sc*/float4 ShadowCoord = shadowCoord; + /*ase_local_var:spn*/float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw ); + /*ase_local_var:sp*/float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w; + /*ase_local_var:spu*/float4 ScreenPos = ComputeScreenPos( ClipPos ); + /*ase_local_var:wt*/float3 TangentWS = input.tangentWS.xyz * renormFactor; + /*ase_local_var:wbt*/float3 BitangentWS = cross( input.normalWS, input.tangentWS.xyz ) * input.tangentWS.w * renormFactor; + /*ase_local_var:wn*/float3 NormalWS = input.normalWS * renormFactor; + + /*ase_frag_code:input=PackedVaryings*/ + + float3 BaseColor = /*ase_frag_out:Base Color;Float3;0;-1;_BaseColor*/float3(0.5, 0.5, 0.5)/*end*/; + float3 Normal = /*ase_frag_out:Normal;Float3;1;-1;_FragNormal*/float3(0, 0, 1)/*end*/; + float3 Specular = /*ase_frag_out:Specular;Float3;9;-1;_Specular*/0.5/*end*/; + float Metallic = /*ase_frag_out:Metallic;Float;3;-1;_Metallic*/0/*end*/; + float Smoothness = /*ase_frag_out:Smoothness;Float;4;-1;_Smoothness*/0.5/*end*/; + float Occlusion = /*ase_frag_out:Occlusion;Float;5;-1;_Occlusion*/1/*end*/; + float3 Emission = /*ase_frag_out:Emission;Float3;2;-1;_Emission*/0/*end*/; + float Alpha = /*ase_frag_out:Alpha;Float;6;-1;_Alpha*/1/*end*/; + float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;7;-1;_AlphaClip*/0.5/*end*/; + + #if defined( ASE_DEPTH_WRITE_ON ) + float DeviceDepth = /*ase_frag_out:Depth;Float;17;-1;_DepthValue*/ClipPos.z/*end*/; + #endif + + #if defined( _ALPHATEST_ON ) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + #if defined(MAIN_LIGHT_CALCULATE_SHADOWS) && defined(ASE_CHANGES_WORLD_POS) + ShadowCoord = TransformWorldToShadowCoord( PositionWS ); + #endif + + // NiloToon: albedo override + BaseColor = lerp(BaseColor, _NiloToonGlobalEnviAlbedoOverrideColor.rgb, _NiloToonGlobalEnviAlbedoOverrideColor.a); + + InputData inputData = (InputData)0; + inputData.positionWS = PositionWS; + inputData.positionCS = float4( input.positionCS.xy, ClipPos.zw / ClipPos.w ); + inputData.normalizedScreenSpaceUV = ScreenPosNorm.xy; + inputData.viewDirectionWS = ViewDirWS; + inputData.shadowCoord = ShadowCoord; + + #ifdef _NORMALMAP + #if _NORMAL_DROPOFF_TS + inputData.normalWS = TransformTangentToWorld(Normal, half3x3(TangentWS, BitangentWS, NormalWS)); + #elif _NORMAL_DROPOFF_OS + inputData.normalWS = TransformObjectToWorldNormal(Normal); + #elif _NORMAL_DROPOFF_WS + inputData.normalWS = Normal; + #endif + inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); + #else + inputData.normalWS = NormalWS; + #endif + + #ifdef ASE_FOG + inputData.fogCoord = InitializeInputDataFog(float4(inputData.positionWS, 1.0), input.fogFactorAndVertexLight.x); + #endif + #ifdef _ADDITIONAL_LIGHTS_VERTEX + inputData.vertexLighting = input.fogFactorAndVertexLight.yzw; + #endif + + float3 SH = input.lightmapUVOrVertexSH.xyz; + + #if defined(DYNAMICLIGHTMAP_ON) + inputData.bakedGI = SAMPLE_GI(input.lightmapUVOrVertexSH.xy, input.dynamicLightmapUV.xy, SH, inputData.normalWS); + inputData.shadowMask = SAMPLE_SHADOWMASK(input.lightmapUVOrVertexSH.xy); + #elif !defined(LIGHTMAP_ON) && (defined(PROBE_VOLUMES_L1) || defined(PROBE_VOLUMES_L2)) + inputData.bakedGI = SAMPLE_GI( SH, GetAbsolutePositionWS(inputData.positionWS), + inputData.normalWS, + inputData.viewDirectionWS, + input.positionCS.xy, + input.probeOcclusion, + inputData.shadowMask ); + #else + inputData.bakedGI = SAMPLE_GI(input.lightmapUVOrVertexSH.xy, SH, inputData.normalWS); + inputData.shadowMask = SAMPLE_SHADOWMASK(input.lightmapUVOrVertexSH.xy); + #endif + + // NiloToon: GI edit and override + inputData.bakedGI = inputData.bakedGI * _NiloToonGlobalEnviGITintColor + _NiloToonGlobalEnviGIAddColor; + inputData.bakedGI = lerp(inputData.bakedGI, _NiloToonGlobalEnviGIOverride.rgb, _NiloToonGlobalEnviGIOverride.a); + + SurfaceData surfaceData; + surfaceData.albedo = BaseColor; + surfaceData.metallic = saturate(Metallic); + surfaceData.specular = Specular; + surfaceData.smoothness = saturate(Smoothness), + surfaceData.occlusion = Occlusion, + surfaceData.emission = Emission, + surfaceData.alpha = saturate(Alpha); + surfaceData.normalTS = Normal; + surfaceData.clearCoatMask = 0; + surfaceData.clearCoatSmoothness = 1; + + #if defined(_DBUFFER) + ApplyDecalToSurfaceData(input.positionCS, surfaceData, inputData); + #endif + + half4 color = UniversalFragmentPBR( inputData, surfaceData); + + // NiloToon: Shadow border tint color + #if defined(SHADOWS_SHADOWMASK) && defined(LIGHTMAP_ON) + half4 nilotoonShadowMask = inputData.shadowMask; + #elif !defined (LIGHTMAP_ON) + half4 nilotoonShadowMask = unity_ProbesOcclusion; + #else + half4 nilotoonShadowMask = half4(1, 1, 1, 1); + #endif + + Light mainLight = GetMainLight(inputData.shadowCoord, inputData.positionWS, nilotoonShadowMask); + float isShadowEdge = 1-abs(mainLight.shadowAttenuation-0.5)*2; + color.rgb = lerp(color.rgb, color.rgb * _NiloToonGlobalEnviShadowBorderTintColor.rgb, isShadowEdge * _NiloToonGlobalEnviShadowBorderTintColor.a); + + // NiloToon: global surface color result override + color.rgb = lerp(color.rgb, _NiloToonGlobalEnviSurfaceColorResultOverrideColor.rgb, _NiloToonGlobalEnviSurfaceColorResultOverrideColor.a); + + // NiloToon: Screen space outline + #if _NILOTOON_GLOBAL_ENABLE_SCREENSPACE_OUTLINE + if(_Surface == 0) + { + float2 SV_POSITIONxy = input.positionCS.xy; + float finalOutlineWidth = _ScreenSpaceOutlineWidth * _GlobalScreenSpaceOutlineWidthMultiplierForEnvi; + float finalNormalsSensitivity = max(0,1 + _GlobalScreenSpaceOutlineNormalsSensitivityOffsetForEnvi); + float finalDepthSensitivity = max(0,1 + _GlobalScreenSpaceOutlineDepthSensitivityOffsetForEnvi); + float selfLinearDepth = abs(mul(UNITY_MATRIX_V, float4(input.positionWS,1)).z); + + finalDepthSensitivity *= 0.35; + + float isScreenSpaceOutlineArea = IsScreenSpaceOutline( + SV_POSITIONxy, + finalOutlineWidth, + finalDepthSensitivity, + finalNormalsSensitivity, + selfLinearDepth, + _GlobalScreenSpaceOutlineDepthSensitivityDistanceFadeoutStrengthForEnvi, + _CurrentCameraFOV, + inputData.viewDirectionWS); + + isScreenSpaceOutlineArea *= _GlobalScreenSpaceOutlineIntensityForEnvi * _ScreenSpaceOutlineIntensity; + color.rgb = lerp(color.rgb, color.rgb * _GlobalScreenSpaceOutlineTintColorForEnvi * _ScreenSpaceOutlineColor.rgb, isScreenSpaceOutlineArea); + } + #endif + + color.rgb = MixFog(color.rgb, inputData.fogCoord); + color.a = OutputAlpha(color.a, IsSurfaceTypeTransparent(_Surface)); + + #if defined( ASE_DEPTH_WRITE_ON ) + outputDepth = DeviceDepth; + #endif + + #ifdef _WRITE_RENDERING_LAYERS + outRenderingLayers = GetMeshRenderingLayer(); + #endif + + return color; + } + + ENDHLSL + } + + /*ase_pass*/ + Pass + { + Name "ShadowCaster" + Tags + { + "LightMode" = "ShadowCaster" + } + + ZWrite On + ZTest LEqual + AlphaToMask Off + ColorMask 0 + + HLSLPROGRAM + + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_SHADOWCASTER + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + /*ase_pragma*/ + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + /*ase_vdata:p=p;n=n*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + float4 clipPosV : TEXCOORD0; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 positionWS : TEXCOORD1; + #endif + /*ase_interp(2,):*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + /*ase_globals*/ + + /*ase_funcs*/ + + float3 _LightDirection; + float3 _LightPosition; + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( output ); + + /*ase_vert_code:input=Attributes;output=PackedVaryings*/ + + float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); + float3 normalWS = TransformObjectToWorldNormal( input.normalOS ); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDirectionWS = normalize(_LightPosition - positionWS); + #else + float3 lightDirectionWS = _LightDirection; + #endif + + float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, lightDirectionWS)); + + #if UNITY_REVERSED_Z + positionCS.z = min(positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + positionCS.z = max(positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + output.positionWS = positionWS; + #endif + + output.positionCS = positionCS; + output.clipPosV = positionCS; + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + float3 normalOS : NORMAL; + /*ase_vcontrol*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + /*ase_control_code:input=Attributes;output=VertexControl*/ + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = /*ase_inline_begin*/_TessValue/*ase_inline_end*/; float tessMin = /*ase_inline_begin*/_TessMin/*ase_inline_end*/; float tessMax = /*ase_inline_begin*/_TessMax/*ase_inline_end*/; + float edgeLength = /*ase_inline_begin*/_TessEdgeLength/*ase_inline_end*/; float tessMaxDisp = /*ase_inline_begin*/_TessMaxDisp/*ase_inline_end*/; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + /*ase_domain_code:patch=VertexControl;output=Attributes;bary=SV_DomainLocation*/ + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = /*ase_inline_begin*/_TessPhongStrength/*ase_inline_end*/; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag(PackedVaryings input /*ase_frag_input*/ ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID( input ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input ); + + #if defined(LOD_FADE_CROSSFADE) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 PositionWS = input.positionWS; + #endif + + float4 ShadowCoord = float4( 0, 0, 0, 0 ); + float4 ClipPos = input.clipPosV; + float4 ScreenPos = ComputeScreenPos( input.clipPosV ); + + /*ase_frag_code:input=PackedVaryings*/ + + float Alpha = /*ase_frag_out:Alpha;Float;0;-1;_Alpha*/1/*end*/; + float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;1;-1;_AlphaClip*/0.5/*end*/; + + #if defined(_ALPHATEST_ON) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + return 0; + } + ENDHLSL + } + + /*ase_pass*/ + Pass + { + Name "DepthOnly" + Tags + { + "LightMode" = "DepthOnly" + } + + ZWrite On + ColorMask R + AlphaToMask Off + + HLSLPROGRAM + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_DEPTHONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + /*ase_pragma*/ + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + /*ase_vdata:p=p;n=n*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + float4 clipPosV : TEXCOORD0; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 positionWS : TEXCOORD1; + #endif + /*ase_interp(2,):*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + /*ase_globals*/ + + /*ase_funcs*/ + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + /*ase_vert_code:input=Attributes;output=PackedVaryings*/ + + float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + output.positionWS = positionWS; + #endif + + output.positionCS = positionCS; + output.clipPosV = positionCS; + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + float3 normalOS : NORMAL; + /*ase_vcontrol*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + /*ase_control_code:input=Attributes;output=VertexControl*/ + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = /*ase_inline_begin*/_TessValue/*ase_inline_end*/; float tessMin = /*ase_inline_begin*/_TessMin/*ase_inline_end*/; float tessMax = /*ase_inline_begin*/_TessMax/*ase_inline_end*/; + float edgeLength = /*ase_inline_begin*/_TessEdgeLength/*ase_inline_end*/; float tessMaxDisp = /*ase_inline_begin*/_TessMaxDisp/*ase_inline_end*/; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + /*ase_domain_code:patch=VertexControl;output=Attributes;bary=SV_DomainLocation*/ + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = /*ase_inline_begin*/_TessPhongStrength/*ase_inline_end*/; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag(PackedVaryings input /*ase_frag_input*/ ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if defined(LOD_FADE_CROSSFADE) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 PositionWS = input.positionWS; + #endif + + float4 ShadowCoord = float4( 0, 0, 0, 0 ); + float4 ClipPos = input.clipPosV; + float4 ScreenPos = ComputeScreenPos( input.clipPosV ); + + /*ase_frag_code:input=PackedVaryings*/ + + float Alpha = /*ase_frag_out:Alpha;Float;0;-1;_Alpha*/1/*end*/; + float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;1;-1;_AlphaClip*/0.5/*end*/; + + #if defined(_ALPHATEST_ON) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + return 0; + } + ENDHLSL + } + + /*ase_pass*/ + Pass + { + Name "DepthNormals" + Tags + { + "LightMode" = "DepthNormalsOnly" + } + + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_DEPTHNORMALS + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + /*ase_pragma*/ + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + /*ase_vdata:p=p;n=n;t=t*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + float4 clipPosV : TEXCOORD0; + float3 normalWS : TEXCOORD1; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 positionWS : TEXCOORD2; + #endif + /*ase_interp(3,):*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + /*ase_globals*/ + + /*ase_funcs*/ + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + /*ase_vert_code:input=Attributes;output=PackedVaryings*/ + + float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); + float3 normalWS = TransformObjectToWorldNormal( input.normalOS ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + output.positionWS = positionWS; + #endif + + output.positionCS = positionCS; + output.clipPosV = positionCS; + output.normalWS = normalWS; + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + /*ase_vcontrol*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + output.tangentOS = input.tangentOS; + /*ase_control_code:input=Attributes;output=VertexControl*/ + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = /*ase_inline_begin*/_TessValue/*ase_inline_end*/; float tessMin = /*ase_inline_begin*/_TessMin/*ase_inline_end*/; float tessMax = /*ase_inline_begin*/_TessMax/*ase_inline_end*/; + float edgeLength = /*ase_inline_begin*/_TessEdgeLength/*ase_inline_end*/; float tessMaxDisp = /*ase_inline_begin*/_TessMaxDisp/*ase_inline_end*/; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z; + /*ase_domain_code:patch=VertexControl;output=Attributes;bary=SV_DomainLocation*/ + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = /*ase_inline_begin*/_TessPhongStrength/*ase_inline_end*/; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag(PackedVaryings input /*ase_frag_input*/ ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if defined(LOD_FADE_CROSSFADE) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 PositionWS = input.positionWS; + #endif + + float4 ShadowCoord = float4( 0, 0, 0, 0 ); + float4 ClipPos = input.clipPosV; + float4 ScreenPos = ComputeScreenPos( input.clipPosV ); + + /*ase_frag_code:input=PackedVaryings*/ + + float Alpha = /*ase_frag_out:Alpha;Float;0;-1;_Alpha*/1/*end*/; + float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;1;-1;_AlphaClip*/0.5/*end*/; + + #if defined(_ALPHATEST_ON) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + float3 normalWS = input.normalWS; + return half4(NormalizeNormalPerPixel(normalWS), 0.0); + } + ENDHLSL + } + + /*ase_pass*/ + Pass + { + Name "Meta" + Tags + { + "LightMode" = "Meta" + } + + Cull Off + + HLSLPROGRAM + + #pragma vertex vert + #pragma fragment frag + + #pragma shader_feature EDITOR_VISUALIZATION + + #define SHADERPASS SHADERPASS_META + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl" + + /*ase_pragma*/ + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float4 texcoord : TEXCOORD0; + float4 texcoord1 : TEXCOORD1; + float4 texcoord2 : TEXCOORD2; + /*ase_vdata:p=p;n=n;uv0=tc0;uv1=tc1;uv2=tc2*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 positionWS : TEXCOORD0; + #endif + /*ase_interp(1,):*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + /*ase_globals*/ + + /*ase_funcs*/ + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + /*ase_vert_code:input=Attributes;output=PackedVaryings*/ + + float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + output.positionWS = positionWS; + #endif + + output.positionCS = UnityMetaVertexPosition( input.positionOS.xyz, input.texcoord1.xy, input.texcoord2.xy ); + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + float3 normalOS : NORMAL; + float4 texcoord : TEXCOORD0; + float4 texcoord1 : TEXCOORD1; + float4 texcoord2 : TEXCOORD2; + /*ase_vcontrol*/ + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + output.texcoord = input.texcoord; + output.texcoord1 = input.texcoord1; + output.texcoord2 = input.texcoord2; + /*ase_control_code:input=Attributes;output=VertexControl*/ + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = /*ase_inline_begin*/_TessValue/*ase_inline_end*/; float tessMin = /*ase_inline_begin*/_TessMin/*ase_inline_end*/; float tessMax = /*ase_inline_begin*/_TessMax/*ase_inline_end*/; + float edgeLength = /*ase_inline_begin*/_TessEdgeLength/*ase_inline_end*/; float tessMaxDisp = /*ase_inline_begin*/_TessMaxDisp/*ase_inline_end*/; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; + output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; + output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; + /*ase_domain_code:patch=VertexControl;output=Attributes;bary=SV_DomainLocation*/ + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = /*ase_inline_begin*/_TessPhongStrength/*ase_inline_end*/; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag(PackedVaryings input /*ase_frag_input*/ ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 PositionWS = input.positionWS; + #endif + + float4 ShadowCoord = float4( 0, 0, 0, 0 ); + + /*ase_frag_code:input=PackedVaryings*/ + + float3 BaseColor = /*ase_frag_out:Base Color;Float3;0;-1;_BaseColor*/float3(0.5, 0.5, 0.5)/*end*/; + float3 Emission = /*ase_frag_out:Emission;Float3;1;-1;_Emission*/0/*end*/; + float Alpha = /*ase_frag_out:Alpha;Float;2;-1;_Alpha*/1/*end*/; + float AlphaClipThreshold = /*ase_frag_out:Alpha Clip Threshold;Float;3;-1;_AlphaClip*/0.5/*end*/; + + #if defined(_ALPHATEST_ON) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + MetaInput metaInput = (MetaInput)0; + metaInput.Albedo = BaseColor; + metaInput.Emission = Emission; + return UnityMetaFragment(metaInput); + } + ENDHLSL + } + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" +} diff --git a/Assets/External/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/NiloToonEnvironment.shader.meta b/Assets/External/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/NiloToonEnvironment.shader.meta new file mode 100644 index 00000000..be3cc41e --- /dev/null +++ b/Assets/External/AmplifyShaderEditor/Plugins/EditorResources/Templates/URP/NiloToonEnvironment.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2534d4d29a40afc46a3cc49af189fcb4 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ResourcesData/Background/White Horizon/Material/Grid.mat b/Assets/ResourcesData/Background/White Horizon/Material/Grid.mat index 3ee9024e..61b83527 100644 --- a/Assets/ResourcesData/Background/White Horizon/Material/Grid.mat +++ b/Assets/ResourcesData/Background/White Horizon/Material/Grid.mat @@ -8,7 +8,7 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: Grid - m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} + m_Shader: {fileID: 4800000, guid: 6dd2533ed522d7547ad0fc9dd62febd0, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] @@ -17,10 +17,8 @@ Material: m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 - stringTagMap: - RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS + stringTagMap: {} + disabledShaderPasses: [] m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -50,8 +48,8 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MainTex: - m_Texture: {fileID: 2800000, guid: fd9a6a94cb29b5d45ac48fae83f0d611, type: 3} - m_Scale: {x: 200, y: 200} + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _MetallicGlossMap: m_Texture: {fileID: 0} @@ -69,6 +67,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _texcoord: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - unity_Lightmaps: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -85,6 +87,7 @@ Material: m_Floats: - _AddPrecomputedVelocity: 0 - _AlphaClip: 0 + - _AlphaCutoff: 0.5 - _AlphaToMask: 0 - _Blend: 0 - _BlendModePreserveSpecular: 1 @@ -105,21 +108,27 @@ Material: - _Metallic: 0 - _OcclusionStrength: 1 - _Parallax: 0.005 + - _QueueControl: 0 - _QueueOffset: 0 + - _Radius: 0.098 - _ReceiveShadows: 1 - _SampleGI: 0 - - _Smoothness: 0 + - _ScreenSpaceOutlineIntensity: 1 + - _ScreenSpaceOutlineWidth: 1 + - _Smoothness: 0.024 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - _SrcBlendAlpha: 1 - _Surface: 0 - _WorkflowMode: 1 + - _XRMotionVectorsPass: 1 - _ZWrite: 1 m_Colors: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _ScreenSpaceOutlineColor: {r: 1, g: 1, b: 1, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 diff --git a/Assets/ResourcesData/Background/White Horizon/Material/White.mat b/Assets/ResourcesData/Background/White Horizon/Material/White.mat index 12446338..0920beeb 100644 --- a/Assets/ResourcesData/Background/White Horizon/Material/White.mat +++ b/Assets/ResourcesData/Background/White Horizon/Material/White.mat @@ -21,19 +21,19 @@ Material: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_Name: White - m_Shader: {fileID: 4800000, guid: 650dd9526735d5b46b79224bc6e94025, type: 3} + m_Shader: {fileID: 4800000, guid: 50e19b7c9fbe3324e978246ad9789e96, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] + m_ValidKeywords: + - _EMISSION m_InvalidKeywords: [] - m_LightmapFlags: 4 + m_LightmapFlags: 2 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 1 m_CustomRenderQueue: -1 stringTagMap: RenderType: Opaque - disabledShaderPasses: - - MOTIONVECTORS + disabledShaderPasses: [] m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -46,6 +46,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _ClearCoatMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - _DetailAlbedoMap: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -82,6 +86,58 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _SplatAlbedoMapA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatAlbedoMapB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatAlbedoMapG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatAlbedoMapR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatMaskMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatNormalMapA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatNormalMapB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatNormalMapG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatNormalMapR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatPackedDataMapA: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatPackedDataMapB: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatPackedDataMapG: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SplatPackedDataMapR: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} - unity_Lightmaps: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} @@ -103,6 +159,7 @@ Material: - _BlendModePreserveSpecular: 1 - _BlendOp: 0 - _BumpScale: 1 + - _ClearCoat: 0 - _ClearCoatMask: 0 - _ClearCoatSmoothness: 0 - _Cull: 0 @@ -121,18 +178,44 @@ Material: - _QueueOffset: 0 - _ReceiveShadows: 1 - _SampleGI: 0 + - _ScreenSpaceOutlineIntensity: 1 + - _ScreenSpaceOutlineWidth: 1 - _Smoothness: 0.5 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 + - _SplatAlbedoMapATiling: 1 + - _SplatAlbedoMapBTiling: 1 + - _SplatAlbedoMapGTiling: 1 + - _SplatAlbedoMapRTiling: 1 + - _SplatHeightMultiplierA: 1 + - _SplatHeightMultiplierB: 1 + - _SplatHeightMultiplierG: 1 + - _SplatHeightMultiplierR: 1 + - _SplatMapFeatureOnOff: 0 + - _SplatMaskBlendingSoftness: 0.5 + - _SplatNormalMapIntensityA: 1 + - _SplatNormalMapIntensityB: 1 + - _SplatNormalMapIntensityG: 1 + - _SplatNormalMapIntensityR: 1 + - _SplatSmoothnessMultiplierA: 1 + - _SplatSmoothnessMultiplierB: 1 + - _SplatSmoothnessMultiplierG: 1 + - _SplatSmoothnessMultiplierR: 1 - _SrcBlend: 1 - _SrcBlendAlpha: 1 - _Surface: 0 - _WorkflowMode: 1 + - _XRMotionVectorsPass: 1 - _ZWrite: 1 m_Colors: - _BaseColor: {r: 1, g: 1, b: 1, a: 1} - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} + - _ScreenSpaceOutlineColor: {r: 1, g: 1, b: 1, a: 1} - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + - _SplatAlbedoMapATintColor: {r: 1, g: 1, b: 1, a: 1} + - _SplatAlbedoMapBTintColor: {r: 1, g: 1, b: 1, a: 1} + - _SplatAlbedoMapGTintColor: {r: 1, g: 1, b: 1, a: 1} + - _SplatAlbedoMapRTintColor: {r: 1, g: 1, b: 1, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 diff --git a/Assets/ResourcesData/Background/White Horizon/Shader.meta b/Assets/ResourcesData/Background/White Horizon/Shader.meta new file mode 100644 index 00000000..05401d4c --- /dev/null +++ b/Assets/ResourcesData/Background/White Horizon/Shader.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ad6fb930df12fa54dbc546c69be98d8c +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ResourcesData/Background/White Horizon/Shader/White Horizon.shader b/Assets/ResourcesData/Background/White Horizon/Shader/White Horizon.shader new file mode 100644 index 00000000..b3a0f8fb --- /dev/null +++ b/Assets/ResourcesData/Background/White Horizon/Shader/White Horizon.shader @@ -0,0 +1,1442 @@ +// Made with Amplify Shader Editor v1.9.9.4 +// Available at the Unity Asset Store - http://u3d.as/y3X +Shader "Mingle/Floor/White Horizon" +{ + Properties + { + [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 + [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) + _BaseMap( "BaseMap", 2D ) = "white" {} + _Radius( "Radius", Range( 0, 1 ) ) = 1 + _Smoothness( "Smoothness", Range( 0.01, 1 ) ) = 0.5 + [HideInInspector] _texcoord( "", 2D ) = "white" {} + + + [ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0 + [ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0 + [ToggleUI] _ReceiveShadows("Receive Shadows", Float) = 1.0 + + [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0 + [HideInInspector] _QueueControl("_QueueControl", Float) = -1 + + [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {} + [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {} + + // NiloToon Screen Space Outline + _ScreenSpaceOutlineIntensity("Screen Space Outline Intensity", Range(0,1)) = 1 + [HDR]_ScreenSpaceOutlineColor("Screen Space Outline Color", Color) = (1,1,1,1) + _ScreenSpaceOutlineWidth("Screen Space Outline Width", Float) = 1 + } + + SubShader + { + + + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Opaque" "UniversalMaterialType"="Lit" "Queue"="Geometry" "IgnoreProjector"="True" } + + Cull Back + ZWrite On + ZTest LEqual + Offset 0 , 0 + AlphaToMask Off + + LOD 300 + + HLSLINCLUDE + #pragma target 3.0 + #pragma prefer_hlslcc gles + // GPU Instancing not available in WebGL + // #pragma exclude_renderers gles // + ENDHLSL + + + Pass + { + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } + + Blend One Zero, One Zero + ZWrite On + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + #define _NORMAL_DROPOFF_TS 1 + #pragma shader_feature_local_fragment _RECEIVE_SHADOWS_OFF + #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF + #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #pragma multi_compile_instancing + #pragma multi_compile _ LOD_FADE_CROSSFADE + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION 170200 + + + #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN + #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS + #pragma multi_compile _ EVALUATE_SH_MIXED EVALUATE_SH_VERTEX + #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING + #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION + #pragma multi_compile_fragment _ _REFLECTION_PROBE_ATLAS + #pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + #pragma multi_compile _ _LIGHT_LAYERS + #pragma multi_compile_fragment _ _LIGHT_COOKIES + #pragma multi_compile _ _CLUSTER_LIGHT_LOOP + + #pragma multi_compile _ LIGHTMAP_SHADOW_MIXING + #pragma multi_compile _ SHADOWS_SHADOWMASK + #pragma multi_compile _ DIRLIGHTMAP_COMBINED + #pragma multi_compile _ LIGHTMAP_ON + #pragma multi_compile _ LIGHTMAP_BICUBIC_SAMPLING + #pragma multi_compile _ DYNAMICLIGHTMAP_ON + #pragma multi_compile _ USE_LEGACY_LIGHTMAPS + + #pragma vertex vert + #pragma fragment frag + + #if defined(_SPECULAR_SETUP) && defined(_SPECULAR_COLOR) + #define _SPECULAR_COLOR 1 + #endif + + #define SHADERPASS SHADERPASS_FORWARD + + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Fog.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ProbeVolumeVariants.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl" + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + // NiloToon Screen Space Outline Support + // Note: Include NiloToon's utility files for screen space outline functionality + #if defined(_NILOTOON_GLOBAL_ENABLE_SCREENSPACE_OUTLINE) + #include "../../../../../../NiloToonURP/ShaderLibrary/NiloUtilityHLSL/NiloAllUtilIncludes.hlsl" + #endif + + #define ASE_NEEDS_TEXTURE_COORDINATES0 + #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 + + + #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #define ASE_SV_DEPTH SV_DepthLessEqual + #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid + #else + #define ASE_SV_DEPTH SV_Depth + #define ASE_SV_POSITION_QUALIFIERS + #endif + + struct Attributes + { + float4 positionOS : POSITION; + half3 normalOS : NORMAL; + half4 tangentOS : TANGENT; + float4 texcoord : TEXCOORD0; + #if defined(LIGHTMAP_ON) || defined(ASE_NEEDS_TEXTURE_COORDINATES1) + float4 texcoord1 : TEXCOORD1; + #endif + #if defined(DYNAMICLIGHTMAP_ON) || defined(ASE_NEEDS_TEXTURE_COORDINATES2) + float4 texcoord2 : TEXCOORD2; + #endif + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; + float3 positionWS : TEXCOORD0; + half3 normalWS : TEXCOORD1; + float4 tangentWS : TEXCOORD2; + float4 lightmapUVOrVertexSH : TEXCOORD3; + #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX) + half4 fogFactorAndVertexLight : TEXCOORD4; + #endif + #if defined(DYNAMICLIGHTMAP_ON) + float2 dynamicLightmapUV : TEXCOORD5; + #endif + #if defined(USE_APV_PROBE_OCCLUSION) + float4 probeOcclusion : TEXCOORD6; + #endif + float4 screenPos : TEXCOORD11; // NiloToon screen pos + float4 ase_texcoord7 : TEXCOORD7; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _BaseMap_ST; + float _Smoothness; + float _Radius; + // NiloToon Screen Space Outline + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + // NiloToon Global Uniforms + float _NiloToonGlobalEnviMinimumShader; + float4 _NiloToonGlobalEnviShadowBorderTintColor; + float3 _NiloToonGlobalEnviGITintColor; + float3 _NiloToonGlobalEnviGIAddColor; + float4 _NiloToonGlobalEnviGIOverride; + float4 _NiloToonGlobalEnviAlbedoOverrideColor; + float4 _NiloToonGlobalEnviSurfaceColorResultOverrideColor; + float _GlobalScreenSpaceOutlineIntensityForEnvi; + float _GlobalScreenSpaceOutlineWidthMultiplierForEnvi; + float _GlobalScreenSpaceOutlineNormalsSensitivityOffsetForEnvi; + float _GlobalScreenSpaceOutlineDepthSensitivityOffsetForEnvi; + float _GlobalScreenSpaceOutlineDepthSensitivityDistanceFadeoutStrengthForEnvi; + half3 _GlobalScreenSpaceOutlineTintColorForEnvi; + float _CurrentCameraFOV; + + #ifdef SCENEPICKINGPASS + float4 _SelectionID; + #endif + + #ifdef SCENESELECTIONPASS + int _ObjectId; + int _PassValue; + #endif + + sampler2D _BaseMap; + + + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output = (PackedVaryings)0; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + output.ase_texcoord7.xy = input.texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + output.ase_texcoord7.zw = 0; + + VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); + VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS, input.tangentOS ); + + output.positionCS = vertexInput.positionCS; + output.positionWS = vertexInput.positionWS; + output.normalWS = normalInput.normalWS; + + real sign = input.tangentOS.w * GetOddNegativeScale(); + half4 tangentWS = half4(normalInput.tangentWS.xyz, sign); + output.tangentWS = tangentWS; + + OUTPUT_LIGHTMAP_UV( input.texcoord1, unity_LightmapST, output.lightmapUVOrVertexSH.xy ); + #if defined(DYNAMICLIGHTMAP_ON) + output.dynamicLightmapUV = input.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; + #endif + + OUTPUT_SH4(vertexInput.positionWS, output.normalWS.xyz, GetWorldSpaceNormalizeViewDir(vertexInput.positionWS), output.lightmapUVOrVertexSH.xyz, output.probeOcclusion); + + half3 vertexLight = VertexLighting( vertexInput.positionWS, normalInput.normalWS ); + half fogFactor = 0; + #if !defined(_FOG_FRAGMENT) + fogFactor = ComputeFogFactor( vertexInput.positionCS.z ); + #endif + + #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX) + output.fogFactorAndVertexLight = half4(fogFactor, vertexLight); + #endif + + // NiloToon screen pos + output.screenPos = ComputeScreenPos(output.positionCS); + + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + half3 normalOS : NORMAL; + half4 tangentOS : TANGENT; + float4 texcoord : TEXCOORD0; + float4 texcoord1 : TEXCOORD1; + float4 texcoord2 : TEXCOORD2; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + output.tangentOS = input.tangentOS; + output.texcoord = input.texcoord; + output.texcoord1 = input.texcoord1; + output.texcoord2 = input.texcoord2; + + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z; + output.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; + output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; + output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; + + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = _TessPhongStrength; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag ( PackedVaryings input + #if defined( ASE_DEPTH_WRITE_ON ) + ,out float outputDepth : ASE_SV_DEPTH + #endif + #ifdef _WRITE_RENDERING_LAYERS + , out uint outRenderingLayers : SV_Target1 + #endif + ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if defined( _SURFACE_TYPE_TRANSPARENT ) + const bool isTransparent = true; + #else + const bool isTransparent = false; + #endif + + #if defined(LOD_FADE_CROSSFADE) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined(MAIN_LIGHT_CALCULATE_SHADOWS) + float4 shadowCoord = TransformWorldToShadowCoord( input.positionWS ); + #else + float4 shadowCoord = float4(0, 0, 0, 0); + #endif + + float renormFactor = 1.0 / max( FLT_MIN, length( input.normalWS ) ); + + float3 PositionWS = input.positionWS; + float3 ViewDirWS = GetWorldSpaceNormalizeViewDir( PositionWS ); + float4 ShadowCoord = shadowCoord; + float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw ); + float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w; + float4 ScreenPos = ComputeScreenPos( ClipPos ); + float3 TangentWS = input.tangentWS.xyz * renormFactor; + float3 BitangentWS = cross( input.normalWS, input.tangentWS.xyz ) * input.tangentWS.w * renormFactor; + float3 NormalWS = input.normalWS * renormFactor; + + float2 temp_cast_0 = (2.0).xx; + float2 temp_cast_1 = (-1.0).xx; + float2 texCoord12 = input.ase_texcoord7.xy * temp_cast_0 + temp_cast_1; + float smoothstepResult13 = smoothstep( _Radius , ( _Radius - _Smoothness ) , length( texCoord12 )); + float2 uv_BaseMap = input.ase_texcoord7.xy * _BaseMap_ST.xy + _BaseMap_ST.zw; + float layeredBlendVar18 = smoothstepResult13; + float4 layeredBlend18 = ( lerp( float4( 1,1,1,1 ),tex2D( _BaseMap, uv_BaseMap ) , layeredBlendVar18 ) ); + + + float3 BaseColor = float3(0.5, 0.5, 0.5); + float3 Normal = float3(0, 0, 1); + float3 Specular = 0.5; + float Metallic = 0; + float Smoothness = 0.5; + float Occlusion = 1; + float3 Emission = layeredBlend18.rgb; + float Alpha = 1; + float AlphaClipThreshold = 0.5; + + #if defined( ASE_DEPTH_WRITE_ON ) + float DeviceDepth = ClipPos.z; + #endif + + #if defined( _ALPHATEST_ON ) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + #if defined(MAIN_LIGHT_CALCULATE_SHADOWS) && defined(ASE_CHANGES_WORLD_POS) + ShadowCoord = TransformWorldToShadowCoord( PositionWS ); + #endif + + // NiloToon: albedo override + BaseColor = lerp(BaseColor, _NiloToonGlobalEnviAlbedoOverrideColor.rgb, _NiloToonGlobalEnviAlbedoOverrideColor.a); + + InputData inputData = (InputData)0; + inputData.positionWS = PositionWS; + inputData.positionCS = float4( input.positionCS.xy, ClipPos.zw / ClipPos.w ); + inputData.normalizedScreenSpaceUV = ScreenPosNorm.xy; + inputData.viewDirectionWS = ViewDirWS; + inputData.shadowCoord = ShadowCoord; + + #ifdef _NORMALMAP + #if _NORMAL_DROPOFF_TS + inputData.normalWS = TransformTangentToWorld(Normal, half3x3(TangentWS, BitangentWS, NormalWS)); + #elif _NORMAL_DROPOFF_OS + inputData.normalWS = TransformObjectToWorldNormal(Normal); + #elif _NORMAL_DROPOFF_WS + inputData.normalWS = Normal; + #endif + inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS); + #else + inputData.normalWS = NormalWS; + #endif + + #ifdef ASE_FOG + inputData.fogCoord = InitializeInputDataFog(float4(inputData.positionWS, 1.0), input.fogFactorAndVertexLight.x); + #endif + #ifdef _ADDITIONAL_LIGHTS_VERTEX + inputData.vertexLighting = input.fogFactorAndVertexLight.yzw; + #endif + + float3 SH = input.lightmapUVOrVertexSH.xyz; + + #if defined(DYNAMICLIGHTMAP_ON) + inputData.bakedGI = SAMPLE_GI(input.lightmapUVOrVertexSH.xy, input.dynamicLightmapUV.xy, SH, inputData.normalWS); + inputData.shadowMask = SAMPLE_SHADOWMASK(input.lightmapUVOrVertexSH.xy); + #elif !defined(LIGHTMAP_ON) && (defined(PROBE_VOLUMES_L1) || defined(PROBE_VOLUMES_L2)) + inputData.bakedGI = SAMPLE_GI( SH, GetAbsolutePositionWS(inputData.positionWS), + inputData.normalWS, + inputData.viewDirectionWS, + input.positionCS.xy, + input.probeOcclusion, + inputData.shadowMask ); + #else + inputData.bakedGI = SAMPLE_GI(input.lightmapUVOrVertexSH.xy, SH, inputData.normalWS); + inputData.shadowMask = SAMPLE_SHADOWMASK(input.lightmapUVOrVertexSH.xy); + #endif + + // NiloToon: GI edit and override + inputData.bakedGI = inputData.bakedGI * _NiloToonGlobalEnviGITintColor + _NiloToonGlobalEnviGIAddColor; + inputData.bakedGI = lerp(inputData.bakedGI, _NiloToonGlobalEnviGIOverride.rgb, _NiloToonGlobalEnviGIOverride.a); + + SurfaceData surfaceData; + surfaceData.albedo = BaseColor; + surfaceData.metallic = saturate(Metallic); + surfaceData.specular = Specular; + surfaceData.smoothness = saturate(Smoothness), + surfaceData.occlusion = Occlusion, + surfaceData.emission = Emission, + surfaceData.alpha = saturate(Alpha); + surfaceData.normalTS = Normal; + surfaceData.clearCoatMask = 0; + surfaceData.clearCoatSmoothness = 1; + + #if defined(_DBUFFER) + ApplyDecalToSurfaceData(input.positionCS, surfaceData, inputData); + #endif + + half4 color = UniversalFragmentPBR( inputData, surfaceData); + + // NiloToon: Shadow border tint color + #if defined(SHADOWS_SHADOWMASK) && defined(LIGHTMAP_ON) + half4 nilotoonShadowMask = inputData.shadowMask; + #elif !defined (LIGHTMAP_ON) + half4 nilotoonShadowMask = unity_ProbesOcclusion; + #else + half4 nilotoonShadowMask = half4(1, 1, 1, 1); + #endif + + Light mainLight = GetMainLight(inputData.shadowCoord, inputData.positionWS, nilotoonShadowMask); + float isShadowEdge = 1-abs(mainLight.shadowAttenuation-0.5)*2; + color.rgb = lerp(color.rgb, color.rgb * _NiloToonGlobalEnviShadowBorderTintColor.rgb, isShadowEdge * _NiloToonGlobalEnviShadowBorderTintColor.a); + + // NiloToon: global surface color result override + color.rgb = lerp(color.rgb, _NiloToonGlobalEnviSurfaceColorResultOverrideColor.rgb, _NiloToonGlobalEnviSurfaceColorResultOverrideColor.a); + + // NiloToon: Screen space outline + #if _NILOTOON_GLOBAL_ENABLE_SCREENSPACE_OUTLINE + if(_Surface == 0) + { + float2 SV_POSITIONxy = input.positionCS.xy; + float finalOutlineWidth = _ScreenSpaceOutlineWidth * _GlobalScreenSpaceOutlineWidthMultiplierForEnvi; + float finalNormalsSensitivity = max(0,1 + _GlobalScreenSpaceOutlineNormalsSensitivityOffsetForEnvi); + float finalDepthSensitivity = max(0,1 + _GlobalScreenSpaceOutlineDepthSensitivityOffsetForEnvi); + float selfLinearDepth = abs(mul(UNITY_MATRIX_V, float4(input.positionWS,1)).z); + + finalDepthSensitivity *= 0.35; + + float isScreenSpaceOutlineArea = IsScreenSpaceOutline( + SV_POSITIONxy, + finalOutlineWidth, + finalDepthSensitivity, + finalNormalsSensitivity, + selfLinearDepth, + _GlobalScreenSpaceOutlineDepthSensitivityDistanceFadeoutStrengthForEnvi, + _CurrentCameraFOV, + inputData.viewDirectionWS); + + isScreenSpaceOutlineArea *= _GlobalScreenSpaceOutlineIntensityForEnvi * _ScreenSpaceOutlineIntensity; + color.rgb = lerp(color.rgb, color.rgb * _GlobalScreenSpaceOutlineTintColorForEnvi * _ScreenSpaceOutlineColor.rgb, isScreenSpaceOutlineArea); + } + #endif + + color.rgb = MixFog(color.rgb, inputData.fogCoord); + color.a = OutputAlpha(color.a, IsSurfaceTypeTransparent(_Surface)); + + #if defined( ASE_DEPTH_WRITE_ON ) + outputDepth = DeviceDepth; + #endif + + #ifdef _WRITE_RENDERING_LAYERS + outRenderingLayers = GetMeshRenderingLayer(); + #endif + + return color; + } + + ENDHLSL + } + + + Pass + { + Name "ShadowCaster" + Tags { "LightMode"="ShadowCaster" } + + ZWrite On + ZTest LEqual + AlphaToMask Off + ColorMask 0 + + HLSLPROGRAM + + #define _NORMAL_DROPOFF_TS 1 + #pragma multi_compile_instancing + #pragma multi_compile _ LOD_FADE_CROSSFADE + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION 170200 + + + #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_SHADOWCASTER + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + float4 clipPosV : TEXCOORD0; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 positionWS : TEXCOORD1; + #endif + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _BaseMap_ST; + float _Smoothness; + float _Radius; + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + + + + float3 _LightDirection; + float3 _LightPosition; + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( output ); + + + + float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); + float3 normalWS = TransformObjectToWorldNormal( input.normalOS ); + + #if _CASTING_PUNCTUAL_LIGHT_SHADOW + float3 lightDirectionWS = normalize(_LightPosition - positionWS); + #else + float3 lightDirectionWS = _LightDirection; + #endif + + float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, lightDirectionWS)); + + #if UNITY_REVERSED_Z + positionCS.z = min(positionCS.z, UNITY_NEAR_CLIP_VALUE); + #else + positionCS.z = max(positionCS.z, UNITY_NEAR_CLIP_VALUE); + #endif + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + output.positionWS = positionWS; + #endif + + output.positionCS = positionCS; + output.clipPosV = positionCS; + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + float3 normalOS : NORMAL; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = _TessPhongStrength; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag(PackedVaryings input ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID( input ); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input ); + + #if defined(LOD_FADE_CROSSFADE) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 PositionWS = input.positionWS; + #endif + + float4 ShadowCoord = float4( 0, 0, 0, 0 ); + float4 ClipPos = input.clipPosV; + float4 ScreenPos = ComputeScreenPos( input.clipPosV ); + + + + float Alpha = 1; + float AlphaClipThreshold = 0.5; + + #if defined(_ALPHATEST_ON) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + return 0; + } + ENDHLSL + } + + + Pass + { + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask R + AlphaToMask Off + + HLSLPROGRAM + + #define _NORMAL_DROPOFF_TS 1 + #pragma multi_compile_instancing + #pragma multi_compile _ LOD_FADE_CROSSFADE + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION 170200 + + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_DEPTHONLY + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + float4 clipPosV : TEXCOORD0; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 positionWS : TEXCOORD1; + #endif + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _BaseMap_ST; + float _Smoothness; + float _Radius; + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + + + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + + + float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + output.positionWS = positionWS; + #endif + + output.positionCS = positionCS; + output.clipPosV = positionCS; + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + float3 normalOS : NORMAL; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = _TessPhongStrength; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag(PackedVaryings input ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if defined(LOD_FADE_CROSSFADE) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 PositionWS = input.positionWS; + #endif + + float4 ShadowCoord = float4( 0, 0, 0, 0 ); + float4 ClipPos = input.clipPosV; + float4 ScreenPos = ComputeScreenPos( input.clipPosV ); + + + + float Alpha = 1; + float AlphaClipThreshold = 0.5; + + #if defined(_ALPHATEST_ON) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + return 0; + } + ENDHLSL + } + + + Pass + { + Name "DepthNormals" + Tags { "LightMode"="DepthNormalsOnly" } + + ZWrite On + ZTest LEqual + + HLSLPROGRAM + + #define _NORMAL_DROPOFF_TS 1 + #pragma multi_compile_instancing + #pragma multi_compile _ LOD_FADE_CROSSFADE + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION 170200 + + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_DEPTHNORMALS + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + float4 clipPosV : TEXCOORD0; + float3 normalWS : TEXCOORD1; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 positionWS : TEXCOORD2; + #endif + + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _BaseMap_ST; + float _Smoothness; + float _Radius; + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + + + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + + + float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); + float3 normalWS = TransformObjectToWorldNormal( input.normalOS ); + float4 positionCS = TransformWorldToHClip( positionWS ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + output.positionWS = positionWS; + #endif + + output.positionCS = positionCS; + output.clipPosV = positionCS; + output.normalWS = normalWS; + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + float3 normalOS : NORMAL; + float4 tangentOS : TANGENT; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + output.tangentOS = input.tangentOS; + + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z; + + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = _TessPhongStrength; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag(PackedVaryings input ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if defined(LOD_FADE_CROSSFADE) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 PositionWS = input.positionWS; + #endif + + float4 ShadowCoord = float4( 0, 0, 0, 0 ); + float4 ClipPos = input.clipPosV; + float4 ScreenPos = ComputeScreenPos( input.clipPosV ); + + + + float Alpha = 1; + float AlphaClipThreshold = 0.5; + + #if defined(_ALPHATEST_ON) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + float3 normalWS = input.normalWS; + return half4(NormalizeNormalPerPixel(normalWS), 0.0); + } + ENDHLSL + } + + + Pass + { + Name "Meta" + Tags { "LightMode"="Meta" } + + Cull Off + + HLSLPROGRAM + + #define _NORMAL_DROPOFF_TS 1 + #pragma multi_compile_instancing + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION 170200 + + + #pragma vertex vert + #pragma fragment frag + + #pragma shader_feature EDITOR_VISUALIZATION + + #define SHADERPASS SHADERPASS_META + + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl" + + #define ASE_NEEDS_TEXTURE_COORDINATES0 + #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 + + + struct Attributes + { + float4 positionOS : POSITION; + float3 normalOS : NORMAL; + float4 texcoord : TEXCOORD0; + float4 texcoord1 : TEXCOORD1; + float4 texcoord2 : TEXCOORD2; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 positionWS : TEXCOORD0; + #endif + float4 ase_texcoord1 : TEXCOORD1; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _BaseMap_ST; + float _Smoothness; + float _Radius; + float _ScreenSpaceOutlineIntensity; + half3 _ScreenSpaceOutlineColor; + float _ScreenSpaceOutlineWidth; + float _Surface; + CBUFFER_END + + sampler2D _BaseMap; + + + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + output.ase_texcoord1.xy = input.texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + output.ase_texcoord1.zw = 0; + + float3 positionWS = TransformObjectToWorld( input.positionOS.xyz ); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + output.positionWS = positionWS; + #endif + + output.positionCS = UnityMetaVertexPosition( input.positionOS.xyz, input.texcoord1.xy, input.texcoord2.xy ); + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + float3 normalOS : NORMAL; + float4 texcoord : TEXCOORD0; + float4 texcoord1 : TEXCOORD1; + float4 texcoord2 : TEXCOORD2; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + output.texcoord = input.texcoord; + output.texcoord1 = input.texcoord1; + output.texcoord2 = input.texcoord2; + + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; + output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; + output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z; + + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = _TessPhongStrength; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag(PackedVaryings input ) : SV_TARGET + { + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if defined(ASE_NEEDS_FRAG_WORLD_POSITION) + float3 PositionWS = input.positionWS; + #endif + + float4 ShadowCoord = float4( 0, 0, 0, 0 ); + + float2 temp_cast_0 = (2.0).xx; + float2 temp_cast_1 = (-1.0).xx; + float2 texCoord12 = input.ase_texcoord1.xy * temp_cast_0 + temp_cast_1; + float smoothstepResult13 = smoothstep( _Radius , ( _Radius - _Smoothness ) , length( texCoord12 )); + float2 uv_BaseMap = input.ase_texcoord1.xy * _BaseMap_ST.xy + _BaseMap_ST.zw; + float layeredBlendVar18 = smoothstepResult13; + float4 layeredBlend18 = ( lerp( float4( 1,1,1,1 ),tex2D( _BaseMap, uv_BaseMap ) , layeredBlendVar18 ) ); + + + float3 BaseColor = float3(0.5, 0.5, 0.5); + float3 Emission = layeredBlend18.rgb; + float Alpha = 1; + float AlphaClipThreshold = 0.5; + + #if defined(_ALPHATEST_ON) + AlphaDiscard( Alpha, AlphaClipThreshold ); + #endif + + MetaInput metaInput = (MetaInput)0; + metaInput.Albedo = BaseColor; + metaInput.Emission = Emission; + return UnityMetaFragment(metaInput); + } + ENDHLSL + } + + } + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" + FallBack "Hidden/Shader Graph/FallbackError" + + Fallback Off +} +/*ASEBEGIN +Version=19904 +Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;10;-1408,-32;Inherit;False;Constant;_1;-1;0;0;Create;True;0;0;0;False;0;False;-1;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;11;-1408,-112;Inherit;False;Constant;_2;2;0;0;Create;True;0;0;0;False;0;False;2;0;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.TextureCoordinatesNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;12;-1280,-112;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, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;7;-1280,80;Inherit;False;Property;_Smoothness;Smoothness;2;0;Create;True;0;0;0;False;0;False;0.5;0.5;0.01;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;8;-992,48;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.LengthOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;9;-992,-16;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;6;-1280,16;Inherit;False;Property;_Radius;Radius;1;0;Create;True;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SmoothstepOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;13;-864,0;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;5;-944,-240;Inherit;True;Property;_BaseMap;BaseMap;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;False;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;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 +Node;AmplifyShaderEditor.LayeredBlendNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;18;-624,-240;Inherit;False;6;0;FLOAT;0;False;1;COLOR;1,1,1,1;False;2;COLOR;1,1,1,1;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;1;COLOR;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;1;-352,-120.4;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;300;14;New Amplify Shader;2534d4d29a40afc46a3cc49af189fcb4;True;ShadowCaster;0;1;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;5;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;UniversalMaterialType=Lit;Queue=Geometry=Queue=0;IgnoreProjector=True;True;2;True;11;d3d11;glcore;gles3;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;2;-352,-87.39999;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;300;14;New Amplify Shader;2534d4d29a40afc46a3cc49af189fcb4;True;DepthOnly;0;2;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;5;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;UniversalMaterialType=Lit;Queue=Geometry=Queue=0;IgnoreProjector=True;True;2;True;11;d3d11;glcore;gles3;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;True;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;3;-352,-54.39999;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;300;14;New Amplify Shader;2534d4d29a40afc46a3cc49af189fcb4;True;DepthNormals;0;3;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;5;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;UniversalMaterialType=Lit;Queue=Geometry=Queue=0;IgnoreProjector=True;True;2;True;11;d3d11;glcore;gles3;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;4;-352,-21.39999;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;300;14;New Amplify Shader;2534d4d29a40afc46a3cc49af189fcb4;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;5;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;UniversalMaterialType=Lit;Queue=Geometry=Queue=0;IgnoreProjector=True;True;2;True;11;d3d11;glcore;gles3;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;0;-352,-352;Float;False;True;-1;3;UnityEditor.ShaderGraphUnlitGUI;300;14;Mingle/Floor/White Horizon;2534d4d29a40afc46a3cc49af189fcb4;True;Forward;0;0;Forward;10;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;5;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;UniversalMaterialType=Lit;Queue=Geometry=Queue=0;IgnoreProjector=True;True;2;True;11;d3d11;glcore;gles3;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;False;True;1;1;False;;0;False;;1;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;14;Workflow;1;0;Surface;0;0; Blend;0;0;Two Sided;1;0;Alpha Clipping;0;0;Fragment Normal Space;0;0;Cast Shadows;1;0;Receive Shadows;2;0;Specular Highlights;2;0;Environment Reflections;2;0;Receive SSAO;1;0;GPU Instancing;1;0;LOD CrossFade;1;0;NiloToon Screen Space Outline;0;0;0;5;True;True;True;True;True;False;;False;0 +WireConnection;12;0;11;0 +WireConnection;12;1;10;0 +WireConnection;8;0;6;0 +WireConnection;8;1;7;0 +WireConnection;9;0;12;0 +WireConnection;13;0;9;0 +WireConnection;13;1;6;0 +WireConnection;13;2;8;0 +WireConnection;18;0;13;0 +WireConnection;18;2;5;0 +WireConnection;0;2;18;0 +ASEEND*/ +//CHKSM=2BD7053C0628F168A0CD2BFDD6E819C4CD45A937 \ No newline at end of file diff --git a/Assets/ResourcesData/Background/White Horizon/Shader/White Horizon.shader.meta b/Assets/ResourcesData/Background/White Horizon/Shader/White Horizon.shader.meta new file mode 100644 index 00000000..bab471dc --- /dev/null +++ b/Assets/ResourcesData/Background/White Horizon/Shader/White Horizon.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6dd2533ed522d7547ad0fc9dd62febd0 +ShaderImporter: + externalObjects: {} + defaultTextures: [] + nonModifiableTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ResourcesData/Background/White Horizon/White Horizon.meta b/Assets/ResourcesData/Background/White Horizon/White Horizon.meta new file mode 100644 index 00000000..ccf3b8dc --- /dev/null +++ b/Assets/ResourcesData/Background/White Horizon/White Horizon.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b7aa548c01761674fa22efd6945e6f74 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/ResourcesData/Background/White Horizon/White Horizon.unity b/Assets/ResourcesData/Background/White Horizon/White Horizon.unity index 608beb0b..c1ab2765 100644 --- a/Assets/ResourcesData/Background/White Horizon/White Horizon.unity +++ b/Assets/ResourcesData/Background/White Horizon/White Horizon.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9287414d5edfdada38ba3b8873c887a2b84ef05cf7d6589810c79829b981c9a4 -size 21196 +oid sha256:7bb6f17f8b66b100072b02e1cee965b96a19fe98198674f79005d1d11187fc68 +size 23583 diff --git a/Assets/ResourcesData/Background/White Horizon/White Horizon/Global Volume Profile.asset b/Assets/ResourcesData/Background/White Horizon/White Horizon/Global Volume Profile.asset new file mode 100644 index 00000000..69eaad05 --- /dev/null +++ b/Assets/ResourcesData/Background/White Horizon/White Horizon/Global Volume Profile.asset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4af923a9eea1196498948f9e3f4933f02540340cad6f66088cfcde47beba82fb +size 9611 diff --git a/Assets/ResourcesData/Background/White Horizon/White Horizon/Global Volume Profile.asset.meta b/Assets/ResourcesData/Background/White Horizon/White Horizon/Global Volume Profile.asset.meta new file mode 100644 index 00000000..d6b47ed3 --- /dev/null +++ b/Assets/ResourcesData/Background/White Horizon/White Horizon/Global Volume Profile.asset.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 05f79adcb9c312a4da283039e5f0b090 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 11400000 + userData: + assetBundleName: + assetBundleVariant: