// Made with Amplify Shader Editor v1.9.9.3 // Available at the Unity Asset Store - http://u3d.as/y3X Shader "ASE/ASE_StandartPlantsT" { Properties { _Albedo( "Albedo", 2D ) = "white" {} _CubemapColor( "CubemapColor", Color ) = ( 0, 0, 0, 1 ) _AlbedoColor( "AlbedoColor", Color ) = ( 1, 1, 1, 1 ) _Cubmap( "Cubmap", CUBE ) = "white" {} _CubemapBlured( "CubemapBlured", CUBE ) = "white" {} _EmissionMap( "EmissionMap", 2D ) = "white" {} _EmissionColor( "EmissionColor", Color ) = ( 0, 0, 0, 0 ) _EmissionMultiplayer( "EmissionMultiplayer", Float ) = 0 _NormalMap( "NormalMap", 2D ) = "bump" {} [Toggle] _SmoothFromMapSwitch( "SmoothFromMapSwitch", Float ) = 1 [Toggle] _EmissionSwitch( "EmissionSwitch", Float ) = 0 [Toggle] _SmoothRough( "Smooth/Rough", Float ) = 0 _SmoothnessMap( "SmoothnessMap", 2D ) = "white" {} _MetallicMap( "MetallicMap", 2D ) = "white" {} _Snoothness( "Snoothness", Float ) = 1 _Metallic( "Metallic", Float ) = 1 _NormalMapDepth( "NormalMapDepth", Float ) = 1 _MetalicBrightnes( "MetalicBrightnes", Range( 0, 1 ) ) = 0 [HideInInspector] _texcoord( "", 2D ) = "white" {} //_TransmissionShadow( "Transmission Shadow", Range( 0, 1 ) ) = 0.5 //_TransStrength( "Trans Strength", Range( 0, 50 ) ) = 1 //_TransNormal( "Trans Normal Distortion", Range( 0, 1 ) ) = 0.5 //_TransScattering( "Trans Scattering", Range( 1, 50 ) ) = 2 //_TransDirect( "Trans Direct", Range( 0, 1 ) ) = 0.9 //_TransAmbient( "Trans Ambient", Range( 0, 1 ) ) = 0.1 //_TransShadow( "Trans Shadow", Range( 0, 1 ) ) = 0.5 //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5 //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16 //_TessMin( "Tess Min Distance", Float ) = 10 //_TessMax( "Tess Max Distance", Float ) = 25 //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16 //_TessMaxDisp( "Tess Max Displacement", Float ) = 25 [ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0 [ToggleOff] _GlossyReflections("Reflections", Float) = 1.0 //_InstancedTerrainNormals("Specular Highlights", Float) = 1.0 } SubShader { Tags { "RenderType"="Opaque" "Queue"="Geometry" "DisableBatching"="False" } LOD 0 Cull Back AlphaToMask Off ZWrite On ZTest LEqual ColorMask RGBA Blend Off CGINCLUDE #pragma target 3.5 float4 FixedTess( float tessValue ) { return tessValue; } float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos ) { float3 wpos = mul(o2w,vertex).xyz; float dist = distance (wpos, cameraPos); float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess; return f; } float4 CalcTriEdgeTessFactors (float3 triVertexFactors) { float4 tess; tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z); tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z); tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y); tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f; return tess; } float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams ) { float dist = distance (0.5 * (wpos0+wpos1), cameraPos); float len = distance(wpos0, wpos1); float f = max(len * scParams.y / (edgeLen * dist), 1.0); return f; } float DistanceFromPlane (float3 pos, float4 plane) { float d = dot (float4(pos,1.0f), plane); return d; } bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] ) { float4 planeTest; planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f ); planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f ); planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f ); planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) + (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f ); return !all (planeTest); } float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos ) { float3 f; f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos); f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos); f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos); return CalcTriEdgeTessFactors (f); } float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams ) { float3 pos0 = mul(o2w,v0).xyz; float3 pos1 = mul(o2w,v1).xyz; float3 pos2 = mul(o2w,v2).xyz; float4 tess; tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); tess.w = (tess.x + tess.y + tess.z) / 3.0f; return tess; } float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] ) { float3 pos0 = mul(o2w,v0).xyz; float3 pos1 = mul(o2w,v1).xyz; float3 pos2 = mul(o2w,v2).xyz; float4 tess; if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes)) { tess = 0.0f; } else { tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams); tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams); tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams); tess.w = (tess.x + tess.y + tess.z) / 3.0f; } return tess; } float4 ComputeClipSpacePosition( float2 screenPosNorm, float deviceDepth ) { float4 positionCS = float4( screenPosNorm * 2.0 - 1.0, deviceDepth, 1.0 ); #if UNITY_UV_STARTS_AT_TOP positionCS.y = -positionCS.y; #endif return positionCS; } ENDCG Pass { Name "ForwardBase" Tags { "LightMode"="ForwardBase" } Blend One Zero CGPROGRAM #define ASE_GEOMETRY 1 #define ASE_FRAGMENT_NORMAL 0 #define ASE_RECEIVE_SHADOWS #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF #pragma shader_feature_local_fragment _GLOSSYREFLECTIONS_OFF #pragma multi_compile_instancing #pragma multi_compile _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG #define ASE_VERSION 19903 #pragma vertex vert #pragma fragment frag #pragma multi_compile_fwdbase #ifndef UNITY_PASS_FORWARDBASE #define UNITY_PASS_FORWARDBASE #endif #include "HLSLSupport.cginc" #ifdef ASE_GEOMETRY #ifndef UNITY_INSTANCED_LOD_FADE #define UNITY_INSTANCED_LOD_FADE #endif #ifndef UNITY_INSTANCED_SH #define UNITY_INSTANCED_SH #endif #ifndef UNITY_INSTANCED_LIGHTMAPSTS #define UNITY_INSTANCED_LIGHTMAPSTS #endif #endif #include "UnityShaderVariables.cginc" #include "UnityCG.cginc" #include "Lighting.cginc" #include "UnityPBSLighting.cginc" #include "AutoLight.cginc" #if defined(UNITY_INSTANCING_ENABLED) && ( defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) || defined(_INSTANCEDTERRAINNORMALS_PIXEL) ) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #include "UnityStandardUtils.cginc" #define ASE_NEEDS_TEXTURE_COORDINATES0 #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 #define ASE_NEEDS_WORLD_TANGENT #define ASE_NEEDS_FRAG_WORLD_TANGENT #define ASE_NEEDS_WORLD_NORMAL #define ASE_NEEDS_FRAG_WORLD_NORMAL #define ASE_NEEDS_FRAG_WORLD_BITANGENT #define ASE_NEEDS_FRAG_WORLD_VIEW_DIR struct appdata { float4 vertex : POSITION; half3 normal : NORMAL; half4 tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct v2f { float4 pos : SV_POSITION; float4 positionWS : TEXCOORD0; // xyz = positionWS, w = fogCoord half3 normalWS : TEXCOORD1; float4 tangentWS : TEXCOORD2; // holds terrainUV ifdef ENABLE_TERRAIN_PERPIXEL_NORMAL half4 ambientOrLightmapUV : TEXCOORD3; UNITY_LIGHTING_COORDS( 4, 5 ) float4 ase_texcoord6 : TEXCOORD6; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif uniform sampler2D _Albedo; uniform float4 _Albedo_ST; uniform float4 _AlbedoColor; uniform samplerCUBE _CubemapBlured; uniform sampler2D _NormalMap; uniform float4 _NormalMap_ST; uniform float _NormalMapDepth; uniform samplerCUBE _Cubmap; uniform float _SmoothRough; uniform float _SmoothFromMapSwitch; uniform sampler2D _MetallicMap; uniform float4 _MetallicMap_ST; uniform sampler2D _SmoothnessMap; uniform float4 _SmoothnessMap_ST; uniform float _Snoothness; uniform float4 _CubemapColor; uniform float _Metallic; uniform float _MetalicBrightnes; uniform float4 _EmissionColor; uniform float _EmissionMultiplayer; uniform float _EmissionSwitch; uniform sampler2D _EmissionMap; uniform float4 _EmissionMap_ST; v2f VertexFunction( appdata v ) { UNITY_SETUP_INSTANCE_ID(v); v2f o; UNITY_INITIALIZE_OUTPUT(v2f,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_texcoord6.xyz = v.texcoord.xyzw.xyz; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord6.w = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.vertex.w = 1; v.normal = v.normal; v.tangent = v.tangent; float3 positionWS = mul( unity_ObjectToWorld, v.vertex ).xyz; half3 normalWS = UnityObjectToWorldNormal( v.normal ); half3 tangentWS = UnityObjectToWorldDir( v.tangent.xyz ); o.pos = UnityObjectToClipPos( v.vertex ); o.positionWS.xyz = positionWS; o.normalWS = normalWS; o.tangentWS = half4( tangentWS, v.tangent.w ); o.ambientOrLightmapUV = 0; #ifdef LIGHTMAP_ON o.ambientOrLightmapUV.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #elif UNITY_SHOULD_SAMPLE_SH #ifdef VERTEXLIGHT_ON o.ambientOrLightmapUV.rgb += Shade4PointLights( unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb, unity_4LightAtten0, positionWS, normalWS ); #endif o.ambientOrLightmapUV.rgb = ShadeSHPerVertex( normalWS, o.ambientOrLightmapUV.rgb ); #endif #ifdef DYNAMICLIGHTMAP_ON o.ambientOrLightmapUV.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) o.tangentWS.zw = v.texcoord.xy; o.tangentWS.xy = v.texcoord.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif UNITY_TRANSFER_LIGHTING(o, v.texcoord1.xy); #if defined( ASE_FOG ) o.positionWS.w = o.pos.z; #endif return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; half4 tangent : TANGENT; half3 normal : 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 ( appdata v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; 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(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, UNITY_MATRIX_M, _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [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")] v2f DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { appdata o = (appdata) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.tangent = patch[0].tangent * bary.x + patch[1].tangent * bary.y + patch[2].tangent * bary.z; o.normal = patch[0].normal * bary.x + patch[1].normal * bary.y + patch[2].normal * bary.z; o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.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] = o.vertex.xyz - patch[i].normal * (dot(o.vertex.xyz, patch[i].normal) - dot(patch[i].vertex.xyz, patch[i].normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else v2f vert ( appdata v ) { return VertexFunction( v ); } #endif half4 frag( v2f IN #if defined( ASE_DEPTH_WRITE_ON ) , out float outputDepth : SV_Depth #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); #ifdef LOD_FADE_CROSSFADE UNITY_APPLY_DITHER_CROSSFADE(IN.pos.xy); #endif #if defined(ASE_LIGHTING_SIMPLE) SurfaceOutput o = (SurfaceOutput)0; #else #if defined(_SPECULAR_SETUP) SurfaceOutputStandardSpecular o = (SurfaceOutputStandardSpecular)0; #else SurfaceOutputStandard o = (SurfaceOutputStandard)0; #endif #endif half atten; { #if defined( ASE_RECEIVE_SHADOWS ) UNITY_LIGHT_ATTENUATION( temp, IN, IN.positionWS.xyz ) atten = temp; #else atten = 1; #endif } float3 PositionWS = IN.positionWS.xyz; half3 ViewDirWS = normalize( UnityWorldSpaceViewDir( PositionWS ) ); float4 ScreenPosNorm = float4( IN.pos.xy * ( _ScreenParams.zw - 1.0 ), IN.pos.zw ); float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, IN.pos.z ) * IN.pos.w; float4 ScreenPos = ComputeScreenPos( ClipPos ); half3 NormalWS = IN.normalWS; half3 TangentWS = IN.tangentWS.xyz; half3 BitangentWS = cross( IN.normalWS, IN.tangentWS.xyz ) * IN.tangentWS.w * unity_WorldTransformParams.w; half3 LightAtten = atten; float FogCoord = IN.positionWS.w; #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float2 sampleCoords = (IN.tangentWS.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy; NormalWS = UnityObjectToWorldNormal(normalize(tex2D(_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1)); TangentWS = -cross(unity_ObjectToWorld._13_23_33, NormalWS); BitangentWS = cross(NormalWS, -TangentWS); #endif float2 uv_Albedo = IN.ase_texcoord6.xyz.xy * _Albedo_ST.xy + _Albedo_ST.zw; float4 tex2DNode1 = tex2D( _Albedo, uv_Albedo ); float4 temp_output_3_0 = ( tex2DNode1 * _AlbedoColor ); float2 uv_NormalMap = IN.ase_texcoord6.xyz.xy * _NormalMap_ST.xy + _NormalMap_ST.zw; float3 tex2DNode13 = UnpackScaleNormal( tex2D( _NormalMap, uv_NormalMap ), _NormalMapDepth ); float3 tanToWorld0 = float3( TangentWS.x, BitangentWS.x, NormalWS.x ); float3 tanToWorld1 = float3( TangentWS.y, BitangentWS.y, NormalWS.y ); float3 tanToWorld2 = float3( TangentWS.z, BitangentWS.z, NormalWS.z ); float3 worldRefl69 = reflect( -ViewDirWS, float3( dot( tanToWorld0, tex2DNode13 ), dot( tanToWorld1, tex2DNode13 ), dot( tanToWorld2, tex2DNode13 ) ) ); float2 uv_MetallicMap = IN.ase_texcoord6.xyz.xy * _MetallicMap_ST.xy + _MetallicMap_ST.zw; float4 tex2DNode5 = tex2D( _MetallicMap, uv_MetallicMap ); float2 uv_SmoothnessMap = IN.ase_texcoord6.xyz.xy * _SmoothnessMap_ST.xy + _SmoothnessMap_ST.zw; float3 linearToGamma103 = LinearToGammaSpace( tex2D( _SmoothnessMap, uv_SmoothnessMap ).rgb ); float temp_output_10_0 = ( (( _SmoothRough )?( ( 1.0 - (( _SmoothFromMapSwitch )?( linearToGamma103.z ):( tex2DNode5.a )) ) ):( (( _SmoothFromMapSwitch )?( linearToGamma103.z ):( tex2DNode5.a )) )) * _Snoothness ); float4 lerpResult87 = lerp( texCUBE( _CubemapBlured, worldRefl69 ) , texCUBE( _Cubmap, worldRefl69 ) , temp_output_10_0); float4 temp_output_71_0 = ( lerpResult87 * _CubemapColor ); float3 linearToGamma105 = LinearToGammaSpace( tex2DNode5.rgb ); float lerpResult93 = lerp( linearToGamma105.x , 1.0 , _MetalicBrightnes); float temp_output_7_0 = ( _Metallic * lerpResult93 ); float4 lerpResult90 = lerp( ( temp_output_71_0 * saturate( temp_output_10_0 ) ) , ( temp_output_71_0 * temp_output_3_0 ) , temp_output_7_0); float2 uv_EmissionMap = IN.ase_texcoord6.xyz.xy * _EmissionMap_ST.xy + _EmissionMap_ST.zw; float4 tex2DNode33 = tex2D( _EmissionMap, uv_EmissionMap ); o.Albedo = ( temp_output_3_0 + lerpResult90 ).rgb; o.Normal = tex2DNode13; half3 Specular = half3( 0, 0, 0 ); half Metallic = temp_output_7_0; half Smoothness = temp_output_10_0; half Occlusion = 1; #if defined(ASE_LIGHTING_SIMPLE) o.Specular = Specular.x; o.Gloss = Smoothness; #else #if defined(_SPECULAR_SETUP) o.Specular = Specular; #else o.Metallic = Metallic; #endif o.Occlusion = Occlusion; o.Smoothness = Smoothness; #endif o.Emission = ( _EmissionColor * ( _EmissionMultiplayer * (( _EmissionSwitch )?( ( temp_output_3_0 * tex2DNode33.a ) ):( tex2DNode33 )) ) ).rgb; o.Alpha = 1; half AlphaClipThreshold = 0.5; half AlphaClipThresholdShadow = 0.5; half3 BakedGI = 0; half3 Transmission = 1; half3 Translucency = 1; #if defined( ASE_DEPTH_WRITE_ON ) float DeviceDepth = IN.pos.z; #endif #ifdef _ALPHATEST_ON clip( o.Alpha - AlphaClipThreshold ); #endif #if defined( ASE_CHANGES_WORLD_POS ) { #if defined( ASE_RECEIVE_SHADOWS ) UNITY_LIGHT_ATTENUATION( temp, IN, PositionWS ) LightAtten = temp; #else LightAtten = 1; #endif } #endif #if ( ASE_FRAGMENT_NORMAL == 0 ) o.Normal = normalize( o.Normal.x * TangentWS + o.Normal.y * BitangentWS + o.Normal.z * NormalWS ); #elif ( ASE_FRAGMENT_NORMAL == 1 ) o.Normal = UnityObjectToWorldNormal( o.Normal ); #elif ( ASE_FRAGMENT_NORMAL == 2 ) // @diogo: already in world-space; do nothing #endif #if defined( ASE_DEPTH_WRITE_ON ) outputDepth = DeviceDepth; #endif #ifndef USING_DIRECTIONAL_LIGHT half3 lightDir = normalize( UnityWorldSpaceLightDir( PositionWS ) ); #else half3 lightDir = _WorldSpaceLightPos0.xyz; #endif UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = PositionWS; giInput.worldViewDir = ViewDirWS; giInput.atten = atten; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.ambientOrLightmapUV; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH && !UNITY_SAMPLE_FULL_SH_PER_PIXEL giInput.ambient = IN.ambientOrLightmapUV.rgb; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if defined(UNITY_SPECCUBE_BLENDING) || defined(UNITY_SPECCUBE_BOX_PROJECTION) giInput.boxMin[0] = unity_SpecCube0_BoxMin; #endif #ifdef UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif #if defined(ASE_LIGHTING_SIMPLE) #if defined(_SPECULAR_SETUP) LightingBlinnPhong_GI(o, giInput, gi); #else LightingLambert_GI(o, giInput, gi); #endif #else #if defined(_SPECULAR_SETUP) LightingStandardSpecular_GI(o, giInput, gi); #else LightingStandard_GI(o, giInput, gi); #endif #endif #ifdef ASE_BAKEDGI gi.indirect.diffuse = BakedGI; #endif #if UNITY_SHOULD_SAMPLE_SH && !defined(LIGHTMAP_ON) && defined(ASE_NO_AMBIENT) gi.indirect.diffuse = 0; #endif half4 c = 0; #if defined(ASE_LIGHTING_SIMPLE) #if defined(_SPECULAR_SETUP) c += LightingBlinnPhong (o, ViewDirWS, gi); #else c += LightingLambert( o, gi ); #endif #else #if defined(_SPECULAR_SETUP) c += LightingStandardSpecular (o, ViewDirWS, gi); #else c += LightingStandard(o, ViewDirWS, gi); #endif #endif #ifdef ASE_TRANSMISSION { half shadow = _TransmissionShadow; #ifdef DIRECTIONAL half3 lightAtten = lerp( _LightColor0.rgb, gi.light.color, shadow ); #else half3 lightAtten = gi.light.color; #endif half3 transmission = max(0 , -dot(o.Normal, gi.light.dir)) * lightAtten * Transmission; c.rgb += o.Albedo * transmission; } #endif #ifdef ASE_TRANSLUCENCY { half shadow = _TransShadow; half normal = _TransNormal; half scattering = _TransScattering; half direct = _TransDirect; half ambient = _TransAmbient; half strength = _TransStrength; #ifdef DIRECTIONAL half3 lightAtten = lerp( _LightColor0.rgb, gi.light.color, shadow ); #else half3 lightAtten = gi.light.color; #endif half3 lightDir = gi.light.dir + o.Normal * normal; half transVdotL = pow( saturate( dot( ViewDirWS, -lightDir ) ), scattering ); half3 translucency = lightAtten * (transVdotL * direct + gi.indirect.diffuse * ambient) * Translucency; c.rgb += o.Albedo * translucency * strength; } #endif c.rgb += o.Emission; #if defined( ASE_FOG ) UNITY_APPLY_FOG( FogCoord, c ); #endif return c; } ENDCG } Pass { Name "ForwardAdd" Tags { "LightMode"="ForwardAdd" } ZWrite Off Blend One One CGPROGRAM #define ASE_GEOMETRY 1 #define ASE_FRAGMENT_NORMAL 0 #define ASE_RECEIVE_SHADOWS #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF #pragma multi_compile_instancing #pragma multi_compile _ LOD_FADE_CROSSFADE #pragma multi_compile_fog #define ASE_FOG #define ASE_VERSION 19903 #pragma vertex vert #pragma fragment frag #pragma skip_variants INSTANCING_ON #pragma multi_compile_fwdadd_fullshadows #ifndef UNITY_PASS_FORWARDADD #define UNITY_PASS_FORWARDADD #endif #include "HLSLSupport.cginc" #ifdef ASE_GEOMETRY #ifndef UNITY_INSTANCED_LOD_FADE #define UNITY_INSTANCED_LOD_FADE #endif #ifndef UNITY_INSTANCED_SH #define UNITY_INSTANCED_SH #endif #ifndef UNITY_INSTANCED_LIGHTMAPSTS #define UNITY_INSTANCED_LIGHTMAPSTS #endif #endif #include "UnityShaderVariables.cginc" #include "UnityCG.cginc" #include "Lighting.cginc" #include "UnityPBSLighting.cginc" #include "AutoLight.cginc" #if defined(UNITY_INSTANCING_ENABLED) && ( defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) || defined(_INSTANCEDTERRAINNORMALS_PIXEL) ) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #include "UnityStandardUtils.cginc" #define ASE_NEEDS_TEXTURE_COORDINATES0 #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 #define ASE_NEEDS_FRAG_WORLD_TANGENT #define ASE_NEEDS_WORLD_NORMAL #define ASE_NEEDS_FRAG_WORLD_NORMAL #define ASE_NEEDS_FRAG_WORLD_BITANGENT #define ASE_NEEDS_FRAG_WORLD_VIEW_DIR struct appdata { float4 vertex : POSITION; half3 normal : NORMAL; half4 tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct v2f { float4 pos : SV_POSITION; float4 positionWS : TEXCOORD0; // xyz = positionWS, w = fogCoord half3 normalWS : TEXCOORD1; float4 tangentWS : TEXCOORD2; // holds terrainUV ifdef ENABLE_TERRAIN_PERPIXEL_NORMAL UNITY_LIGHTING_COORDS( 3, 4 ) float4 ase_texcoord5 : TEXCOORD5; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #ifdef ASE_TRANSMISSION float _TransmissionShadow; #endif #ifdef ASE_TRANSLUCENCY float _TransStrength; float _TransNormal; float _TransScattering; float _TransDirect; float _TransAmbient; float _TransShadow; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif uniform sampler2D _Albedo; uniform float4 _Albedo_ST; uniform float4 _AlbedoColor; uniform samplerCUBE _CubemapBlured; uniform sampler2D _NormalMap; uniform float4 _NormalMap_ST; uniform float _NormalMapDepth; uniform samplerCUBE _Cubmap; uniform float _SmoothRough; uniform float _SmoothFromMapSwitch; uniform sampler2D _MetallicMap; uniform float4 _MetallicMap_ST; uniform sampler2D _SmoothnessMap; uniform float4 _SmoothnessMap_ST; uniform float _Snoothness; uniform float4 _CubemapColor; uniform float _Metallic; uniform float _MetalicBrightnes; uniform float4 _EmissionColor; uniform float _EmissionMultiplayer; uniform float _EmissionSwitch; uniform sampler2D _EmissionMap; uniform float4 _EmissionMap_ST; v2f VertexFunction (appdata v ) { UNITY_SETUP_INSTANCE_ID(v); v2f o; UNITY_INITIALIZE_OUTPUT(v2f,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_texcoord5.xyz = v.texcoord.xyzw.xyz; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord5.w = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.vertex.w = 1; v.normal = v.normal; v.tangent = v.tangent; float3 positionWS = mul( unity_ObjectToWorld, v.vertex ).xyz; half3 normalWS = UnityObjectToWorldNormal( v.normal ); half3 tangentWS = UnityObjectToWorldDir( v.tangent.xyz ); o.pos = UnityObjectToClipPos( v.vertex ); o.positionWS.xyz = positionWS; o.normalWS = normalWS; o.tangentWS = half4( tangentWS, v.tangent.w ); UNITY_TRANSFER_LIGHTING(o, v.texcoord1.xy); #if defined( ASE_FOG ) o.positionWS.w = o.pos.z; #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) o.tangentWS.zw = v.texcoord.xy; o.tangentWS.xy = v.texcoord.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; half4 tangent : TANGENT; half3 normal : 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 ( appdata v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; 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(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, UNITY_MATRIX_M, _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [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")] v2f DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { appdata o = (appdata) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.tangent = patch[0].tangent * bary.x + patch[1].tangent * bary.y + patch[2].tangent * bary.z; o.normal = patch[0].normal * bary.x + patch[1].normal * bary.y + patch[2].normal * bary.z; o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.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] = o.vertex.xyz - patch[i].normal * (dot(o.vertex.xyz, patch[i].normal) - dot(patch[i].vertex.xyz, patch[i].normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else v2f vert ( appdata v ) { return VertexFunction( v ); } #endif half4 frag ( v2f IN #if defined( ASE_DEPTH_WRITE_ON ) , out float outputDepth : SV_Depth #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); #ifdef LOD_FADE_CROSSFADE UNITY_APPLY_DITHER_CROSSFADE(IN.pos.xy); #endif #if defined(ASE_LIGHTING_SIMPLE) SurfaceOutput o = (SurfaceOutput)0; #else #if defined(_SPECULAR_SETUP) SurfaceOutputStandardSpecular o = (SurfaceOutputStandardSpecular)0; #else SurfaceOutputStandard o = (SurfaceOutputStandard)0; #endif #endif half atten; { #if defined( ASE_RECEIVE_SHADOWS ) UNITY_LIGHT_ATTENUATION( temp, IN, IN.positionWS.xyz ) atten = temp; #else atten = 1; #endif } float3 PositionWS = IN.positionWS.xyz; half3 ViewDirWS = normalize( UnityWorldSpaceViewDir( PositionWS ) ); float4 ScreenPosNorm = float4( IN.pos.xy * ( _ScreenParams.zw - 1.0 ), IN.pos.zw ); float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, IN.pos.z ) * IN.pos.w; float4 ScreenPos = ComputeScreenPos( ClipPos ); half3 NormalWS = IN.normalWS; half3 TangentWS = IN.tangentWS.xyz; half3 BitangentWS = cross( IN.normalWS, IN.tangentWS.xyz ) * IN.tangentWS.w * unity_WorldTransformParams.w; half3 LightAtten = atten; float FogCoord = IN.positionWS.w; #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float2 sampleCoords = (IN.tangentWS.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy; NormalWS = UnityObjectToWorldNormal(normalize(tex2D(_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1)); TangentWS = -cross(unity_ObjectToWorld._13_23_33, NormalWS); BitangentWS = cross(NormalWS, -TangentWS); #endif float2 uv_Albedo = IN.ase_texcoord5.xyz.xy * _Albedo_ST.xy + _Albedo_ST.zw; float4 tex2DNode1 = tex2D( _Albedo, uv_Albedo ); float4 temp_output_3_0 = ( tex2DNode1 * _AlbedoColor ); float2 uv_NormalMap = IN.ase_texcoord5.xyz.xy * _NormalMap_ST.xy + _NormalMap_ST.zw; float3 tex2DNode13 = UnpackScaleNormal( tex2D( _NormalMap, uv_NormalMap ), _NormalMapDepth ); float3 tanToWorld0 = float3( TangentWS.x, BitangentWS.x, NormalWS.x ); float3 tanToWorld1 = float3( TangentWS.y, BitangentWS.y, NormalWS.y ); float3 tanToWorld2 = float3( TangentWS.z, BitangentWS.z, NormalWS.z ); float3 worldRefl69 = reflect( -ViewDirWS, float3( dot( tanToWorld0, tex2DNode13 ), dot( tanToWorld1, tex2DNode13 ), dot( tanToWorld2, tex2DNode13 ) ) ); float2 uv_MetallicMap = IN.ase_texcoord5.xyz.xy * _MetallicMap_ST.xy + _MetallicMap_ST.zw; float4 tex2DNode5 = tex2D( _MetallicMap, uv_MetallicMap ); float2 uv_SmoothnessMap = IN.ase_texcoord5.xyz.xy * _SmoothnessMap_ST.xy + _SmoothnessMap_ST.zw; float3 linearToGamma103 = LinearToGammaSpace( tex2D( _SmoothnessMap, uv_SmoothnessMap ).rgb ); float temp_output_10_0 = ( (( _SmoothRough )?( ( 1.0 - (( _SmoothFromMapSwitch )?( linearToGamma103.z ):( tex2DNode5.a )) ) ):( (( _SmoothFromMapSwitch )?( linearToGamma103.z ):( tex2DNode5.a )) )) * _Snoothness ); float4 lerpResult87 = lerp( texCUBE( _CubemapBlured, worldRefl69 ) , texCUBE( _Cubmap, worldRefl69 ) , temp_output_10_0); float4 temp_output_71_0 = ( lerpResult87 * _CubemapColor ); float3 linearToGamma105 = LinearToGammaSpace( tex2DNode5.rgb ); float lerpResult93 = lerp( linearToGamma105.x , 1.0 , _MetalicBrightnes); float temp_output_7_0 = ( _Metallic * lerpResult93 ); float4 lerpResult90 = lerp( ( temp_output_71_0 * saturate( temp_output_10_0 ) ) , ( temp_output_71_0 * temp_output_3_0 ) , temp_output_7_0); float2 uv_EmissionMap = IN.ase_texcoord5.xyz.xy * _EmissionMap_ST.xy + _EmissionMap_ST.zw; float4 tex2DNode33 = tex2D( _EmissionMap, uv_EmissionMap ); o.Albedo = ( temp_output_3_0 + lerpResult90 ).rgb; o.Normal = tex2DNode13; half3 Specular = half3( 0, 0, 0 ); half Metallic = temp_output_7_0; half Smoothness = temp_output_10_0; half Occlusion = 1; #if defined(ASE_LIGHTING_SIMPLE) o.Specular = Specular.x; o.Gloss = Smoothness; #else #if defined(_SPECULAR_SETUP) o.Specular = Specular; #else o.Metallic = Metallic; #endif o.Occlusion = Occlusion; o.Smoothness = Smoothness; #endif o.Emission = ( _EmissionColor * ( _EmissionMultiplayer * (( _EmissionSwitch )?( ( temp_output_3_0 * tex2DNode33.a ) ):( tex2DNode33 )) ) ).rgb; o.Alpha = 1; half AlphaClipThreshold = 0.5; half3 Transmission = 1; half3 Translucency = 1; #if defined( ASE_DEPTH_WRITE_ON ) float DeviceDepth = IN.pos.z; #endif #ifdef _ALPHATEST_ON clip( o.Alpha - AlphaClipThreshold ); #endif #if defined( ASE_CHANGES_WORLD_POS ) { #if defined( ASE_RECEIVE_SHADOWS ) UNITY_LIGHT_ATTENUATION( temp, IN, PositionWS ) LightAtten = temp; #else LightAtten = 1; #endif } #endif #if ( ASE_FRAGMENT_NORMAL == 0 ) o.Normal = normalize( o.Normal.x * TangentWS + o.Normal.y * BitangentWS + o.Normal.z * NormalWS ); #elif ( ASE_FRAGMENT_NORMAL == 1 ) o.Normal = UnityObjectToWorldNormal( o.Normal ); #elif ( ASE_FRAGMENT_NORMAL == 2 ) // @diogo: already in world-space; do nothing #endif #if defined( ASE_DEPTH_WRITE_ON ) outputDepth = DeviceDepth; #endif #ifndef USING_DIRECTIONAL_LIGHT half3 lightDir = normalize( UnityWorldSpaceLightDir( PositionWS ) ); #else half3 lightDir = _WorldSpaceLightPos0.xyz; #endif UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; gi.light.color = _LightColor0.rgb; gi.light.dir = lightDir; gi.light.color *= atten; half4 c = 0; #if defined(ASE_LIGHTING_SIMPLE) #if defined(_SPECULAR_SETUP) c += LightingBlinnPhong (o, ViewDirWS, gi); #else c += LightingLambert( o, gi ); #endif #else #if defined(_SPECULAR_SETUP) c += LightingStandardSpecular(o, ViewDirWS, gi); #else c += LightingStandard(o, ViewDirWS, gi); #endif #endif #ifdef ASE_TRANSMISSION { half shadow = _TransmissionShadow; #ifdef DIRECTIONAL half3 lightAtten = lerp( _LightColor0.rgb, gi.light.color, shadow ); #else half3 lightAtten = gi.light.color; #endif half3 transmission = max(0 , -dot(o.Normal, gi.light.dir)) * lightAtten * Transmission; c.rgb += o.Albedo * transmission; } #endif #ifdef ASE_TRANSLUCENCY { half shadow = _TransShadow; half normal = _TransNormal; half scattering = _TransScattering; half direct = _TransDirect; half ambient = _TransAmbient; half strength = _TransStrength; #ifdef DIRECTIONAL half3 lightAtten = lerp( _LightColor0.rgb, gi.light.color, shadow ); #else half3 lightAtten = gi.light.color; #endif half3 lightDir = gi.light.dir + o.Normal * normal; half transVdotL = pow( saturate( dot( ViewDirWS, -lightDir ) ), scattering ); half3 translucency = lightAtten * (transVdotL * direct + gi.indirect.diffuse * ambient) * Translucency; c.rgb += o.Albedo * translucency * strength; } #endif #if defined( ASE_FOG ) UNITY_APPLY_FOG( FogCoord, c ); #endif return c; } ENDCG } Pass { Name "Deferred" Tags { "LightMode"="Deferred" } AlphaToMask Off CGPROGRAM #define ASE_GEOMETRY 1 #define ASE_FRAGMENT_NORMAL 0 #define ASE_RECEIVE_SHADOWS #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF #pragma shader_feature_local_fragment _GLOSSYREFLECTIONS_OFF #pragma multi_compile_instancing #pragma multi_compile _ LOD_FADE_CROSSFADE #define ASE_FOG #define ASE_VERSION 19903 #pragma vertex vert #pragma fragment frag #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_prepassfinal #ifndef UNITY_PASS_DEFERRED #define UNITY_PASS_DEFERRED #endif #include "HLSLSupport.cginc" #ifdef ASE_GEOMETRY #ifndef UNITY_INSTANCED_LOD_FADE #define UNITY_INSTANCED_LOD_FADE #endif #ifndef UNITY_INSTANCED_SH #define UNITY_INSTANCED_SH #endif #ifndef UNITY_INSTANCED_LIGHTMAPSTS #define UNITY_INSTANCED_LIGHTMAPSTS #endif #endif #include "UnityShaderVariables.cginc" #include "UnityCG.cginc" #include "Lighting.cginc" #include "UnityPBSLighting.cginc" #if defined(UNITY_INSTANCING_ENABLED) && ( defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL) || defined(_INSTANCEDTERRAINNORMALS_PIXEL) ) #define ENABLE_TERRAIN_PERPIXEL_NORMAL #endif #include "UnityStandardUtils.cginc" #define ASE_NEEDS_TEXTURE_COORDINATES0 #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 #define ASE_NEEDS_WORLD_TANGENT #define ASE_NEEDS_FRAG_WORLD_TANGENT #define ASE_NEEDS_WORLD_NORMAL #define ASE_NEEDS_FRAG_WORLD_NORMAL #define ASE_NEEDS_FRAG_WORLD_BITANGENT #define ASE_NEEDS_FRAG_WORLD_VIEW_DIR struct appdata { float4 vertex : POSITION; half3 normal : NORMAL; half4 tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct v2f { float4 pos : SV_POSITION; float4 positionWS : TEXCOORD0; // xyz = positionWS, w = fogCoord half3 normalWS : TEXCOORD1; float4 tangentWS : TEXCOORD2; // holds terrainUV ifdef ENABLE_TERRAIN_PERPIXEL_NORMAL half4 ambientOrLightmapUV : TEXCOORD3; float4 ase_texcoord4 : TEXCOORD4; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #ifdef LIGHTMAP_ON float4 unity_LightmapFade; #endif half4 unity_Ambient; #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif uniform sampler2D _Albedo; uniform float4 _Albedo_ST; uniform float4 _AlbedoColor; uniform samplerCUBE _CubemapBlured; uniform sampler2D _NormalMap; uniform float4 _NormalMap_ST; uniform float _NormalMapDepth; uniform samplerCUBE _Cubmap; uniform float _SmoothRough; uniform float _SmoothFromMapSwitch; uniform sampler2D _MetallicMap; uniform float4 _MetallicMap_ST; uniform sampler2D _SmoothnessMap; uniform float4 _SmoothnessMap_ST; uniform float _Snoothness; uniform float4 _CubemapColor; uniform float _Metallic; uniform float _MetalicBrightnes; uniform float4 _EmissionColor; uniform float _EmissionMultiplayer; uniform float _EmissionSwitch; uniform sampler2D _EmissionMap; uniform float4 _EmissionMap_ST; v2f VertexFunction (appdata v ) { UNITY_SETUP_INSTANCE_ID(v); v2f o; UNITY_INITIALIZE_OUTPUT(v2f,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); o.ase_texcoord4.xyz = v.texcoord.xyzw.xyz; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord4.w = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.vertex.w = 1; v.normal = v.normal; v.tangent = v.tangent; float3 positionWS = mul( unity_ObjectToWorld, v.vertex ).xyz; half3 normalWS = UnityObjectToWorldNormal( v.normal ); half3 tangentWS = UnityObjectToWorldDir( v.tangent.xyz ); o.pos = UnityObjectToClipPos( v.vertex ); o.positionWS.xyz = positionWS; o.normalWS = normalWS; o.tangentWS = half4( tangentWS, v.tangent.w ); o.ambientOrLightmapUV = 0; #ifdef LIGHTMAP_ON o.ambientOrLightmapUV.xy = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; #elif UNITY_SHOULD_SAMPLE_SH #ifdef VERTEXLIGHT_ON o.ambientOrLightmapUV.rgb += Shade4PointLights( unity_4LightPosX0, unity_4LightPosY0, unity_4LightPosZ0, unity_LightColor[0].rgb, unity_LightColor[1].rgb, unity_LightColor[2].rgb, unity_LightColor[3].rgb, unity_4LightAtten0, positionWS, normalWS ); #endif o.ambientOrLightmapUV.rgb = ShadeSHPerVertex( normalWS, o.ambientOrLightmapUV.rgb ); #endif #ifdef DYNAMICLIGHTMAP_ON o.ambientOrLightmapUV.zw = v.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw; #endif #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) o.tangentWS.zw = v.texcoord.xy; o.tangentWS.xy = v.texcoord.xy * unity_LightmapST.xy + unity_LightmapST.zw; #endif return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; half4 tangent : TANGENT; half3 normal : 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 ( appdata v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord = v.texcoord; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; 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(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, UNITY_MATRIX_M, _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [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")] v2f DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { appdata o = (appdata) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.tangent = patch[0].tangent * bary.x + patch[1].tangent * bary.y + patch[2].tangent * bary.z; o.normal = patch[0].normal * bary.x + patch[1].normal * bary.y + patch[2].normal * bary.z; o.texcoord = patch[0].texcoord * bary.x + patch[1].texcoord * bary.y + patch[2].texcoord * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.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] = o.vertex.xyz - patch[i].normal * (dot(o.vertex.xyz, patch[i].normal) - dot(patch[i].vertex.xyz, patch[i].normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else v2f vert ( appdata v ) { return VertexFunction( v ); } #endif void frag (v2f IN , out half4 outGBuffer0 : SV_Target0 , out half4 outGBuffer1 : SV_Target1 , out half4 outGBuffer2 : SV_Target2 , out half4 outEmission : SV_Target3 #if defined(SHADOWS_SHADOWMASK) && (UNITY_ALLOWED_MRT_COUNT > 4) , out half4 outShadowMask : SV_Target4 #endif #if defined( ASE_DEPTH_WRITE_ON ) , out float outputDepth : SV_Depth #endif ) { UNITY_SETUP_INSTANCE_ID(IN); #ifdef LOD_FADE_CROSSFADE UNITY_APPLY_DITHER_CROSSFADE(IN.pos.xy); #endif #if defined(ASE_LIGHTING_SIMPLE) SurfaceOutput o = (SurfaceOutput)0; #else #if defined(_SPECULAR_SETUP) SurfaceOutputStandardSpecular o = (SurfaceOutputStandardSpecular)0; #else SurfaceOutputStandard o = (SurfaceOutputStandard)0; #endif #endif float3 PositionWS = IN.positionWS.xyz; half3 ViewDirWS = normalize( UnityWorldSpaceViewDir( PositionWS ) ); float4 ScreenPosNorm = float4( IN.pos.xy * ( _ScreenParams.zw - 1.0 ), IN.pos.zw ); float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, IN.pos.z ) * IN.pos.w; float4 ScreenPos = ComputeScreenPos( ClipPos ); half3 NormalWS = IN.normalWS; half3 TangentWS = IN.tangentWS.xyz; half3 BitangentWS = cross( IN.normalWS, IN.tangentWS.xyz ) * IN.tangentWS.w * unity_WorldTransformParams.w; #if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL) float2 sampleCoords = (IN.tangentWS.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy; NormalWS = UnityObjectToWorldNormal(normalize(tex2D(_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1)); TangentWS = -cross(unity_ObjectToWorld._13_23_33, NormalWS); BitangentWS = cross(NormalWS, -TangentWS); #endif float2 uv_Albedo = IN.ase_texcoord4.xyz.xy * _Albedo_ST.xy + _Albedo_ST.zw; float4 tex2DNode1 = tex2D( _Albedo, uv_Albedo ); float4 temp_output_3_0 = ( tex2DNode1 * _AlbedoColor ); float2 uv_NormalMap = IN.ase_texcoord4.xyz.xy * _NormalMap_ST.xy + _NormalMap_ST.zw; float3 tex2DNode13 = UnpackScaleNormal( tex2D( _NormalMap, uv_NormalMap ), _NormalMapDepth ); float3 tanToWorld0 = float3( TangentWS.x, BitangentWS.x, NormalWS.x ); float3 tanToWorld1 = float3( TangentWS.y, BitangentWS.y, NormalWS.y ); float3 tanToWorld2 = float3( TangentWS.z, BitangentWS.z, NormalWS.z ); float3 worldRefl69 = reflect( -ViewDirWS, float3( dot( tanToWorld0, tex2DNode13 ), dot( tanToWorld1, tex2DNode13 ), dot( tanToWorld2, tex2DNode13 ) ) ); float2 uv_MetallicMap = IN.ase_texcoord4.xyz.xy * _MetallicMap_ST.xy + _MetallicMap_ST.zw; float4 tex2DNode5 = tex2D( _MetallicMap, uv_MetallicMap ); float2 uv_SmoothnessMap = IN.ase_texcoord4.xyz.xy * _SmoothnessMap_ST.xy + _SmoothnessMap_ST.zw; float3 linearToGamma103 = LinearToGammaSpace( tex2D( _SmoothnessMap, uv_SmoothnessMap ).rgb ); float temp_output_10_0 = ( (( _SmoothRough )?( ( 1.0 - (( _SmoothFromMapSwitch )?( linearToGamma103.z ):( tex2DNode5.a )) ) ):( (( _SmoothFromMapSwitch )?( linearToGamma103.z ):( tex2DNode5.a )) )) * _Snoothness ); float4 lerpResult87 = lerp( texCUBE( _CubemapBlured, worldRefl69 ) , texCUBE( _Cubmap, worldRefl69 ) , temp_output_10_0); float4 temp_output_71_0 = ( lerpResult87 * _CubemapColor ); float3 linearToGamma105 = LinearToGammaSpace( tex2DNode5.rgb ); float lerpResult93 = lerp( linearToGamma105.x , 1.0 , _MetalicBrightnes); float temp_output_7_0 = ( _Metallic * lerpResult93 ); float4 lerpResult90 = lerp( ( temp_output_71_0 * saturate( temp_output_10_0 ) ) , ( temp_output_71_0 * temp_output_3_0 ) , temp_output_7_0); float2 uv_EmissionMap = IN.ase_texcoord4.xyz.xy * _EmissionMap_ST.xy + _EmissionMap_ST.zw; float4 tex2DNode33 = tex2D( _EmissionMap, uv_EmissionMap ); o.Albedo = ( temp_output_3_0 + lerpResult90 ).rgb; o.Normal = tex2DNode13; half3 Specular = half3( 0, 0, 0 ); half Metallic = temp_output_7_0; half Smoothness = temp_output_10_0; half Occlusion = 1; #if defined(ASE_LIGHTING_SIMPLE) o.Specular = Specular.x; o.Gloss = Smoothness; #else #if defined(_SPECULAR_SETUP) o.Specular = Specular; #else o.Metallic = Metallic; #endif o.Occlusion = Occlusion; o.Smoothness = Smoothness; #endif o.Emission = ( _EmissionColor * ( _EmissionMultiplayer * (( _EmissionSwitch )?( ( temp_output_3_0 * tex2DNode33.a ) ):( tex2DNode33 )) ) ).rgb; o.Alpha = 1; half AlphaClipThreshold = 0.5; half3 BakedGI = 0; #if defined( ASE_DEPTH_WRITE_ON ) float DeviceDepth = IN.pos.z; #endif #if ( ASE_FRAGMENT_NORMAL == 0 ) o.Normal = normalize( o.Normal.x * TangentWS + o.Normal.y * BitangentWS + o.Normal.z * NormalWS ); #elif ( ASE_FRAGMENT_NORMAL == 1 ) o.Normal = UnityObjectToWorldNormal( o.Normal ); #elif ( ASE_FRAGMENT_NORMAL == 2 ) // @diogo: already in world-space; do nothing #endif #ifdef _ALPHATEST_ON clip( o.Alpha - AlphaClipThreshold ); #endif #if defined( ASE_DEPTH_WRITE_ON ) outputDepth = DeviceDepth; #endif #ifndef USING_DIRECTIONAL_LIGHT half3 lightDir = normalize( UnityWorldSpaceLightDir( PositionWS ) ); #else half3 lightDir = _WorldSpaceLightPos0.xyz; #endif UnityGI gi; UNITY_INITIALIZE_OUTPUT(UnityGI, gi); gi.indirect.diffuse = 0; gi.indirect.specular = 0; gi.light.color = 0; gi.light.dir = half3( 0, 1, 0 ); UnityGIInput giInput; UNITY_INITIALIZE_OUTPUT(UnityGIInput, giInput); giInput.light = gi.light; giInput.worldPos = PositionWS; giInput.worldViewDir = ViewDirWS; giInput.atten = 1; #if defined(LIGHTMAP_ON) || defined(DYNAMICLIGHTMAP_ON) giInput.lightmapUV = IN.ambientOrLightmapUV; #else giInput.lightmapUV = 0.0; #endif #if UNITY_SHOULD_SAMPLE_SH && !UNITY_SAMPLE_FULL_SH_PER_PIXEL giInput.ambient = IN.ambientOrLightmapUV.rgb; #else giInput.ambient.rgb = 0.0; #endif giInput.probeHDR[0] = unity_SpecCube0_HDR; giInput.probeHDR[1] = unity_SpecCube1_HDR; #if defined(UNITY_SPECCUBE_BLENDING) || defined(UNITY_SPECCUBE_BOX_PROJECTION) giInput.boxMin[0] = unity_SpecCube0_BoxMin; #endif #ifdef UNITY_SPECCUBE_BOX_PROJECTION giInput.boxMax[0] = unity_SpecCube0_BoxMax; giInput.probePosition[0] = unity_SpecCube0_ProbePosition; giInput.boxMax[1] = unity_SpecCube1_BoxMax; giInput.boxMin[1] = unity_SpecCube1_BoxMin; giInput.probePosition[1] = unity_SpecCube1_ProbePosition; #endif #if defined(ASE_LIGHTING_SIMPLE) #if defined(_SPECULAR_SETUP) LightingBlinnPhong_GI(o, giInput, gi); #else LightingLambert_GI(o, giInput, gi); #endif #else #if defined(_SPECULAR_SETUP) LightingStandardSpecular_GI(o, giInput, gi); #else LightingStandard_GI(o, giInput, gi); #endif #endif #ifdef ASE_BAKEDGI gi.indirect.diffuse = BakedGI; #endif #if UNITY_SHOULD_SAMPLE_SH && !defined(LIGHTMAP_ON) && defined(ASE_NO_AMBIENT) gi.indirect.diffuse = 0; #endif #if defined(ASE_LIGHTING_SIMPLE) #if defined(_SPECULAR_SETUP) outEmission = LightingBlinnPhong_Deferred( o, ViewDirWS, gi, outGBuffer0, outGBuffer1, outGBuffer2 ); #else outEmission = LightingLambert_Deferred( o, gi, outGBuffer0, outGBuffer1, outGBuffer2 ); #endif #else #if defined(_SPECULAR_SETUP) outEmission = LightingStandardSpecular_Deferred( o, ViewDirWS, gi, outGBuffer0, outGBuffer1, outGBuffer2 ); #else outEmission = LightingStandard_Deferred( o, ViewDirWS, gi, outGBuffer0, outGBuffer1, outGBuffer2 ); #endif #endif #if defined(SHADOWS_SHADOWMASK) && (UNITY_ALLOWED_MRT_COUNT > 4) outShadowMask = UnityGetRawBakedOcclusions( IN.ambientOrLightmapUV.xy, float3( 0, 0, 0 ) ); #endif #ifndef UNITY_HDR_ON outEmission.rgb = exp2(-outEmission.rgb); #endif } ENDCG } Pass { Name "Meta" Tags { "LightMode"="Meta" } Cull Off CGPROGRAM #define ASE_GEOMETRY 1 #define ASE_FRAGMENT_NORMAL 0 #define ASE_RECEIVE_SHADOWS #pragma multi_compile_instancing #pragma multi_compile _ LOD_FADE_CROSSFADE #define ASE_FOG #define ASE_VERSION 19903 #pragma vertex vert #pragma fragment frag #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #pragma shader_feature EDITOR_VISUALIZATION #ifndef UNITY_PASS_META #define UNITY_PASS_META #endif #include "HLSLSupport.cginc" #ifdef ASE_GEOMETRY #ifndef UNITY_INSTANCED_LOD_FADE #define UNITY_INSTANCED_LOD_FADE #endif #ifndef UNITY_INSTANCED_SH #define UNITY_INSTANCED_SH #endif #ifndef UNITY_INSTANCED_LIGHTMAPSTS #define UNITY_INSTANCED_LIGHTMAPSTS #endif #endif #include "UnityShaderVariables.cginc" #include "UnityCG.cginc" #include "Lighting.cginc" #include "UnityPBSLighting.cginc" #include "UnityMetaPass.cginc" #include "UnityStandardUtils.cginc" #define ASE_NEEDS_TEXTURE_COORDINATES0 #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 #define ASE_NEEDS_VERT_TANGENT #define ASE_NEEDS_VERT_NORMAL struct appdata { float4 vertex : POSITION; half3 normal : NORMAL; half4 tangent : TANGENT; float4 texcoord : TEXCOORD0; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct v2f { float4 pos : SV_POSITION; #ifdef EDITOR_VISUALIZATION float2 vizUV : TEXCOORD0; float4 lightCoord : TEXCOORD1; #endif float4 ase_texcoord2 : TEXCOORD2; float4 ase_texcoord3 : TEXCOORD3; float4 ase_texcoord4 : TEXCOORD4; float4 ase_texcoord5 : TEXCOORD5; float4 ase_texcoord6 : TEXCOORD6; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif uniform sampler2D _Albedo; uniform float4 _Albedo_ST; uniform float4 _AlbedoColor; uniform samplerCUBE _CubemapBlured; uniform sampler2D _NormalMap; uniform float4 _NormalMap_ST; uniform float _NormalMapDepth; uniform samplerCUBE _Cubmap; uniform float _SmoothRough; uniform float _SmoothFromMapSwitch; uniform sampler2D _MetallicMap; uniform float4 _MetallicMap_ST; uniform sampler2D _SmoothnessMap; uniform float4 _SmoothnessMap_ST; uniform float _Snoothness; uniform float4 _CubemapColor; uniform float _Metallic; uniform float _MetalicBrightnes; uniform float4 _EmissionColor; uniform float _EmissionMultiplayer; uniform float _EmissionSwitch; uniform sampler2D _EmissionMap; uniform float4 _EmissionMap_ST; v2f VertexFunction( appdata v ) { UNITY_SETUP_INSTANCE_ID(v); v2f o; UNITY_INITIALIZE_OUTPUT(v2f,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); float3 ase_tangentWS = UnityObjectToWorldDir( v.tangent ); o.ase_texcoord3.xyz = ase_tangentWS; float3 ase_normalWS = UnityObjectToWorldNormal( v.normal ); o.ase_texcoord4.xyz = ase_normalWS; float ase_tangentSign = v.tangent.w * ( unity_WorldTransformParams.w >= 0.0 ? 1.0 : -1.0 ); float3 ase_bitangentWS = cross( ase_normalWS, ase_tangentWS ) * ase_tangentSign; o.ase_texcoord5.xyz = ase_bitangentWS; float3 ase_positionWS = mul( unity_ObjectToWorld, float4( ( v.vertex ).xyz, 1 ) ).xyz; o.ase_texcoord6.xyz = ase_positionWS; o.ase_texcoord2.xyz = v.texcoord.xyzw.xyz; //setting value to unused interpolator channels and avoid initialization warnings o.ase_texcoord2.w = 0; o.ase_texcoord3.w = 0; o.ase_texcoord4.w = 0; o.ase_texcoord5.w = 0; o.ase_texcoord6.w = 0; #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.vertex.w = 1; v.normal = v.normal; v.tangent = v.tangent; #ifdef EDITOR_VISUALIZATION o.vizUV = 0; o.lightCoord = 0; if (unity_VisualizationMode == EDITORVIZ_TEXTURE) o.vizUV = UnityMetaVizUV(unity_EditorViz_UVIndex, v.texcoord.xy, v.texcoord1.xy, v.texcoord2.xy, unity_EditorViz_Texture_ST); else if (unity_VisualizationMode == EDITORVIZ_SHOWLIGHTMASK) { o.vizUV = v.texcoord1.xy * unity_LightmapST.xy + unity_LightmapST.zw; o.lightCoord = mul(unity_EditorViz_WorldToLight, mul(unity_ObjectToWorld, float4(v.vertex.xyz, 1))); } #endif o.pos = UnityMetaVertexPosition(v.vertex, v.texcoord1.xy, v.texcoord2.xy, unity_LightmapST, unity_DynamicLightmapST); return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; float4 tangent : TANGENT; float3 normal : NORMAL; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( appdata v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; 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(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, UNITY_MATRIX_M, _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [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")] v2f DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { appdata o = (appdata) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.tangent = patch[0].tangent * bary.x + patch[1].tangent * bary.y + patch[2].tangent * bary.z; o.normal = patch[0].normal * bary.x + patch[1].normal * bary.y + patch[2].normal * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.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] = o.vertex.xyz - patch[i].normal * (dot(o.vertex.xyz, patch[i].normal) - dot(patch[i].vertex.xyz, patch[i].normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else v2f vert( appdata v ) { return VertexFunction( v ); } #endif half4 frag( v2f IN ) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); #ifdef LOD_FADE_CROSSFADE UNITY_APPLY_DITHER_CROSSFADE(IN.pos.xy); #endif #if defined(ASE_LIGHTING_SIMPLE) SurfaceOutput o = (SurfaceOutput)0; #else #if defined(_SPECULAR_SETUP) SurfaceOutputStandardSpecular o = (SurfaceOutputStandardSpecular)0; #else SurfaceOutputStandard o = (SurfaceOutputStandard)0; #endif #endif float2 uv_Albedo = IN.ase_texcoord2.xyz.xy * _Albedo_ST.xy + _Albedo_ST.zw; float4 tex2DNode1 = tex2D( _Albedo, uv_Albedo ); float4 temp_output_3_0 = ( tex2DNode1 * _AlbedoColor ); float2 uv_NormalMap = IN.ase_texcoord2.xyz.xy * _NormalMap_ST.xy + _NormalMap_ST.zw; float3 tex2DNode13 = UnpackScaleNormal( tex2D( _NormalMap, uv_NormalMap ), _NormalMapDepth ); float3 ase_tangentWS = IN.ase_texcoord3.xyz; float3 ase_normalWS = IN.ase_texcoord4.xyz; float3 ase_bitangentWS = IN.ase_texcoord5.xyz; float3 tanToWorld0 = float3( ase_tangentWS.x, ase_bitangentWS.x, ase_normalWS.x ); float3 tanToWorld1 = float3( ase_tangentWS.y, ase_bitangentWS.y, ase_normalWS.y ); float3 tanToWorld2 = float3( ase_tangentWS.z, ase_bitangentWS.z, ase_normalWS.z ); float3 ase_positionWS = IN.ase_texcoord6.xyz; float3 ase_viewVectorWS = ( _WorldSpaceCameraPos.xyz - ase_positionWS ); float3 ase_viewDirWS = normalize( ase_viewVectorWS ); float3 worldRefl69 = reflect( -ase_viewDirWS, float3( dot( tanToWorld0, tex2DNode13 ), dot( tanToWorld1, tex2DNode13 ), dot( tanToWorld2, tex2DNode13 ) ) ); float2 uv_MetallicMap = IN.ase_texcoord2.xyz.xy * _MetallicMap_ST.xy + _MetallicMap_ST.zw; float4 tex2DNode5 = tex2D( _MetallicMap, uv_MetallicMap ); float2 uv_SmoothnessMap = IN.ase_texcoord2.xyz.xy * _SmoothnessMap_ST.xy + _SmoothnessMap_ST.zw; float3 linearToGamma103 = LinearToGammaSpace( tex2D( _SmoothnessMap, uv_SmoothnessMap ).rgb ); float temp_output_10_0 = ( (( _SmoothRough )?( ( 1.0 - (( _SmoothFromMapSwitch )?( linearToGamma103.z ):( tex2DNode5.a )) ) ):( (( _SmoothFromMapSwitch )?( linearToGamma103.z ):( tex2DNode5.a )) )) * _Snoothness ); float4 lerpResult87 = lerp( texCUBE( _CubemapBlured, worldRefl69 ) , texCUBE( _Cubmap, worldRefl69 ) , temp_output_10_0); float4 temp_output_71_0 = ( lerpResult87 * _CubemapColor ); float3 linearToGamma105 = LinearToGammaSpace( tex2DNode5.rgb ); float lerpResult93 = lerp( linearToGamma105.x , 1.0 , _MetalicBrightnes); float temp_output_7_0 = ( _Metallic * lerpResult93 ); float4 lerpResult90 = lerp( ( temp_output_71_0 * saturate( temp_output_10_0 ) ) , ( temp_output_71_0 * temp_output_3_0 ) , temp_output_7_0); float2 uv_EmissionMap = IN.ase_texcoord2.xyz.xy * _EmissionMap_ST.xy + _EmissionMap_ST.zw; float4 tex2DNode33 = tex2D( _EmissionMap, uv_EmissionMap ); o.Albedo = ( temp_output_3_0 + lerpResult90 ).rgb; o.Normal = half3( 0, 0, 1 ); o.Emission = ( _EmissionColor * ( _EmissionMultiplayer * (( _EmissionSwitch )?( ( temp_output_3_0 * tex2DNode33.a ) ):( tex2DNode33 )) ) ).rgb; o.Alpha = 1; half AlphaClipThreshold = 0.5; #ifdef _ALPHATEST_ON clip( o.Alpha - AlphaClipThreshold ); #endif UnityMetaInput metaIN; UNITY_INITIALIZE_OUTPUT(UnityMetaInput, metaIN); metaIN.Albedo = o.Albedo; metaIN.Emission = o.Emission; #ifdef EDITOR_VISUALIZATION metaIN.VizUV = IN.vizUV; metaIN.LightCoord = IN.lightCoord; #endif return UnityMetaFragment(metaIN); } ENDCG } Pass { Name "ShadowCaster" Tags { "LightMode"="ShadowCaster" } ZWrite On ZTest LEqual AlphaToMask Off CGPROGRAM #define ASE_GEOMETRY 1 #define ASE_FRAGMENT_NORMAL 0 #define ASE_RECEIVE_SHADOWS #pragma multi_compile_instancing #pragma multi_compile _ LOD_FADE_CROSSFADE #define ASE_FOG #define ASE_VERSION 19903 #pragma vertex vert #pragma fragment frag #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 #pragma multi_compile_shadowcaster #ifndef UNITY_PASS_SHADOWCASTER #define UNITY_PASS_SHADOWCASTER #endif #include "HLSLSupport.cginc" #ifdef ASE_GEOMETRY #ifndef UNITY_INSTANCED_LOD_FADE #define UNITY_INSTANCED_LOD_FADE #endif #ifndef UNITY_INSTANCED_SH #define UNITY_INSTANCED_SH #endif #ifndef UNITY_INSTANCED_LIGHTMAPSTS #define UNITY_INSTANCED_LIGHTMAPSTS #endif #endif #include "UnityShaderVariables.cginc" #include "UnityCG.cginc" #include "Lighting.cginc" #include "UnityPBSLighting.cginc" struct appdata { float4 vertex : POSITION; half3 normal : NORMAL; half4 tangent : TANGENT; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct v2f { V2F_SHADOW_CASTER; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; #ifdef UNITY_STANDARD_USE_DITHER_MASK sampler3D _DitherMaskLOD; #endif #ifdef ASE_TESSELLATION float _TessPhongStrength; float _TessValue; float _TessMin; float _TessMax; float _TessEdgeLength; float _TessMaxDisp; #endif v2f VertexFunction( appdata v ) { UNITY_SETUP_INSTANCE_ID(v); v2f o; UNITY_INITIALIZE_OUTPUT(v2f,o); UNITY_TRANSFER_INSTANCE_ID(v,o); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); #ifdef ASE_ABSOLUTE_VERTEX_POS float3 defaultVertexValue = v.vertex.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif float3 vertexValue = defaultVertexValue; #ifdef ASE_ABSOLUTE_VERTEX_POS v.vertex.xyz = vertexValue; #else v.vertex.xyz += vertexValue; #endif v.vertex.w = 1; v.normal = v.normal; v.tangent = v.tangent; TRANSFER_SHADOW_CASTER_NORMALOFFSET(o) return o; } #if defined(ASE_TESSELLATION) struct VertexControl { float4 vertex : INTERNALTESSPOS; half4 tangent : TANGENT; half3 normal : NORMAL; float4 texcoord1 : TEXCOORD1; float4 texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct TessellationFactors { float edge[3] : SV_TessFactor; float inside : SV_InsideTessFactor; }; VertexControl vert ( appdata v ) { VertexControl o; UNITY_SETUP_INSTANCE_ID(v); UNITY_TRANSFER_INSTANCE_ID(v, o); o.vertex = v.vertex; o.tangent = v.tangent; o.normal = v.normal; o.texcoord1 = v.texcoord1; o.texcoord2 = v.texcoord2; return o; } TessellationFactors TessellationFunction (InputPatch v) { TessellationFactors o; 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(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, UNITY_MATRIX_M, _WorldSpaceCameraPos ); #elif defined(ASE_LENGTH_TESSELLATION) tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams ); #elif defined(ASE_LENGTH_CULL_TESSELLATION) tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, UNITY_MATRIX_M, _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); #endif o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w; return o; } [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")] v2f DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) { appdata o = (appdata) 0; o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z; o.tangent = patch[0].tangent * bary.x + patch[1].tangent * bary.y + patch[2].tangent * bary.z; o.normal = patch[0].normal * bary.x + patch[1].normal * bary.y + patch[2].normal * bary.z; o.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z; o.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] = o.vertex.xyz - patch[i].normal * (dot(o.vertex.xyz, patch[i].normal) - dot(patch[i].vertex.xyz, patch[i].normal)); float phongStrength = _TessPhongStrength; o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz; #endif UNITY_TRANSFER_INSTANCE_ID(patch[0], o); return VertexFunction(o); } #else v2f vert( appdata v ) { return VertexFunction( v ); } #endif half4 frag( v2f IN #if defined( ASE_DEPTH_WRITE_ON ) , out float outputDepth : SV_Depth #endif ) : SV_Target { UNITY_SETUP_INSTANCE_ID(IN); #ifdef LOD_FADE_CROSSFADE UNITY_APPLY_DITHER_CROSSFADE(IN.pos.xy); #endif #if defined(ASE_LIGHTING_SIMPLE) SurfaceOutput o = (SurfaceOutput)0; #else #if defined(_SPECULAR_SETUP) SurfaceOutputStandardSpecular o = (SurfaceOutputStandardSpecular)0; #else SurfaceOutputStandard o = (SurfaceOutputStandard)0; #endif o.Occlusion = 1; #endif o.Normal = half3( 0, 0, 1 ); o.Alpha = 1; half AlphaClipThreshold = 0.5; half AlphaClipThresholdShadow = 0.5; #if defined( ASE_DEPTH_WRITE_ON ) float DeviceDepth = IN.pos.z; #endif #ifdef _ALPHATEST_SHADOW_ON if (unity_LightShadowBias.z != 0.0) clip(o.Alpha - AlphaClipThresholdShadow); #ifdef _ALPHATEST_ON else clip(o.Alpha - AlphaClipThreshold); #endif #else #ifdef _ALPHATEST_ON clip(o.Alpha - AlphaClipThreshold); #endif #endif #ifdef UNITY_STANDARD_USE_DITHER_MASK half alphaRef = tex3D(_DitherMaskLOD, float3(IN.pos.xy*0.25,o.Alpha*0.9375)).a; clip(alphaRef - 0.01); #endif #if defined( ASE_DEPTH_WRITE_ON ) outputDepth = DeviceDepth; #endif SHADOW_CASTER_FRAGMENT(IN) } ENDCG } } CustomEditor "AmplifyShaderEditor.MaterialInspector" Fallback Off } /*ASEBEGIN Version=19903 Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;6;-1961.9,260.7534;Inherit;True;Property;_SmoothnessMap;SmoothnessMap;20;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.LinearToGammaNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;103;-1611.315,288.9816;Inherit;False;0;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;5;-1775.516,-38.90791;Inherit;True;Property;_MetallicMap;MetallicMap;21;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.BreakToComponentsNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;104;-1383.809,277.0616;Inherit;False;FLOAT3;1;0;FLOAT3;0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15 Node;AmplifyShaderEditor.ToggleSwitchNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;2;-1130.743,191.3664;Float;False;Property;_SmoothFromMapSwitch;SmoothFromMapSwitch;17;0;Create;True;0;0;0;False;0;False;1;True;Create;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;66;-1536.795,-552.9112;Float;False;Property;_NormalMapDepth;NormalMapDepth;24;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;12;-750.9462,311.9731;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;13;-1234.694,-697.3605;Inherit;True;Property;_NormalMap;NormalMap;16;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;True;bump;Auto;True;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;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.WorldReflectionVector, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;69;-897.6703,-872.7013;Inherit;False;False;1;0;FLOAT3;0,0,0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3 Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;9;-461.2012,333.9779;Float;False;Property;_Snoothness;Snoothness;22;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.ToggleSwitchNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;11;-515.8754,163.1064;Float;False;Property;_SmoothRough;Smooth/Rough;19;0;Create;True;0;0;0;False;0;False;0;True;Create;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;10;-196.8749,160.8066;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;86;-428.6443,-1101.225;Inherit;True;Property;_CubemapBlured;CubemapBlured;12;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Cube;False;8;0;SAMPLERCUBE;0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;1;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,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.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;1;-403.4567,-799.6359;Inherit;True;Property;_Albedo;Albedo;8;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.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;4;-406.1573,-598.7033;Float;False;Property;_AlbedoColor;AlbedoColor;10;0;Create;True;0;0;0;False;0;False;1,1,1,1;0.7169812,0.7169812,0.7169812,1;False;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.LinearToGammaNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;105;-1487.305,24.36759;Inherit;False;0;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0 Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;68;-413.7061,-1445.651;Inherit;True;Property;_Cubmap;Cubmap;11;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Cube;False;8;0;SAMPLERCUBE;0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;1;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,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.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;3;0.9208729,-670.8475;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;33;-483.3045,-288.8951;Inherit;True;Property;_EmissionMap;EmissionMap;13;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.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;95;-1387.871,-249.1329;Float;False;Property;_MetalicBrightnes;MetalicBrightnes;25;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;87;-32.05244,-1379.678;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;70;-80.62634,-1197.825;Float;False;Property;_CubemapColor;CubemapColor;9;0;Create;True;0;0;0;False;0;False;0,0,0,1;0,0,0,1;False;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.BreakToComponentsNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;106;-1207.845,1.661224;Inherit;False;FLOAT3;1;0;FLOAT3;0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15 Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;97;-1389.108,-135.8561;Float;False;Constant;_Float0;Float 0;21;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;89;-4.434421,10.70831;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.LerpOp, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;93;-879.5681,-29.05231;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;8;-644.9746,-14.00033;Float;False;Property;_Metallic;Metallic;23;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;34;-4.894272,-515.6068;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;71;193.4309,-1369.369;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.DitheringNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;109;494.5853,290.903;Inherit;False;1;False;4;0;FLOAT;0;False;1;SAMPLER2D;;False;2;FLOAT4;0,0,0,0;False;3;SAMPLERSTATE;;False;1;FLOAT;0 Node;AmplifyShaderEditor.ToggleSwitchNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;32;319.2034,-471.3975;Float;False;Property;_EmissionSwitch;EmissionSwitch;18;0;Create;True;0;0;0;False;0;False;0;True;Create;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;38;278.4175,-630.2753;Float;False;Property;_EmissionMultiplayer;EmissionMultiplayer;15;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;7;-293.0748,8.706559;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;75;202.1891,-764.209;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;92;380.866,-975.7206;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;110;847.2006,-18.05502;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;39;709.4679,-581.6841;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;36;476.2137,-1228.58;Float;False;Property;_EmissionColor;EmissionColor;14;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,1;False;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.LerpOp, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;90;555.6287,-822.0814;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0 Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;108;511.7554,52.36712;Float;False;Property;_TransmissionColor;TransmissionColor;26;0;Create;True;0;0;0;False;0;False;0,0,0,0;1,1,1,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;107;1080.568,171.7845;Float;False;Property;_TranslucencyColor;TranslucencyColor;27;0;Create;True;0;0;0;False;0;False;0,0,0,0;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;74;449.1386,-244.3364;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;37;923.8754,-706.2381;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;112;896.4552,138.6634;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;111;991.6052,-105.3687;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;113;1424,-368;Float;False;False;-1;3;AmplifyShaderEditor.MaterialInspector;0;1;New Amplify Shader;ed95fe726fd7b4644bb42f4d1ddd2bcd;True;ExtraPrePass;0;0;ExtraPrePass;6;False;True;0;1;False;;0;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;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;;False;True;3;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;DisableBatching=False=DisableBatching;True;3;False;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;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=ForwardBase;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;114;1424,-368;Float;False;True;-1;3;AmplifyShaderEditor.MaterialInspector;0;4;ASE/ASE_StandartPlantsT;ed95fe726fd7b4644bb42f4d1ddd2bcd;True;ForwardBase;0;1;ForwardBase;17;False;True;0;1;False;;0;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;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;;False;True;3;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;DisableBatching=False=DisableBatching;True;3;False;0;False;True;1;1;False;;0;False;;0;1;False;;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;False;False;True;1;LightMode=ForwardBase;False;False;0;;0;0;Standard;44;Category;0;0; Instanced Terrain Normals;1;0;Workflow;1;0;Surface;0;0; Blend;0;0; Dither Shadows;1;0;Two Sided;1;0;Alpha Clipping;0;0; Use Shadow Threshold;0;0;Deferred Pass;1;0;Normal Space,InvertActionOnDeselection;0;0;Transmission;0;0; Transmission Shadow;0.5,False,;0;Translucency;0;0; Translucency Strength;1,False,;0; Normal Distortion;0.5,False,;0; Scattering;2,False,;0; Direct;0.9,False,;0; Ambient;0.1,False,;0; Shadow;0.5,False,;0;Cast Shadows;1;0;Receive Shadows;1;0;Receive Specular;2;0;Receive Reflections;2;0;GPU Instancing;1;0;LOD CrossFade;1;0;Built-in Fog;1;0;Ambient Light;1;0;Meta Pass;1;0;Add Pass;1;0;Override Baked GI;0;0;Write Depth;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Disable Batching;0;0;Vertex Position,InvertActionOnDeselection;1;0;0;6;False;True;True;True;True;True;False;;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;115;1424,-368;Float;False;False;-1;3;AmplifyShaderEditor.MaterialInspector;0;1;New Amplify Shader;ed95fe726fd7b4644bb42f4d1ddd2bcd;True;ForwardAdd;0;2;ForwardAdd;0;False;True;0;1;False;;0;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;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;;False;True;3;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;DisableBatching=False=DisableBatching;True;3;False;0;False;True;4;1;False;;1;False;;0;1;False;;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;True;2;False;;False;False;True;1;LightMode=ForwardAdd;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;116;1424,-368;Float;False;False;-1;3;AmplifyShaderEditor.MaterialInspector;0;1;New Amplify Shader;ed95fe726fd7b4644bb42f4d1ddd2bcd;True;Deferred;0;3;Deferred;0;False;True;0;1;False;;0;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;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;;False;True;3;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;DisableBatching=False=DisableBatching;True;3;False;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Deferred;False;False;0;;0;0;Standard;0;False;0 Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;117;1424,-368;Float;False;False;-1;3;AmplifyShaderEditor.MaterialInspector;0;1;New Amplify Shader;ed95fe726fd7b4644bb42f4d1ddd2bcd;True;Meta;0;4;Meta;0;False;True;0;1;False;;0;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;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;;False;True;3;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;DisableBatching=False=DisableBatching;True;3;False;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;118;1424,-368;Float;False;False;-1;3;AmplifyShaderEditor.MaterialInspector;0;1;New Amplify Shader;ed95fe726fd7b4644bb42f4d1ddd2bcd;True;ShadowCaster;0;5;ShadowCaster;0;False;True;0;1;False;;0;False;;0;1;False;;0;False;;True;0;False;;0;False;;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;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;;False;True;3;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;DisableBatching=False=DisableBatching;True;3;False;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;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 WireConnection;103;0;6;0 WireConnection;104;0;103;0 WireConnection;2;0;5;4 WireConnection;2;1;104;2 WireConnection;12;0;2;0 WireConnection;13;5;66;0 WireConnection;69;0;13;0 WireConnection;11;0;2;0 WireConnection;11;1;12;0 WireConnection;10;0;11;0 WireConnection;10;1;9;0 WireConnection;86;1;69;0 WireConnection;105;0;5;0 WireConnection;68;1;69;0 WireConnection;3;0;1;0 WireConnection;3;1;4;0 WireConnection;87;0;86;0 WireConnection;87;1;68;0 WireConnection;87;2;10;0 WireConnection;106;0;105;0 WireConnection;89;0;10;0 WireConnection;93;0;106;0 WireConnection;93;1;97;0 WireConnection;93;2;95;0 WireConnection;34;0;3;0 WireConnection;34;1;33;4 WireConnection;71;0;87;0 WireConnection;71;1;70;0 WireConnection;32;0;33;0 WireConnection;32;1;34;0 WireConnection;7;0;8;0 WireConnection;7;1;93;0 WireConnection;75;0;71;0 WireConnection;75;1;89;0 WireConnection;92;0;71;0 WireConnection;92;1;3;0 WireConnection;110;0;1;4 WireConnection;110;1;109;0 WireConnection;39;0;38;0 WireConnection;39;1;32;0 WireConnection;90;0;75;0 WireConnection;90;1;92;0 WireConnection;90;2;7;0 WireConnection;74;0;3;0 WireConnection;74;1;90;0 WireConnection;37;0;36;0 WireConnection;37;1;39;0 WireConnection;112;0;109;0 WireConnection;112;1;1;4 WireConnection;111;0;1;4 WireConnection;111;1;110;0 WireConnection;114;0;74;0 WireConnection;114;1;13;0 WireConnection;114;4;7;0 WireConnection;114;5;10;0 WireConnection;114;2;37;0 ASEEND*/ //CHKSM=D0AD68E0819F92AD8241F4E3FF7D45C81CD18E73