Files
Cielonos/Assets/External VFXs/BOXOPHOBIC/Atmospheric Height Fog/Demo/Shaders/My Transparent Shader.shader
SoulliesOfficial ef7b479712 initial
2025-11-25 08:19:33 -05:00

1649 lines
76 KiB
GLSL

// Made with Amplify Shader Editor v1.9.9.1
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "Custom/My Transparent Shader"
{
Properties
{
[HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
[HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
[HDR] _Color( "Color", Color ) = ( 1, 0, 0, 0 )
_NoiseScale( "Noise Scale", Float ) = 6
_NoiseSpeed( "Noise Speed", Vector ) = ( 0.5, 0.5, 0, 0 )
_VertexIntensity( "Vertex Intensity", Range( 0, 0.2 ) ) = 0
//_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
[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) = "" {}
[HideInInspector][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 0
}
SubShader
{
LOD 0
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" }
Cull Back
AlphaToMask Off
HLSLINCLUDE
#pragma target 3.0
#pragma prefer_hlslcc gles
// ensure rendering platforms toggle list is visible
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
#ifndef ASE_TESS_FUNCS
#define ASE_TESS_FUNCS
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;
}
#endif //ASE_TESS_FUNCS
ENDHLSL
Pass
{
Name "Forward"
Tags { "LightMode"="UniversalForwardOnly" }
Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
ZWrite Off
ZTest LEqual
Offset 0 , 0
ColorMask RGBA
HLSLPROGRAM
#define _SURFACE_TYPE_TRANSPARENT 1
#pragma multi_compile_local _RECEIVE_SHADOWS_OFF
#define ASE_VERSION 19901
#define ASE_SRP_VERSION 140012
#pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
#pragma multi_compile _ LIGHTMAP_ON
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
#pragma multi_compile_fragment _ DEBUG_DISPLAY
#pragma vertex vert
#pragma fragment frag
#define SHADERPASS SHADERPASS_UNLIT
#if ASE_SRP_VERSION >=140007
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
#endif
#if ASE_SRP_VERSION >=140007
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
#endif
#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"
#if ASE_SRP_VERSION >=140010
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
#endif
#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"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
#if defined(LOD_FADE_CROSSFADE)
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
#endif
#define ASE_NEEDS_VERT_NORMAL
#define ASE_NEEDS_WORLD_POSITION
#define ASE_NEEDS_FRAG_WORLD_POSITION
//Atmospheric Height Fog Defines
//#define AHF_DISABLE_NOISE3D
//#define AHF_DISABLE_DIRECTIONAL
//#define AHF_DISABLE_SKYBOXFOG
//#define AHF_DISABLE_FALLOFF
//#define AHF_DEBUG_WORLDPOS
#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;
float3 normalOS : NORMAL;
float4 texcoord : TEXCOORD0;
float4 texcoord1 : TEXCOORD1;
float4 texcoord2 : TEXCOORD2;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct PackedVaryings
{
ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
float3 positionWS : TEXCOORD0;
#if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX)
half4 fogFactorAndVertexLight : TEXCOORD1;
#endif
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
float4 shadowCoord : TEXCOORD2;
#endif
#if defined(LIGHTMAP_ON)
float4 lightmapUVOrVertexSH : TEXCOORD3;
#endif
#if defined(DYNAMICLIGHTMAP_ON)
float2 dynamicLightmapUV : TEXCOORD4;
#endif
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
CBUFFER_START(UnityPerMaterial)
float4 _Color;
half3 _NoiseSpeed;
half _NoiseScale;
float _VertexIntensity;
#ifdef ASE_TESSELLATION
float _TessPhongStrength;
float _TessValue;
float _TessMin;
float _TessMax;
float _TessEdgeLength;
float _TessMaxDisp;
#endif
CBUFFER_END
half4 AHF_FogColorStart;
half4 AHF_FogColorEnd;
half AHF_FogDistanceStart;
half AHF_FogDistanceEnd;
half AHF_FogDistanceFalloff;
half AHF_FogColorDuo;
half4 AHF_DirectionalColor;
half3 AHF_DirectionalDir;
half AHF_DirectionalIntensity;
half AHF_DirectionalFalloff;
half3 AHF_FogAxisOption;
half AHF_FogHeightEnd;
half AHF_FarDistanceHeight;
float AHF_FarDistanceOffset;
half AHF_FogHeightStart;
half AHF_FogHeightFalloff;
half AHF_FogLayersMode;
half AHF_NoiseScale;
half3 AHF_NoiseSpeed;
half AHF_NoiseMin;
half AHF_NoiseMax;
half AHF_NoiseDistanceEnd;
half AHF_NoiseIntensity;
half AHF_FogIntensity;
float4 mod289( float4 x )
{
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
float4 perm( float4 x )
{
return mod289(((x * 34.0) + 1.0) * x);
}
float SimpleNoise3D( float3 p )
{
float3 a = floor(p);
float3 d = p - a;
d = d * d * (3.0 - 2.0 * d);
float4 b = a.xxyy + float4(0.0, 1.0, 0.0, 1.0);
float4 k1 = perm(b.xyxy);
float4 k2 = perm(k1.xyxy + b.zzww);
float4 c = k2 + a.zzzz;
float4 k3 = perm(c);
float4 k4 = perm(c + 1.0);
float4 o1 = frac(k3 * (1.0 / 41.0));
float4 o2 = frac(k4 * (1.0 / 41.0));
float4 o3 = o2 * d.z + o1 * (1.0 - d.z);
float2 o4 = o3.yw * d.x + o3.xz * (1.0 - d.x);
return o4.y * d.y + o4.x * (1.0 - d.y);
}
float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
float snoise( float3 v )
{
const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
float3 i = floor( v + dot( v, C.yyy ) );
float3 x0 = v - i + dot( i, C.xxx );
float3 g = step( x0.yzx, x0.xyz );
float3 l = 1.0 - g;
float3 i1 = min( g.xyz, l.zxy );
float3 i2 = max( g.xyz, l.zxy );
float3 x1 = x0 - i1 + C.xxx;
float3 x2 = x0 - i2 + C.yyy;
float3 x3 = x0 - 0.5;
i = mod3D289( i);
float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
float4 x_ = floor( j / 7.0 );
float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
float4 h = 1.0 - abs( x ) - abs( y );
float4 b0 = float4( x.xy, y.xy );
float4 b1 = float4( x.zw, y.zw );
float4 s0 = floor( b0 ) * 2.0 + 1.0;
float4 s1 = floor( b1 ) * 2.0 + 1.0;
float4 sh = -step( h, 0.0 );
float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
float3 g0 = float3( a0.xy, h.x );
float3 g1 = float3( a0.zw, h.y );
float3 g2 = float3( a1.xy, h.z );
float3 g3 = float3( a1.zw, h.w );
float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
g0 *= norm.x;
g1 *= norm.y;
g2 *= norm.z;
g3 *= norm.w;
float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
m = m* m;
m = m* m;
float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
return 42.0 * dot( m, px);
}
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);
float3 ase_positionWS = TransformObjectToWorld( ( input.positionOS ).xyz );
float simplePerlin3D27 = snoise( ( ( ase_positionWS * _NoiseScale ) + ( -_NoiseSpeed * _TimeParameters.x ) ) );
#ifdef ASE_ABSOLUTE_VERTEX_POS
float3 defaultVertexValue = input.positionOS.xyz;
#else
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = ( ( simplePerlin3D27 * _VertexIntensity ) * input.normalOS );
#ifdef ASE_ABSOLUTE_VERTEX_POS
input.positionOS.xyz = vertexValue;
#else
input.positionOS.xyz += vertexValue;
#endif
input.normalOS = input.normalOS;
VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
#if defined(LIGHTMAP_ON)
OUTPUT_LIGHTMAP_UV(input.texcoord1, unity_LightmapST, output.lightmapUVOrVertexSH.xy);
#endif
#if defined(DYNAMICLIGHTMAP_ON)
output.dynamicLightmapUV.xy = input.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
#endif
#if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX)
output.fogFactorAndVertexLight = 0;
#if defined(ASE_FOG) && !defined(_FOG_FRAGMENT)
output.fogFactorAndVertexLight.x = ComputeFogFactor(vertexInput.positionCS.z);
#endif
#ifdef _ADDITIONAL_LIGHTS_VERTEX
half3 vertexLight = VertexLighting( vertexInput.positionWS, normalInput.normalWS );
output.fogFactorAndVertexLight.yzw = vertexLight;
#endif
#endif
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
output.shadowCoord = GetShadowCoord( vertexInput );
#endif
output.positionCS = vertexInput.positionCS;
output.positionWS = vertexInput.positionWS;
return output;
}
#if defined(ASE_TESSELLATION)
struct VertexControl
{
float4 positionOS : INTERNALTESSPOS;
float3 normalOS : NORMAL;
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 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;
#if defined(LIGHTMAP_ON) || defined(ASE_NEEDS_TEXTURE_COORDINATES1)
output.texcoord1 = input.texcoord1;
#endif
#if defined(DYNAMICLIGHTMAP_ON) || defined(ASE_NEEDS_TEXTURE_COORDINATES2)
output.texcoord2 = input.texcoord2;
#endif
return output;
}
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> 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<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
{
return patch[id];
}
[domain("tri")]
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> 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;
#if defined(LIGHTMAP_ON) || defined(ASE_NEEDS_TEXTURE_COORDINATES1)
output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
#endif
#if defined(DYNAMICLIGHTMAP_ON) || defined(ASE_NEEDS_TEXTURE_COORDINATES2)
output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z;
#endif
#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
#ifdef ASE_DEPTH_WRITE_ON
,out float outputDepth : ASE_SV_DEPTH
#endif
#ifdef _WRITE_RENDERING_LAYERS
, out float4 outRenderingLayers : SV_Target1
#endif
) : SV_Target
{
UNITY_SETUP_INSTANCE_ID(input);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
#if defined(LOD_FADE_CROSSFADE)
LODFadeCrossFade( input.positionCS );
#endif
float3 WorldPosition = input.positionWS;
float3 WorldViewDirection = GetWorldSpaceNormalizeViewDir( WorldPosition );
float4 ShadowCoords = float4( 0, 0, 0, 0 );
float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw );
float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w;
float4 ScreenPos = ComputeScreenPos( ClipPos );
#if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
ShadowCoords = input.shadowCoord;
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
#endif
#endif
WorldViewDirection = SafeNormalize( WorldViewDirection );
float3 WorldPosition2_g1044 = WorldPosition;
float temp_output_7_0_g1047 = AHF_FogDistanceStart;
float temp_output_155_0_g1044 = saturate( ( ( distance( WorldPosition2_g1044 , _WorldSpaceCameraPos ) - temp_output_7_0_g1047 ) / ( AHF_FogDistanceEnd - temp_output_7_0_g1047 ) ) );
#ifdef AHF_DISABLE_FALLOFF
float staticSwitch467_g1044 = temp_output_155_0_g1044;
#else
float staticSwitch467_g1044 = ( 1.0 - pow( ( 1.0 - abs( temp_output_155_0_g1044 ) ) , AHF_FogDistanceFalloff ) );
#endif
half FogDistanceMask12_g1044 = staticSwitch467_g1044;
float3 lerpResult258_g1044 = lerp( (AHF_FogColorStart).rgb , (AHF_FogColorEnd).rgb , ( ( FogDistanceMask12_g1044 * FogDistanceMask12_g1044 * FogDistanceMask12_g1044 ) * AHF_FogColorDuo ));
float3 normalizeResult318_g1044 = normalize( ( WorldPosition2_g1044 - _WorldSpaceCameraPos ) );
float dotResult145_g1044 = dot( normalizeResult318_g1044 , AHF_DirectionalDir );
half Jitter502_g1044 = 0.0;
float temp_output_140_0_g1044 = ( saturate( (( dotResult145_g1044 + Jitter502_g1044 )*0.5 + 0.5) ) * AHF_DirectionalIntensity );
#ifdef AHF_DISABLE_FALLOFF
float staticSwitch470_g1044 = temp_output_140_0_g1044;
#else
float staticSwitch470_g1044 = pow( abs( temp_output_140_0_g1044 ) , AHF_DirectionalFalloff );
#endif
float DirectionalMask30_g1044 = staticSwitch470_g1044;
float3 lerpResult40_g1044 = lerp( lerpResult258_g1044 , (AHF_DirectionalColor).rgb , DirectionalMask30_g1044);
#ifdef AHF_DISABLE_DIRECTIONAL
float3 staticSwitch442_g1044 = lerpResult258_g1044;
#else
float3 staticSwitch442_g1044 = lerpResult40_g1044;
#endif
half3 Input_Color6_g1045 = staticSwitch442_g1044;
#ifdef UNITY_COLORSPACE_GAMMA
float3 staticSwitch1_g1045 = Input_Color6_g1045;
#else
float3 staticSwitch1_g1045 = ( Input_Color6_g1045 * ( ( Input_Color6_g1045 * ( ( Input_Color6_g1045 * 0.305306 ) + 0.6821711 ) ) + 0.01252288 ) );
#endif
float3 temp_output_256_0_g1044 = staticSwitch1_g1045;
half3 Final_Color462_g1044 = temp_output_256_0_g1044;
half3 AHF_FogAxisOption181_g1044 = AHF_FogAxisOption;
float3 break159_g1044 = ( WorldPosition2_g1044 * AHF_FogAxisOption181_g1044 );
float temp_output_7_0_g1048 = AHF_FogDistanceEnd;
float temp_output_643_0_g1044 = saturate( ( ( distance( WorldPosition2_g1044 , _WorldSpaceCameraPos ) - temp_output_7_0_g1048 ) / ( ( AHF_FogDistanceEnd + AHF_FarDistanceOffset ) - temp_output_7_0_g1048 ) ) );
half FogDistanceMaskFar645_g1044 = ( temp_output_643_0_g1044 * temp_output_643_0_g1044 );
float lerpResult690_g1044 = lerp( AHF_FogHeightEnd , ( AHF_FogHeightEnd + AHF_FarDistanceHeight ) , FogDistanceMaskFar645_g1044);
float temp_output_7_0_g1049 = lerpResult690_g1044;
float temp_output_167_0_g1044 = saturate( ( ( ( break159_g1044.x + break159_g1044.y + break159_g1044.z ) - temp_output_7_0_g1049 ) / ( AHF_FogHeightStart - temp_output_7_0_g1049 ) ) );
#ifdef AHF_DISABLE_FALLOFF
float staticSwitch468_g1044 = temp_output_167_0_g1044;
#else
float staticSwitch468_g1044 = pow( abs( temp_output_167_0_g1044 ) , AHF_FogHeightFalloff );
#endif
half FogHeightMask16_g1044 = staticSwitch468_g1044;
float lerpResult328_g1044 = lerp( ( FogDistanceMask12_g1044 * FogHeightMask16_g1044 ) , saturate( ( FogDistanceMask12_g1044 + FogHeightMask16_g1044 ) ) , AHF_FogLayersMode);
float mulTime204_g1044 = _TimeParameters.x * 2.0;
float3 temp_output_197_0_g1044 = ( ( WorldPosition2_g1044 * ( 1.0 / AHF_NoiseScale ) ) + ( -AHF_NoiseSpeed * mulTime204_g1044 ) );
float3 p1_g1053 = temp_output_197_0_g1044;
float localSimpleNoise3D1_g1053 = SimpleNoise3D( p1_g1053 );
float temp_output_7_0_g1052 = AHF_NoiseMin;
float temp_output_7_0_g1051 = AHF_NoiseDistanceEnd;
half NoiseDistanceMask7_g1044 = saturate( ( ( distance( WorldPosition2_g1044 , _WorldSpaceCameraPos ) - temp_output_7_0_g1051 ) / ( 0.0 - temp_output_7_0_g1051 ) ) );
float lerpResult198_g1044 = lerp( 1.0 , saturate( ( ( localSimpleNoise3D1_g1053 - temp_output_7_0_g1052 ) / ( AHF_NoiseMax - temp_output_7_0_g1052 ) ) ) , ( NoiseDistanceMask7_g1044 * AHF_NoiseIntensity ));
half NoiseSimplex3D24_g1044 = lerpResult198_g1044;
#ifdef AHF_DISABLE_NOISE3D
float staticSwitch42_g1044 = lerpResult328_g1044;
#else
float staticSwitch42_g1044 = ( lerpResult328_g1044 * NoiseSimplex3D24_g1044 );
#endif
float temp_output_454_0_g1044 = ( staticSwitch42_g1044 * AHF_FogIntensity );
half Final_Alpha463_g1044 = temp_output_454_0_g1044;
float4 appendResult114_g1044 = (float4(Final_Color462_g1044 , Final_Alpha463_g1044));
float4 appendResult457_g1044 = (float4(WorldPosition2_g1044 , 1.0));
#ifdef AHF_DEBUG_WORLDPOS
float4 staticSwitch456_g1044 = appendResult457_g1044;
#else
float4 staticSwitch456_g1044 = appendResult114_g1044;
#endif
float3 temp_output_96_86_g1043 = (staticSwitch456_g1044).xyz;
float temp_output_96_87_g1043 = (staticSwitch456_g1044).w;
float3 lerpResult82_g1043 = lerp( saturate( _Color ).rgb , temp_output_96_86_g1043 , temp_output_96_87_g1043);
float3 BakedAlbedo = 0;
float3 BakedEmission = 0;
float3 Color = lerpResult82_g1043;
float Alpha = ( 1.0 - temp_output_96_87_g1043 );
float AlphaClipThreshold = 0.5;
float AlphaClipThresholdShadow = 0.5;
#ifdef ASE_DEPTH_WRITE_ON
float DepthValue = input.positionCS.z;
#endif
#ifdef _ALPHATEST_ON
clip(Alpha - AlphaClipThreshold);
#endif
InputData inputData = (InputData)0;
inputData.positionWS = WorldPosition;
inputData.positionCS = float4( input.positionCS.xy, ClipPos.zw / ClipPos.w );
inputData.normalizedScreenSpaceUV = ScreenPosNorm.xy;
inputData.viewDirectionWS = WorldViewDirection;
#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
#if defined(_DBUFFER)
ApplyDecalToBaseColor(input.positionCS, Color);
#endif
#ifdef ASE_FOG
#ifdef TERRAIN_SPLAT_ADDPASS
Color.rgb = MixFogColor(Color.rgb, half3(0,0,0), inputData.fogCoord);
#else
Color.rgb = MixFog(Color.rgb, inputData.fogCoord);
#endif
#endif
#ifdef ASE_DEPTH_WRITE_ON
outputDepth = DepthValue;
#endif
#ifdef _WRITE_RENDERING_LAYERS
uint renderingLayers = GetMeshRenderingLayer();
outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 );
#endif
return half4( Color, Alpha );
}
ENDHLSL
}
Pass
{
Name "SceneSelectionPass"
Tags { "LightMode"="SceneSelectionPass" }
Cull Off
AlphaToMask Off
HLSLPROGRAM
#define _SURFACE_TYPE_TRANSPARENT 1
#define ASE_VERSION 19901
#define ASE_SRP_VERSION 140012
#pragma vertex vert
#pragma fragment frag
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define SHADERPASS SHADERPASS_DEPTHONLY
#if ASE_SRP_VERSION >=140007
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
#endif
#if ASE_SRP_VERSION >=140007
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
#endif
#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.core/ShaderLibrary/TextureStack.hlsl"
#if ASE_SRP_VERSION >=140010
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
#endif
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
#define ASE_NEEDS_VERT_NORMAL
//Atmospheric Height Fog Defines
//#define AHF_DISABLE_NOISE3D
//#define AHF_DISABLE_DIRECTIONAL
//#define AHF_DISABLE_SKYBOXFOG
//#define AHF_DISABLE_FALLOFF
//#define AHF_DEBUG_WORLDPOS
struct Attributes
{
float4 positionOS : POSITION;
float3 normalOS : NORMAL;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 ase_texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
CBUFFER_START(UnityPerMaterial)
float4 _Color;
half3 _NoiseSpeed;
half _NoiseScale;
float _VertexIntensity;
#ifdef ASE_TESSELLATION
float _TessPhongStrength;
float _TessValue;
float _TessMin;
float _TessMax;
float _TessEdgeLength;
float _TessMaxDisp;
#endif
CBUFFER_END
half4 AHF_FogColorStart;
half4 AHF_FogColorEnd;
half AHF_FogDistanceStart;
half AHF_FogDistanceEnd;
half AHF_FogDistanceFalloff;
half AHF_FogColorDuo;
half4 AHF_DirectionalColor;
half3 AHF_DirectionalDir;
half AHF_DirectionalIntensity;
half AHF_DirectionalFalloff;
half3 AHF_FogAxisOption;
half AHF_FogHeightEnd;
half AHF_FarDistanceHeight;
float AHF_FarDistanceOffset;
half AHF_FogHeightStart;
half AHF_FogHeightFalloff;
half AHF_FogLayersMode;
half AHF_NoiseScale;
half3 AHF_NoiseSpeed;
half AHF_NoiseMin;
half AHF_NoiseMax;
half AHF_NoiseDistanceEnd;
half AHF_NoiseIntensity;
half AHF_FogIntensity;
float4 mod289( float4 x )
{
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
float4 perm( float4 x )
{
return mod289(((x * 34.0) + 1.0) * x);
}
float SimpleNoise3D( float3 p )
{
float3 a = floor(p);
float3 d = p - a;
d = d * d * (3.0 - 2.0 * d);
float4 b = a.xxyy + float4(0.0, 1.0, 0.0, 1.0);
float4 k1 = perm(b.xyxy);
float4 k2 = perm(k1.xyxy + b.zzww);
float4 c = k2 + a.zzzz;
float4 k3 = perm(c);
float4 k4 = perm(c + 1.0);
float4 o1 = frac(k3 * (1.0 / 41.0));
float4 o2 = frac(k4 * (1.0 / 41.0));
float4 o3 = o2 * d.z + o1 * (1.0 - d.z);
float2 o4 = o3.yw * d.x + o3.xz * (1.0 - d.x);
return o4.y * d.y + o4.x * (1.0 - d.y);
}
float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
float snoise( float3 v )
{
const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
float3 i = floor( v + dot( v, C.yyy ) );
float3 x0 = v - i + dot( i, C.xxx );
float3 g = step( x0.yzx, x0.xyz );
float3 l = 1.0 - g;
float3 i1 = min( g.xyz, l.zxy );
float3 i2 = max( g.xyz, l.zxy );
float3 x1 = x0 - i1 + C.xxx;
float3 x2 = x0 - i2 + C.yyy;
float3 x3 = x0 - 0.5;
i = mod3D289( i);
float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
float4 x_ = floor( j / 7.0 );
float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
float4 h = 1.0 - abs( x ) - abs( y );
float4 b0 = float4( x.xy, y.xy );
float4 b1 = float4( x.zw, y.zw );
float4 s0 = floor( b0 ) * 2.0 + 1.0;
float4 s1 = floor( b1 ) * 2.0 + 1.0;
float4 sh = -step( h, 0.0 );
float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
float3 g0 = float3( a0.xy, h.x );
float3 g1 = float3( a0.zw, h.y );
float3 g2 = float3( a1.xy, h.z );
float3 g3 = float3( a1.zw, h.w );
float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
g0 *= norm.x;
g1 *= norm.y;
g2 *= norm.z;
g3 *= norm.w;
float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
m = m* m;
m = m* m;
float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
return 42.0 * dot( m, px);
}
int _ObjectId;
int _PassValue;
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
PackedVaryings VertexFunction(Attributes input )
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float3 ase_positionWS = TransformObjectToWorld( ( input.positionOS ).xyz );
float simplePerlin3D27 = snoise( ( ( ase_positionWS * _NoiseScale ) + ( -_NoiseSpeed * _TimeParameters.x ) ) );
output.ase_texcoord.xyz = ase_positionWS;
//setting value to unused interpolator channels and avoid initialization warnings
output.ase_texcoord.w = 0;
#ifdef ASE_ABSOLUTE_VERTEX_POS
float3 defaultVertexValue = input.positionOS.xyz;
#else
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = ( ( simplePerlin3D27 * _VertexIntensity ) * input.normalOS );
#ifdef ASE_ABSOLUTE_VERTEX_POS
input.positionOS.xyz = vertexValue;
#else
input.positionOS.xyz += vertexValue;
#endif
input.normalOS = input.normalOS;
float3 positionWS = TransformObjectToWorld( input.positionOS.xyz );
output.positionCS = TransformWorldToHClip(positionWS);
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<VertexControl,3> 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<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
{
return patch[id];
}
[domain("tri")]
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> 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
{
SurfaceDescription surfaceDescription = (SurfaceDescription)0;
float3 ase_positionWS = input.ase_texcoord.xyz;
float3 WorldPosition2_g1044 = ase_positionWS;
float temp_output_7_0_g1047 = AHF_FogDistanceStart;
float temp_output_155_0_g1044 = saturate( ( ( distance( WorldPosition2_g1044 , _WorldSpaceCameraPos ) - temp_output_7_0_g1047 ) / ( AHF_FogDistanceEnd - temp_output_7_0_g1047 ) ) );
#ifdef AHF_DISABLE_FALLOFF
float staticSwitch467_g1044 = temp_output_155_0_g1044;
#else
float staticSwitch467_g1044 = ( 1.0 - pow( ( 1.0 - abs( temp_output_155_0_g1044 ) ) , AHF_FogDistanceFalloff ) );
#endif
half FogDistanceMask12_g1044 = staticSwitch467_g1044;
float3 lerpResult258_g1044 = lerp( (AHF_FogColorStart).rgb , (AHF_FogColorEnd).rgb , ( ( FogDistanceMask12_g1044 * FogDistanceMask12_g1044 * FogDistanceMask12_g1044 ) * AHF_FogColorDuo ));
float3 normalizeResult318_g1044 = normalize( ( WorldPosition2_g1044 - _WorldSpaceCameraPos ) );
float dotResult145_g1044 = dot( normalizeResult318_g1044 , AHF_DirectionalDir );
half Jitter502_g1044 = 0.0;
float temp_output_140_0_g1044 = ( saturate( (( dotResult145_g1044 + Jitter502_g1044 )*0.5 + 0.5) ) * AHF_DirectionalIntensity );
#ifdef AHF_DISABLE_FALLOFF
float staticSwitch470_g1044 = temp_output_140_0_g1044;
#else
float staticSwitch470_g1044 = pow( abs( temp_output_140_0_g1044 ) , AHF_DirectionalFalloff );
#endif
float DirectionalMask30_g1044 = staticSwitch470_g1044;
float3 lerpResult40_g1044 = lerp( lerpResult258_g1044 , (AHF_DirectionalColor).rgb , DirectionalMask30_g1044);
#ifdef AHF_DISABLE_DIRECTIONAL
float3 staticSwitch442_g1044 = lerpResult258_g1044;
#else
float3 staticSwitch442_g1044 = lerpResult40_g1044;
#endif
half3 Input_Color6_g1045 = staticSwitch442_g1044;
#ifdef UNITY_COLORSPACE_GAMMA
float3 staticSwitch1_g1045 = Input_Color6_g1045;
#else
float3 staticSwitch1_g1045 = ( Input_Color6_g1045 * ( ( Input_Color6_g1045 * ( ( Input_Color6_g1045 * 0.305306 ) + 0.6821711 ) ) + 0.01252288 ) );
#endif
float3 temp_output_256_0_g1044 = staticSwitch1_g1045;
half3 Final_Color462_g1044 = temp_output_256_0_g1044;
half3 AHF_FogAxisOption181_g1044 = AHF_FogAxisOption;
float3 break159_g1044 = ( WorldPosition2_g1044 * AHF_FogAxisOption181_g1044 );
float temp_output_7_0_g1048 = AHF_FogDistanceEnd;
float temp_output_643_0_g1044 = saturate( ( ( distance( WorldPosition2_g1044 , _WorldSpaceCameraPos ) - temp_output_7_0_g1048 ) / ( ( AHF_FogDistanceEnd + AHF_FarDistanceOffset ) - temp_output_7_0_g1048 ) ) );
half FogDistanceMaskFar645_g1044 = ( temp_output_643_0_g1044 * temp_output_643_0_g1044 );
float lerpResult690_g1044 = lerp( AHF_FogHeightEnd , ( AHF_FogHeightEnd + AHF_FarDistanceHeight ) , FogDistanceMaskFar645_g1044);
float temp_output_7_0_g1049 = lerpResult690_g1044;
float temp_output_167_0_g1044 = saturate( ( ( ( break159_g1044.x + break159_g1044.y + break159_g1044.z ) - temp_output_7_0_g1049 ) / ( AHF_FogHeightStart - temp_output_7_0_g1049 ) ) );
#ifdef AHF_DISABLE_FALLOFF
float staticSwitch468_g1044 = temp_output_167_0_g1044;
#else
float staticSwitch468_g1044 = pow( abs( temp_output_167_0_g1044 ) , AHF_FogHeightFalloff );
#endif
half FogHeightMask16_g1044 = staticSwitch468_g1044;
float lerpResult328_g1044 = lerp( ( FogDistanceMask12_g1044 * FogHeightMask16_g1044 ) , saturate( ( FogDistanceMask12_g1044 + FogHeightMask16_g1044 ) ) , AHF_FogLayersMode);
float mulTime204_g1044 = _TimeParameters.x * 2.0;
float3 temp_output_197_0_g1044 = ( ( WorldPosition2_g1044 * ( 1.0 / AHF_NoiseScale ) ) + ( -AHF_NoiseSpeed * mulTime204_g1044 ) );
float3 p1_g1053 = temp_output_197_0_g1044;
float localSimpleNoise3D1_g1053 = SimpleNoise3D( p1_g1053 );
float temp_output_7_0_g1052 = AHF_NoiseMin;
float temp_output_7_0_g1051 = AHF_NoiseDistanceEnd;
half NoiseDistanceMask7_g1044 = saturate( ( ( distance( WorldPosition2_g1044 , _WorldSpaceCameraPos ) - temp_output_7_0_g1051 ) / ( 0.0 - temp_output_7_0_g1051 ) ) );
float lerpResult198_g1044 = lerp( 1.0 , saturate( ( ( localSimpleNoise3D1_g1053 - temp_output_7_0_g1052 ) / ( AHF_NoiseMax - temp_output_7_0_g1052 ) ) ) , ( NoiseDistanceMask7_g1044 * AHF_NoiseIntensity ));
half NoiseSimplex3D24_g1044 = lerpResult198_g1044;
#ifdef AHF_DISABLE_NOISE3D
float staticSwitch42_g1044 = lerpResult328_g1044;
#else
float staticSwitch42_g1044 = ( lerpResult328_g1044 * NoiseSimplex3D24_g1044 );
#endif
float temp_output_454_0_g1044 = ( staticSwitch42_g1044 * AHF_FogIntensity );
half Final_Alpha463_g1044 = temp_output_454_0_g1044;
float4 appendResult114_g1044 = (float4(Final_Color462_g1044 , Final_Alpha463_g1044));
float4 appendResult457_g1044 = (float4(WorldPosition2_g1044 , 1.0));
#ifdef AHF_DEBUG_WORLDPOS
float4 staticSwitch456_g1044 = appendResult457_g1044;
#else
float4 staticSwitch456_g1044 = appendResult114_g1044;
#endif
float temp_output_96_87_g1043 = (staticSwitch456_g1044).w;
surfaceDescription.Alpha = ( 1.0 - temp_output_96_87_g1043 );
surfaceDescription.AlphaClipThreshold = 0.5;
#if _ALPHATEST_ON
float alphaClipThreshold = 0.01f;
#if ALPHA_CLIP_THRESHOLD
alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
#endif
clip(surfaceDescription.Alpha - alphaClipThreshold);
#endif
half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
return outColor;
}
ENDHLSL
}
Pass
{
Name "ScenePickingPass"
Tags { "LightMode"="Picking" }
AlphaToMask Off
HLSLPROGRAM
#define _SURFACE_TYPE_TRANSPARENT 1
#define ASE_VERSION 19901
#define ASE_SRP_VERSION 140012
#pragma vertex vert
#pragma fragment frag
#define ATTRIBUTES_NEED_NORMAL
#define ATTRIBUTES_NEED_TANGENT
#define SHADERPASS SHADERPASS_DEPTHONLY
#if ASE_SRP_VERSION >=140007
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
#endif
#if ASE_SRP_VERSION >=140007
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
#endif
#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.core/ShaderLibrary/TextureStack.hlsl"
#if ASE_SRP_VERSION >=140010
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
#endif
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.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
#define ASE_NEEDS_VERT_NORMAL
//Atmospheric Height Fog Defines
//#define AHF_DISABLE_NOISE3D
//#define AHF_DISABLE_DIRECTIONAL
//#define AHF_DISABLE_SKYBOXFOG
//#define AHF_DISABLE_FALLOFF
//#define AHF_DEBUG_WORLDPOS
struct Attributes
{
float4 positionOS : POSITION;
float3 normalOS : NORMAL;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct PackedVaryings
{
float4 positionCS : SV_POSITION;
float4 ase_texcoord : TEXCOORD0;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
};
CBUFFER_START(UnityPerMaterial)
float4 _Color;
half3 _NoiseSpeed;
half _NoiseScale;
float _VertexIntensity;
#ifdef ASE_TESSELLATION
float _TessPhongStrength;
float _TessValue;
float _TessMin;
float _TessMax;
float _TessEdgeLength;
float _TessMaxDisp;
#endif
CBUFFER_END
half4 AHF_FogColorStart;
half4 AHF_FogColorEnd;
half AHF_FogDistanceStart;
half AHF_FogDistanceEnd;
half AHF_FogDistanceFalloff;
half AHF_FogColorDuo;
half4 AHF_DirectionalColor;
half3 AHF_DirectionalDir;
half AHF_DirectionalIntensity;
half AHF_DirectionalFalloff;
half3 AHF_FogAxisOption;
half AHF_FogHeightEnd;
half AHF_FarDistanceHeight;
float AHF_FarDistanceOffset;
half AHF_FogHeightStart;
half AHF_FogHeightFalloff;
half AHF_FogLayersMode;
half AHF_NoiseScale;
half3 AHF_NoiseSpeed;
half AHF_NoiseMin;
half AHF_NoiseMax;
half AHF_NoiseDistanceEnd;
half AHF_NoiseIntensity;
half AHF_FogIntensity;
float4 mod289( float4 x )
{
return x - floor(x * (1.0 / 289.0)) * 289.0;
}
float4 perm( float4 x )
{
return mod289(((x * 34.0) + 1.0) * x);
}
float SimpleNoise3D( float3 p )
{
float3 a = floor(p);
float3 d = p - a;
d = d * d * (3.0 - 2.0 * d);
float4 b = a.xxyy + float4(0.0, 1.0, 0.0, 1.0);
float4 k1 = perm(b.xyxy);
float4 k2 = perm(k1.xyxy + b.zzww);
float4 c = k2 + a.zzzz;
float4 k3 = perm(c);
float4 k4 = perm(c + 1.0);
float4 o1 = frac(k3 * (1.0 / 41.0));
float4 o2 = frac(k4 * (1.0 / 41.0));
float4 o3 = o2 * d.z + o1 * (1.0 - d.z);
float2 o4 = o3.yw * d.x + o3.xz * (1.0 - d.x);
return o4.y * d.y + o4.x * (1.0 - d.y);
}
float3 mod3D289( float3 x ) { return x - floor( x / 289.0 ) * 289.0; }
float4 mod3D289( float4 x ) { return x - floor( x / 289.0 ) * 289.0; }
float4 permute( float4 x ) { return mod3D289( ( x * 34.0 + 1.0 ) * x ); }
float4 taylorInvSqrt( float4 r ) { return 1.79284291400159 - r * 0.85373472095314; }
float snoise( float3 v )
{
const float2 C = float2( 1.0 / 6.0, 1.0 / 3.0 );
float3 i = floor( v + dot( v, C.yyy ) );
float3 x0 = v - i + dot( i, C.xxx );
float3 g = step( x0.yzx, x0.xyz );
float3 l = 1.0 - g;
float3 i1 = min( g.xyz, l.zxy );
float3 i2 = max( g.xyz, l.zxy );
float3 x1 = x0 - i1 + C.xxx;
float3 x2 = x0 - i2 + C.yyy;
float3 x3 = x0 - 0.5;
i = mod3D289( i);
float4 p = permute( permute( permute( i.z + float4( 0.0, i1.z, i2.z, 1.0 ) ) + i.y + float4( 0.0, i1.y, i2.y, 1.0 ) ) + i.x + float4( 0.0, i1.x, i2.x, 1.0 ) );
float4 j = p - 49.0 * floor( p / 49.0 ); // mod(p,7*7)
float4 x_ = floor( j / 7.0 );
float4 y_ = floor( j - 7.0 * x_ ); // mod(j,N)
float4 x = ( x_ * 2.0 + 0.5 ) / 7.0 - 1.0;
float4 y = ( y_ * 2.0 + 0.5 ) / 7.0 - 1.0;
float4 h = 1.0 - abs( x ) - abs( y );
float4 b0 = float4( x.xy, y.xy );
float4 b1 = float4( x.zw, y.zw );
float4 s0 = floor( b0 ) * 2.0 + 1.0;
float4 s1 = floor( b1 ) * 2.0 + 1.0;
float4 sh = -step( h, 0.0 );
float4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
float4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
float3 g0 = float3( a0.xy, h.x );
float3 g1 = float3( a0.zw, h.y );
float3 g2 = float3( a1.xy, h.z );
float3 g3 = float3( a1.zw, h.w );
float4 norm = taylorInvSqrt( float4( dot( g0, g0 ), dot( g1, g1 ), dot( g2, g2 ), dot( g3, g3 ) ) );
g0 *= norm.x;
g1 *= norm.y;
g2 *= norm.z;
g3 *= norm.w;
float4 m = max( 0.6 - float4( dot( x0, x0 ), dot( x1, x1 ), dot( x2, x2 ), dot( x3, x3 ) ), 0.0 );
m = m* m;
m = m* m;
float4 px = float4( dot( x0, g0 ), dot( x1, g1 ), dot( x2, g2 ), dot( x3, g3 ) );
return 42.0 * dot( m, px);
}
float4 _SelectionID;
struct SurfaceDescription
{
float Alpha;
float AlphaClipThreshold;
};
PackedVaryings VertexFunction(Attributes input )
{
PackedVaryings output;
ZERO_INITIALIZE(PackedVaryings, output);
UNITY_SETUP_INSTANCE_ID(input);
UNITY_TRANSFER_INSTANCE_ID(input, output);
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
float3 ase_positionWS = TransformObjectToWorld( ( input.positionOS ).xyz );
float simplePerlin3D27 = snoise( ( ( ase_positionWS * _NoiseScale ) + ( -_NoiseSpeed * _TimeParameters.x ) ) );
output.ase_texcoord.xyz = ase_positionWS;
//setting value to unused interpolator channels and avoid initialization warnings
output.ase_texcoord.w = 0;
#ifdef ASE_ABSOLUTE_VERTEX_POS
float3 defaultVertexValue = input.positionOS.xyz;
#else
float3 defaultVertexValue = float3(0, 0, 0);
#endif
float3 vertexValue = ( ( simplePerlin3D27 * _VertexIntensity ) * input.normalOS );
#ifdef ASE_ABSOLUTE_VERTEX_POS
input.positionOS.xyz = vertexValue;
#else
input.positionOS.xyz += vertexValue;
#endif
input.normalOS = input.normalOS;
float3 positionWS = TransformObjectToWorld( input.positionOS.xyz );
output.positionCS = TransformWorldToHClip(positionWS);
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<VertexControl,3> 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<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
{
return patch[id];
}
[domain("tri")]
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> 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
{
SurfaceDescription surfaceDescription = (SurfaceDescription)0;
float3 ase_positionWS = input.ase_texcoord.xyz;
float3 WorldPosition2_g1044 = ase_positionWS;
float temp_output_7_0_g1047 = AHF_FogDistanceStart;
float temp_output_155_0_g1044 = saturate( ( ( distance( WorldPosition2_g1044 , _WorldSpaceCameraPos ) - temp_output_7_0_g1047 ) / ( AHF_FogDistanceEnd - temp_output_7_0_g1047 ) ) );
#ifdef AHF_DISABLE_FALLOFF
float staticSwitch467_g1044 = temp_output_155_0_g1044;
#else
float staticSwitch467_g1044 = ( 1.0 - pow( ( 1.0 - abs( temp_output_155_0_g1044 ) ) , AHF_FogDistanceFalloff ) );
#endif
half FogDistanceMask12_g1044 = staticSwitch467_g1044;
float3 lerpResult258_g1044 = lerp( (AHF_FogColorStart).rgb , (AHF_FogColorEnd).rgb , ( ( FogDistanceMask12_g1044 * FogDistanceMask12_g1044 * FogDistanceMask12_g1044 ) * AHF_FogColorDuo ));
float3 normalizeResult318_g1044 = normalize( ( WorldPosition2_g1044 - _WorldSpaceCameraPos ) );
float dotResult145_g1044 = dot( normalizeResult318_g1044 , AHF_DirectionalDir );
half Jitter502_g1044 = 0.0;
float temp_output_140_0_g1044 = ( saturate( (( dotResult145_g1044 + Jitter502_g1044 )*0.5 + 0.5) ) * AHF_DirectionalIntensity );
#ifdef AHF_DISABLE_FALLOFF
float staticSwitch470_g1044 = temp_output_140_0_g1044;
#else
float staticSwitch470_g1044 = pow( abs( temp_output_140_0_g1044 ) , AHF_DirectionalFalloff );
#endif
float DirectionalMask30_g1044 = staticSwitch470_g1044;
float3 lerpResult40_g1044 = lerp( lerpResult258_g1044 , (AHF_DirectionalColor).rgb , DirectionalMask30_g1044);
#ifdef AHF_DISABLE_DIRECTIONAL
float3 staticSwitch442_g1044 = lerpResult258_g1044;
#else
float3 staticSwitch442_g1044 = lerpResult40_g1044;
#endif
half3 Input_Color6_g1045 = staticSwitch442_g1044;
#ifdef UNITY_COLORSPACE_GAMMA
float3 staticSwitch1_g1045 = Input_Color6_g1045;
#else
float3 staticSwitch1_g1045 = ( Input_Color6_g1045 * ( ( Input_Color6_g1045 * ( ( Input_Color6_g1045 * 0.305306 ) + 0.6821711 ) ) + 0.01252288 ) );
#endif
float3 temp_output_256_0_g1044 = staticSwitch1_g1045;
half3 Final_Color462_g1044 = temp_output_256_0_g1044;
half3 AHF_FogAxisOption181_g1044 = AHF_FogAxisOption;
float3 break159_g1044 = ( WorldPosition2_g1044 * AHF_FogAxisOption181_g1044 );
float temp_output_7_0_g1048 = AHF_FogDistanceEnd;
float temp_output_643_0_g1044 = saturate( ( ( distance( WorldPosition2_g1044 , _WorldSpaceCameraPos ) - temp_output_7_0_g1048 ) / ( ( AHF_FogDistanceEnd + AHF_FarDistanceOffset ) - temp_output_7_0_g1048 ) ) );
half FogDistanceMaskFar645_g1044 = ( temp_output_643_0_g1044 * temp_output_643_0_g1044 );
float lerpResult690_g1044 = lerp( AHF_FogHeightEnd , ( AHF_FogHeightEnd + AHF_FarDistanceHeight ) , FogDistanceMaskFar645_g1044);
float temp_output_7_0_g1049 = lerpResult690_g1044;
float temp_output_167_0_g1044 = saturate( ( ( ( break159_g1044.x + break159_g1044.y + break159_g1044.z ) - temp_output_7_0_g1049 ) / ( AHF_FogHeightStart - temp_output_7_0_g1049 ) ) );
#ifdef AHF_DISABLE_FALLOFF
float staticSwitch468_g1044 = temp_output_167_0_g1044;
#else
float staticSwitch468_g1044 = pow( abs( temp_output_167_0_g1044 ) , AHF_FogHeightFalloff );
#endif
half FogHeightMask16_g1044 = staticSwitch468_g1044;
float lerpResult328_g1044 = lerp( ( FogDistanceMask12_g1044 * FogHeightMask16_g1044 ) , saturate( ( FogDistanceMask12_g1044 + FogHeightMask16_g1044 ) ) , AHF_FogLayersMode);
float mulTime204_g1044 = _TimeParameters.x * 2.0;
float3 temp_output_197_0_g1044 = ( ( WorldPosition2_g1044 * ( 1.0 / AHF_NoiseScale ) ) + ( -AHF_NoiseSpeed * mulTime204_g1044 ) );
float3 p1_g1053 = temp_output_197_0_g1044;
float localSimpleNoise3D1_g1053 = SimpleNoise3D( p1_g1053 );
float temp_output_7_0_g1052 = AHF_NoiseMin;
float temp_output_7_0_g1051 = AHF_NoiseDistanceEnd;
half NoiseDistanceMask7_g1044 = saturate( ( ( distance( WorldPosition2_g1044 , _WorldSpaceCameraPos ) - temp_output_7_0_g1051 ) / ( 0.0 - temp_output_7_0_g1051 ) ) );
float lerpResult198_g1044 = lerp( 1.0 , saturate( ( ( localSimpleNoise3D1_g1053 - temp_output_7_0_g1052 ) / ( AHF_NoiseMax - temp_output_7_0_g1052 ) ) ) , ( NoiseDistanceMask7_g1044 * AHF_NoiseIntensity ));
half NoiseSimplex3D24_g1044 = lerpResult198_g1044;
#ifdef AHF_DISABLE_NOISE3D
float staticSwitch42_g1044 = lerpResult328_g1044;
#else
float staticSwitch42_g1044 = ( lerpResult328_g1044 * NoiseSimplex3D24_g1044 );
#endif
float temp_output_454_0_g1044 = ( staticSwitch42_g1044 * AHF_FogIntensity );
half Final_Alpha463_g1044 = temp_output_454_0_g1044;
float4 appendResult114_g1044 = (float4(Final_Color462_g1044 , Final_Alpha463_g1044));
float4 appendResult457_g1044 = (float4(WorldPosition2_g1044 , 1.0));
#ifdef AHF_DEBUG_WORLDPOS
float4 staticSwitch456_g1044 = appendResult457_g1044;
#else
float4 staticSwitch456_g1044 = appendResult114_g1044;
#endif
float temp_output_96_87_g1043 = (staticSwitch456_g1044).w;
surfaceDescription.Alpha = ( 1.0 - temp_output_96_87_g1043 );
surfaceDescription.AlphaClipThreshold = 0.5;
#if _ALPHATEST_ON
float alphaClipThreshold = 0.01f;
#if ALPHA_CLIP_THRESHOLD
alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
#endif
clip(surfaceDescription.Alpha - alphaClipThreshold);
#endif
half4 outColor = 0;
outColor = _SelectionID;
return outColor;
}
ENDHLSL
}
}
FallBack "Hidden/Shader Graph/FallbackError"
Fallback Off
}
/*ASEBEGIN
Version=19901
Node;AmplifyShaderEditor.Vector3Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;30;-1280,1664;Half;False;Property;_NoiseSpeed;Noise Speed;46;0;Create;True;0;0;0;False;0;False;0.5,0.5,0;0.5,0.5,0;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
Node;AmplifyShaderEditor.SimpleTimeNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;31;-1280,1824;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
Node;AmplifyShaderEditor.NegateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;36;-1088,1664;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.WorldPosInputsNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;39;-1280,1280;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;32;-1280,1440;Half;False;Property;_NoiseScale;Noise Scale;45;0;Create;True;0;0;0;False;0;False;6;1.5;0;0;0;1;FLOAT;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;37;-960,1664;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;35;-960,1344;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;5;640,896;Inherit;False;Property;_Color;Color;43;1;[HDR];Create;True;0;0;0;False;0;False;1,0,0,0;1,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;33;-768,1536;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;82;1056,896;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
Node;AmplifyShaderEditor.NoiseGeneratorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;27;-640,1536;Inherit;False;Simplex3D;False;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;1;False;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;50;0,1728;Inherit;False;Property;_VertexIntensity;Vertex Intensity;47;0;Create;True;0;0;0;False;0;False;0;0.103;0;0.2;0;1;FLOAT;0
Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;111;1280,896;Inherit;False;Apply Height Fog Unlit;0;;1043;950890317d4f36a48a68d150cdab0168;0;1;81;FLOAT3;0,0,0;False;3;FLOAT3;85;FLOAT3;86;FLOAT;87
Node;AmplifyShaderEditor.NormalVertexDataNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;49;384,1792;Inherit;False;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;45;384,1664;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.OneMinusNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;109;1536,960;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;41;0,1024;Inherit;False;Property;_NoiseIntensity;Noise Intensity;44;0;Create;True;0;0;0;False;1;Space(10);False;0;0.103;0;0.2;0;1;FLOAT;0
Node;AmplifyShaderEditor.GrabScreenPosition, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;23;256,1152;Inherit;False;0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;40;288,1024;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;24;448,1024;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0
Node;AmplifyShaderEditor.ScreenColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;22;640,1152;Inherit;False;Global;_GrabScreen0;Grab Screen 0;1;0;Create;True;0;0;0;False;0;False;Object;-1;False;False;False;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;44;896,896;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;48;704,1664;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;99;2048,896;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;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;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;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;0;False;False;0;;0;0;Standard;0;False;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;100;2048,896;Float;False;True;-1;2;;0;13;Custom/My Transparent Shader;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;9;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;True;True;0;False;;False;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;2;True;12;all;0;False;True;1;5;False;;10;False;;1;1;False;;10;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;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;25;Surface;1;638871779068338043; Blend;0;0;Two Sided;0;638871779494567603;Alpha Clipping;0;638871779025232297; Use Shadow Threshold;0;0;Forward Only;0;0;Cast Shadows;0;638186283833608412;Receive Shadows;0;638871786533210099;GPU Instancing;0;638186283872324931;LOD CrossFade;0;0;Built-in Fog;0;0;Meta Pass;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;Write Depth;0;0; Early Z;0;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;False;False;False;True;True;False;False;False;;False;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;101;2048,896;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;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;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;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;102;2048,896;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;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;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;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;;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;103;2048,896;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;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;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;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;104;2048,896;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;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;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;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;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=Universal2D;False;False;0;;0;0;Standard;0;False;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;105;2048,896;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;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;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;106;2048,896;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;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;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;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=Picking;False;False;0;;0;0;Standard;0;False;0
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;107;2048,896;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;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;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;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;108;2048,896;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;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;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;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;3;True;12;all;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;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0
Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;76;0,768;Inherit;False;1182;100;Grab Screen Color;0;;1,1,1,1;0;0
Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;51;-1280,1152;Inherit;False;832.0697;100;Noise;0;;1,1,1,1;0;0
Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;54;0,1536;Inherit;False;826.2407;100;Vertex Animaton;0;;1,1,1,1;0;0
WireConnection;36;0;30;0
WireConnection;37;0;36;0
WireConnection;37;1;31;0
WireConnection;35;0;39;0
WireConnection;35;1;32;0
WireConnection;33;0;35;0
WireConnection;33;1;37;0
WireConnection;82;0;5;0
WireConnection;27;0;33;0
WireConnection;111;81;82;0
WireConnection;45;0;27;0
WireConnection;45;1;50;0
WireConnection;109;0;111;87
WireConnection;40;0;41;0
WireConnection;40;1;27;0
WireConnection;24;0;40;0
WireConnection;24;1;23;0
WireConnection;22;0;24;0
WireConnection;44;0;5;0
WireConnection;44;1;22;0
WireConnection;48;0;45;0
WireConnection;48;1;49;0
WireConnection;100;2;111;85
WireConnection;100;3;109;0
WireConnection;100;5;48;0
ASEEND*/
//CHKSM=497900FF3FA318676BBA8201C2345BED7C156036