2689 lines
121 KiB
Plaintext
2689 lines
121 KiB
Plaintext
|
// Made with Amplify Shader Editor
|
||
|
// Available at the Unity Asset Store - http://u3d.as/y3X
|
||
|
Shader "Tobyfredson/Grass Foliage Basic (URP)"
|
||
|
{
|
||
|
Properties
|
||
|
{
|
||
|
[HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
|
||
|
[HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
|
||
|
[ASEBegin]_AlbedoColor("Albedo Color", Color) = (1,1,1,0)
|
||
|
_AlbedoLightness("Albedo Lightness", Range( 0 , 5)) = 1
|
||
|
[Toggle(_COLORVARIATION_ON)] _ColorVariation("Color Variation", Float) = 0
|
||
|
_Cutout("Cutout", Range( 0 , 1)) = 0.4
|
||
|
_GrassColorVariation("Grass Color Variation", Range( 0 , 5)) = 0.6
|
||
|
[NoScaleOffset]_AlbedoMap("Albedo Map", 2D) = "white" {}
|
||
|
[NoScaleOffset]_NormalMap("Normal Map", 2D) = "bump" {}
|
||
|
_NormalIntensity("Normal Intensity", Range( -3 , 3)) = 0
|
||
|
[Toggle(_NORMALBACKFACEFIXBRANCH_ON)] _NormalBackFaceFixBranch("Normal BackFace Fix (Branch)", Float) = 0
|
||
|
[NoScaleOffset]_MaskMap("Mask Map", 2D) = "white" {}
|
||
|
_SmoothnessIntensity("Smoothness Intensity", Float) = 1
|
||
|
_TranslucencyColor("Translucency Color", Color) = (0.5,0.5,0.5,0)
|
||
|
_TranslucencyPower("Translucency Power", Range( 0 , 40)) = 8
|
||
|
_TranslucencyRange("Translucency Range", Float) = 1
|
||
|
_AmbientOcclusion("Ambient Occlusion", Range( 0 , 1)) = 1
|
||
|
[Toggle(_VERTEXAO_ON)] _VertexAo("Vertex Ao", Float) = 1
|
||
|
_VertexAointensity("Vertex Ao intensity", Range( 0 , 1)) = 0
|
||
|
_GlobalWindPower("Global Wind Power", Range( 0 , 1)) = 1
|
||
|
_WindSpeed("Wind Speed", Range( 0 , 2)) = 1
|
||
|
_WindPower("Wind Power", Range( 0 , 0.9)) = 1
|
||
|
_FlutterFrequency("Flutter Frequency", Range( 0 , 5)) = 2
|
||
|
_WindAnglexz("Wind Angle (xz)", Range( -200 , 200)) = 20
|
||
|
_WindAngley("Wind Angle (y)", Range( -100 , 100)) = 20
|
||
|
[Toggle(_FADEONOFF_ON)] _FadeOnOff("Fade On/Off", Float) = 0
|
||
|
_CutoutAlphalOD("Cutout Alpha lOD", Float) = 1
|
||
|
_CameraLength("Camera Length", Float) = 0
|
||
|
[ASEEnd]_CameraOffset("Camera Offset", Float) = 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
|
||
|
}
|
||
|
|
||
|
SubShader
|
||
|
{
|
||
|
LOD 0
|
||
|
|
||
|
|
||
|
|
||
|
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Opaque" "Queue"="Geometry" }
|
||
|
Cull Off
|
||
|
AlphaToMask Off
|
||
|
|
||
|
HLSLINCLUDE
|
||
|
#pragma target 3.0
|
||
|
|
||
|
#pragma prefer_hlslcc gles
|
||
|
|
||
|
|
||
|
|
||
|
#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"="UniversalForward" }
|
||
|
|
||
|
Blend One Zero, One Zero
|
||
|
ZWrite On
|
||
|
ZTest LEqual
|
||
|
Offset 0 , 0
|
||
|
ColorMask RGBA
|
||
|
|
||
|
|
||
|
HLSLPROGRAM
|
||
|
|
||
|
#define _NORMAL_DROPOFF_TS 1
|
||
|
#pragma multi_compile_instancing
|
||
|
#pragma multi_compile_fog
|
||
|
#define ASE_FOG 1
|
||
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
||
|
#define _EMISSION
|
||
|
#define _ALPHATEST_ON 1
|
||
|
#define _NORMALMAP 1
|
||
|
#define ASE_SRP_VERSION 80200
|
||
|
|
||
|
|
||
|
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
|
||
|
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE
|
||
|
#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
|
||
|
#pragma multi_compile _ _ADDITIONAL_LIGHT_SHADOWS
|
||
|
#pragma multi_compile _ _SHADOWS_SOFT
|
||
|
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
|
||
|
|
||
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
||
|
#pragma multi_compile _ LIGHTMAP_ON
|
||
|
|
||
|
#pragma vertex vert
|
||
|
#pragma fragment frag
|
||
|
|
||
|
#define SHADERPASS_FORWARD
|
||
|
|
||
|
#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/Color.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
|
|
||
|
#if ASE_SRP_VERSION <= 70108
|
||
|
#define REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR
|
||
|
#endif
|
||
|
|
||
|
#if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL)
|
||
|
#define ENABLE_TERRAIN_PERPIXEL_NORMAL
|
||
|
#endif
|
||
|
|
||
|
#define ASE_NEEDS_VERT_POSITION
|
||
|
#define ASE_NEEDS_FRAG_WORLD_POSITION
|
||
|
#define ASE_NEEDS_FRAG_SHADOWCOORDS
|
||
|
#define ASE_NEEDS_FRAG_WORLD_VIEW_DIR
|
||
|
#define ASE_NEEDS_FRAG_WORLD_NORMAL
|
||
|
#pragma shader_feature _COLORVARIATION_ON
|
||
|
#pragma shader_feature_local _NORMALBACKFACEFIXBRANCH_ON
|
||
|
#pragma shader_feature_local _VERTEXAO_ON
|
||
|
#pragma shader_feature_local _FADEONOFF_ON
|
||
|
|
||
|
|
||
|
struct VertexInput
|
||
|
{
|
||
|
float4 vertex : POSITION;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 ase_tangent : TANGENT;
|
||
|
float4 texcoord1 : TEXCOORD1;
|
||
|
float4 texcoord : TEXCOORD0;
|
||
|
float4 ase_color : COLOR;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct VertexOutput
|
||
|
{
|
||
|
float4 clipPos : SV_POSITION;
|
||
|
float4 lightmapUVOrVertexSH : TEXCOORD0;
|
||
|
half4 fogFactorAndVertexLight : TEXCOORD1;
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||
|
float4 shadowCoord : TEXCOORD2;
|
||
|
#endif
|
||
|
float4 tSpace0 : TEXCOORD3;
|
||
|
float4 tSpace1 : TEXCOORD4;
|
||
|
float4 tSpace2 : TEXCOORD5;
|
||
|
#if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
|
||
|
float4 screenPos : TEXCOORD6;
|
||
|
#endif
|
||
|
float4 ase_texcoord7 : TEXCOORD7;
|
||
|
float4 ase_texcoord8 : TEXCOORD8;
|
||
|
float4 ase_color : COLOR;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
UNITY_VERTEX_OUTPUT_STEREO
|
||
|
};
|
||
|
|
||
|
CBUFFER_START(UnityPerMaterial)
|
||
|
float4 _AlbedoColor;
|
||
|
float4 _TranslucencyColor;
|
||
|
float _GlobalWindPower;
|
||
|
float _CameraOffset;
|
||
|
float _CameraLength;
|
||
|
float _VertexAointensity;
|
||
|
float _AmbientOcclusion;
|
||
|
float _SmoothnessIntensity;
|
||
|
float _TranslucencyRange;
|
||
|
float _TranslucencyPower;
|
||
|
float _NormalIntensity;
|
||
|
float _AlbedoLightness;
|
||
|
float _GrassColorVariation;
|
||
|
float _WindSpeed;
|
||
|
float _WindPower;
|
||
|
float _WindAnglexz;
|
||
|
float _WindAngley;
|
||
|
float _FlutterFrequency;
|
||
|
float _CutoutAlphalOD;
|
||
|
float _Cutout;
|
||
|
#ifdef _TRANSMISSION_ASE
|
||
|
float _TransmissionShadow;
|
||
|
#endif
|
||
|
#ifdef _TRANSLUCENCY_ASE
|
||
|
float _TransStrength;
|
||
|
float _TransNormal;
|
||
|
float _TransScattering;
|
||
|
float _TransDirect;
|
||
|
float _TransAmbient;
|
||
|
float _TransShadow;
|
||
|
#endif
|
||
|
#ifdef TESSELLATION_ON
|
||
|
float _TessPhongStrength;
|
||
|
float _TessValue;
|
||
|
float _TessMin;
|
||
|
float _TessMax;
|
||
|
float _TessEdgeLength;
|
||
|
float _TessMaxDisp;
|
||
|
#endif
|
||
|
CBUFFER_END
|
||
|
sampler2D _AlbedoMap;
|
||
|
sampler2D _NormalMap;
|
||
|
sampler2D _MaskMap;
|
||
|
|
||
|
|
||
|
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
|
||
|
float snoise( float2 v )
|
||
|
{
|
||
|
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
|
||
|
float2 i = floor( v + dot( v, C.yy ) );
|
||
|
float2 x0 = v - i + dot( i, C.xx );
|
||
|
float2 i1;
|
||
|
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
|
||
|
float4 x12 = x0.xyxy + C.xxzz;
|
||
|
x12.xy -= i1;
|
||
|
i = mod2D289( i );
|
||
|
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
|
||
|
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
|
||
|
m = m * m;
|
||
|
m = m * m;
|
||
|
float3 x = 2.0 * frac( p * C.www ) - 1.0;
|
||
|
float3 h = abs( x ) - 0.5;
|
||
|
float3 ox = floor( x + 0.5 );
|
||
|
float3 a0 = x - ox;
|
||
|
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
|
||
|
float3 g;
|
||
|
g.x = a0.x * x0.x + h.x * x0.y;
|
||
|
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
|
||
|
return 130.0 * dot( m, g );
|
||
|
}
|
||
|
|
||
|
//https://www.shadertoy.com/view/XdXGW8
|
||
|
float2 GradientNoiseDir( float2 x )
|
||
|
{
|
||
|
const float2 k = float2( 0.3183099, 0.3678794 );
|
||
|
x = x * k + k.yx;
|
||
|
return -1.0 + 2.0 * frac( 16.0 * k * frac( x.x * x.y * ( x.x + x.y ) ) );
|
||
|
}
|
||
|
|
||
|
float GradientNoise( float2 UV, float Scale )
|
||
|
{
|
||
|
float2 p = UV * Scale;
|
||
|
float2 i = floor( p );
|
||
|
float2 f = frac( p );
|
||
|
float2 u = f * f * ( 3.0 - 2.0 * f );
|
||
|
return lerp( lerp( dot( GradientNoiseDir( i + float2( 0.0, 0.0 ) ), f - float2( 0.0, 0.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 0.0 ) ), f - float2( 1.0, 0.0 ) ), u.x ),
|
||
|
lerp( dot( GradientNoiseDir( i + float2( 0.0, 1.0 ) ), f - float2( 0.0, 1.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 1.0 ) ), f - float2( 1.0, 1.0 ) ), u.x ), u.y );
|
||
|
}
|
||
|
|
||
|
float4 CalculateContrast( float contrastValue, float4 colorTarget )
|
||
|
{
|
||
|
float t = 0.5 * ( 1.0 - contrastValue );
|
||
|
return mul( float4x4( contrastValue,0,0,t, 0,contrastValue,0,t, 0,0,contrastValue,t, 0,0,0,1 ), colorTarget );
|
||
|
}
|
||
|
|
||
|
VertexOutput VertexFunction( VertexInput v )
|
||
|
{
|
||
|
VertexOutput o = (VertexOutput)0;
|
||
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||
|
|
||
|
float3 ase_worldPos = mul(GetObjectToWorldMatrix(), v.vertex).xyz;
|
||
|
float mulTime7 = _TimeParameters.x * 0.1;
|
||
|
float simplePerlin2D34 = snoise( (ase_worldPos*1.0 + float3( ( mulTime7 * float2( -0.5,-0.5 ) ) , 0.0 )).xy*_FlutterFrequency );
|
||
|
simplePerlin2D34 = simplePerlin2D34*0.5 + 0.5;
|
||
|
float temp_output_120_0 = ( v.vertex.xyz.y + simplePerlin2D34 );
|
||
|
float gradientNoise14 = GradientNoise((ase_worldPos*1.0 + float3( ( _TimeParameters.x * float2( 0,-0.1 ) ) , 0.0 )).xy,20.0);
|
||
|
gradientNoise14 = gradientNoise14*0.5 + 0.5;
|
||
|
float4 temp_cast_6 = (gradientNoise14).xxxx;
|
||
|
float temp_output_29_0 = ( v.vertex.xyz.y * 1.2 );
|
||
|
float3 appendResult141 = (float3(temp_output_120_0 , ( ( CalculateContrast(_WindAngley,temp_cast_6) * 0.2 ) + temp_output_29_0 ).r , v.vertex.xyz.z));
|
||
|
float4 temp_cast_9 = (gradientNoise14).xxxx;
|
||
|
float4 appendResult51 = (float4(( ( CalculateContrast(_WindAnglexz,temp_cast_9) * 0.2 ) + temp_output_29_0 ).r , temp_output_120_0 , v.vertex.xyz.z , 0.0));
|
||
|
float4 lerpResult56 = lerp( float4( v.vertex.xyz , 0.0 ) , ( float4( appendResult141 , 0.0 ) + appendResult51 ) , v.ase_color.g);
|
||
|
float2 texCoord31 = v.texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||
|
float2 appendResult32 = (float2(ase_worldPos.x , ase_worldPos.z));
|
||
|
float2 appendResult35 = (float2(_TimeParameters.x , _TimeParameters.x));
|
||
|
float simplePerlin2D48 = snoise( ( appendResult32 + appendResult35 )*_WindSpeed );
|
||
|
simplePerlin2D48 = simplePerlin2D48*0.5 + 0.5;
|
||
|
float4 WindOutput253 = ( ( _GlobalWindPower * ( float4( v.vertex.xyz , 0.0 ) - lerpResult56 ) ) * ( v.ase_color.g * ( pow( ( texCoord31.y * 0.5 ) , ( 1.0 - _WindPower ) ) * simplePerlin2D48 ) ) );
|
||
|
|
||
|
float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.vertex.xyz));
|
||
|
float eyeDepth = -objectToViewPos.z;
|
||
|
o.ase_texcoord7.z = eyeDepth;
|
||
|
|
||
|
o.ase_texcoord7.xy = v.texcoord.xy;
|
||
|
o.ase_texcoord8 = v.vertex;
|
||
|
o.ase_color = v.ase_color;
|
||
|
|
||
|
//setting value to unused interpolator channels and avoid initialization warnings
|
||
|
o.ase_texcoord7.w = 0;
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
float3 defaultVertexValue = v.vertex.xyz;
|
||
|
#else
|
||
|
float3 defaultVertexValue = float3(0, 0, 0);
|
||
|
#endif
|
||
|
float3 vertexValue = WindOutput253.xyz;
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
v.vertex.xyz = vertexValue;
|
||
|
#else
|
||
|
v.vertex.xyz += vertexValue;
|
||
|
#endif
|
||
|
v.ase_normal = v.ase_normal;
|
||
|
|
||
|
float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
|
||
|
float3 positionVS = TransformWorldToView( positionWS );
|
||
|
float4 positionCS = TransformWorldToHClip( positionWS );
|
||
|
|
||
|
VertexNormalInputs normalInput = GetVertexNormalInputs( v.ase_normal, v.ase_tangent );
|
||
|
|
||
|
o.tSpace0 = float4( normalInput.normalWS, positionWS.x);
|
||
|
o.tSpace1 = float4( normalInput.tangentWS, positionWS.y);
|
||
|
o.tSpace2 = float4( normalInput.bitangentWS, positionWS.z);
|
||
|
|
||
|
OUTPUT_LIGHTMAP_UV( v.texcoord1, unity_LightmapST, o.lightmapUVOrVertexSH.xy );
|
||
|
OUTPUT_SH( normalInput.normalWS.xyz, o.lightmapUVOrVertexSH.xyz );
|
||
|
|
||
|
#if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
|
||
|
o.lightmapUVOrVertexSH.zw = v.texcoord;
|
||
|
o.lightmapUVOrVertexSH.xy = v.texcoord * unity_LightmapST.xy + unity_LightmapST.zw;
|
||
|
#endif
|
||
|
|
||
|
half3 vertexLight = VertexLighting( positionWS, normalInput.normalWS );
|
||
|
#ifdef ASE_FOG
|
||
|
half fogFactor = ComputeFogFactor( positionCS.z );
|
||
|
#else
|
||
|
half fogFactor = 0;
|
||
|
#endif
|
||
|
o.fogFactorAndVertexLight = half4(fogFactor, vertexLight);
|
||
|
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||
|
VertexPositionInputs vertexInput = (VertexPositionInputs)0;
|
||
|
vertexInput.positionWS = positionWS;
|
||
|
vertexInput.positionCS = positionCS;
|
||
|
o.shadowCoord = GetShadowCoord( vertexInput );
|
||
|
#endif
|
||
|
|
||
|
o.clipPos = positionCS;
|
||
|
#if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
|
||
|
o.screenPos = ComputeScreenPos(positionCS);
|
||
|
#endif
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
#if defined(TESSELLATION_ON)
|
||
|
struct VertexControl
|
||
|
{
|
||
|
float4 vertex : INTERNALTESSPOS;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 ase_tangent : TANGENT;
|
||
|
float4 texcoord : TEXCOORD0;
|
||
|
float4 texcoord1 : TEXCOORD1;
|
||
|
float4 ase_color : COLOR;
|
||
|
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct TessellationFactors
|
||
|
{
|
||
|
float edge[3] : SV_TessFactor;
|
||
|
float inside : SV_InsideTessFactor;
|
||
|
};
|
||
|
|
||
|
VertexControl vert ( VertexInput v )
|
||
|
{
|
||
|
VertexControl o;
|
||
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
o.vertex = v.vertex;
|
||
|
o.ase_normal = v.ase_normal;
|
||
|
o.ase_tangent = v.ase_tangent;
|
||
|
o.texcoord = v.texcoord;
|
||
|
o.texcoord1 = v.texcoord1;
|
||
|
o.ase_color = v.ase_color;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> 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, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
||
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
||
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _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<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
||
|
{
|
||
|
return patch[id];
|
||
|
}
|
||
|
|
||
|
[domain("tri")]
|
||
|
VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
||
|
{
|
||
|
VertexInput o = (VertexInput) 0;
|
||
|
o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
|
||
|
o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
|
||
|
o.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * 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.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
|
||
|
#if defined(ASE_PHONG_TESSELLATION)
|
||
|
float3 pp[3];
|
||
|
for (int i = 0; i < 3; ++i)
|
||
|
pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_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
|
||
|
VertexOutput vert ( VertexInput v )
|
||
|
{
|
||
|
return VertexFunction( v );
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
|
||
|
#define ASE_SV_DEPTH SV_DepthLessEqual
|
||
|
#else
|
||
|
#define ASE_SV_DEPTH SV_Depth
|
||
|
#endif
|
||
|
|
||
|
half4 frag ( VertexOutput IN
|
||
|
#ifdef ASE_DEPTH_WRITE_ON
|
||
|
,out float outputDepth : ASE_SV_DEPTH
|
||
|
#endif
|
||
|
, FRONT_FACE_TYPE ase_vface : FRONT_FACE_SEMANTIC ) : SV_Target
|
||
|
{
|
||
|
UNITY_SETUP_INSTANCE_ID(IN);
|
||
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN);
|
||
|
|
||
|
#ifdef LOD_FADE_CROSSFADE
|
||
|
LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
|
||
|
#endif
|
||
|
|
||
|
#if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
|
||
|
float2 sampleCoords = (IN.lightmapUVOrVertexSH.zw / _TerrainHeightmapRecipSize.zw + 0.5f) * _TerrainHeightmapRecipSize.xy;
|
||
|
float3 WorldNormal = TransformObjectToWorldNormal(normalize(SAMPLE_TEXTURE2D(_TerrainNormalmapTexture, sampler_TerrainNormalmapTexture, sampleCoords).rgb * 2 - 1));
|
||
|
float3 WorldTangent = -cross(GetObjectToWorldMatrix()._13_23_33, WorldNormal);
|
||
|
float3 WorldBiTangent = cross(WorldNormal, -WorldTangent);
|
||
|
#else
|
||
|
float3 WorldNormal = normalize( IN.tSpace0.xyz );
|
||
|
float3 WorldTangent = IN.tSpace1.xyz;
|
||
|
float3 WorldBiTangent = IN.tSpace2.xyz;
|
||
|
#endif
|
||
|
float3 WorldPosition = float3(IN.tSpace0.w,IN.tSpace1.w,IN.tSpace2.w);
|
||
|
float3 WorldViewDirection = _WorldSpaceCameraPos.xyz - WorldPosition;
|
||
|
float4 ShadowCoords = float4( 0, 0, 0, 0 );
|
||
|
#if defined(ASE_NEEDS_FRAG_SCREEN_POSITION)
|
||
|
float4 ScreenPos = IN.screenPos;
|
||
|
#endif
|
||
|
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||
|
ShadowCoords = IN.shadowCoord;
|
||
|
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
|
||
|
ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
|
||
|
#endif
|
||
|
|
||
|
WorldViewDirection = SafeNormalize( WorldViewDirection );
|
||
|
|
||
|
float2 uv_AlbedoMap33 = IN.ase_texcoord7.xy;
|
||
|
float4 tex2DNode33 = tex2D( _AlbedoMap, uv_AlbedoMap33 );
|
||
|
float4 break183 = tex2DNode33;
|
||
|
float4 transform173 = mul(GetObjectToWorldMatrix(),float4( 1,1,1,1 ));
|
||
|
float dotResult4_g17 = dot( transform173.xy , float2( 12.9898,78.233 ) );
|
||
|
float lerpResult10_g17 = lerp( 0.9 , 1.15 , frac( ( sin( dotResult4_g17 ) * 43758.55 ) ));
|
||
|
float4 appendResult186 = (float4(( break183.r * lerpResult10_g17 ) , break183.g , break183.b , 0.0));
|
||
|
float4 lerpResult194 = lerp( tex2DNode33 , appendResult186 , _GrassColorVariation);
|
||
|
#ifdef _COLORVARIATION_ON
|
||
|
float4 staticSwitch57 = lerpResult194;
|
||
|
#else
|
||
|
float4 staticSwitch57 = tex2DNode33;
|
||
|
#endif
|
||
|
float4 AlbedoOutput236 = ( _AlbedoColor * ( staticSwitch57 * _AlbedoLightness ) );
|
||
|
|
||
|
float2 uv_NormalMap70 = IN.ase_texcoord7.xy;
|
||
|
float3 unpack70 = UnpackNormalScale( tex2D( _NormalMap, uv_NormalMap70 ), _NormalIntensity );
|
||
|
unpack70.z = lerp( 1, unpack70.z, saturate(_NormalIntensity) );
|
||
|
float3 tex2DNode70 = unpack70;
|
||
|
float3 appendResult259 = (float3(tex2DNode70.r , ( tex2DNode70.g * ase_vface ) , tex2DNode70.b));
|
||
|
float3 appendResult153 = (float3(tex2DNode70.r , tex2DNode70.g , ( tex2DNode70.b * ase_vface )));
|
||
|
#ifdef _NORMALBACKFACEFIXBRANCH_ON
|
||
|
float3 staticSwitch157 = appendResult153;
|
||
|
#else
|
||
|
float3 staticSwitch157 = appendResult259;
|
||
|
#endif
|
||
|
float3 NormalMapOutput238 = staticSwitch157;
|
||
|
|
||
|
float ase_lightAtten = 0;
|
||
|
Light ase_mainLight = GetMainLight( ShadowCoords );
|
||
|
ase_lightAtten = ase_mainLight.distanceAttenuation * ase_mainLight.shadowAttenuation;
|
||
|
float2 uv_MaskMap59 = IN.ase_texcoord7.xy;
|
||
|
float4 tex2DNode59 = tex2D( _MaskMap, uv_MaskMap59 );
|
||
|
float fresnelNdotV42 = dot( WorldNormal, WorldViewDirection );
|
||
|
float fresnelNode42 = ( 0.0 + 1.0 * pow( 1.0 - fresnelNdotV42, 5.0 ) );
|
||
|
float4 FresnelBase233 = ( tex2DNode59.b * ( staticSwitch57 * saturate( fresnelNode42 ) ) );
|
||
|
float3 objToWorldDir75 = normalize( mul( GetObjectToWorldMatrix(), float4( IN.ase_texcoord8.xyz, 0 ) ).xyz );
|
||
|
float dotResult83 = dot( WorldViewDirection , -( SafeNormalize(_MainLightPosition.xyz) + ( objToWorldDir75 * _TranslucencyRange ) ) );
|
||
|
float4 TranslucencyBase216 = saturate( ( dotResult83 * _TranslucencyColor ) );
|
||
|
float4 TranslucencyOutput245 = ( ase_lightAtten * ( ( _TranslucencyPower * ( FresnelBase233 * ( tex2DNode59.b * TranslucencyBase216 ) ) ) * float4( _MainLightColor.rgb , 0.0 ) * _MainLightColor.a ) );
|
||
|
|
||
|
float SmoothnessOutput225 = ( tex2DNode59.a * _SmoothnessIntensity );
|
||
|
|
||
|
float AoBase221 = pow( tex2DNode59.g , _AmbientOcclusion );
|
||
|
float blendOpSrc108 = IN.ase_color.r;
|
||
|
float blendOpDest108 = AoBase221;
|
||
|
float lerpBlendMode108 = lerp(blendOpDest108,( blendOpSrc108 * blendOpDest108 ),_VertexAointensity);
|
||
|
#ifdef _VERTEXAO_ON
|
||
|
float staticSwitch109 = ( saturate( lerpBlendMode108 ));
|
||
|
#else
|
||
|
float staticSwitch109 = AoBase221;
|
||
|
#endif
|
||
|
float AoOutput250 = staticSwitch109;
|
||
|
|
||
|
float eyeDepth = IN.ase_texcoord7.z;
|
||
|
float cameraDepthFade158 = (( eyeDepth -_ProjectionParams.y - _CameraOffset ) / _CameraLength);
|
||
|
#ifdef _FADEONOFF_ON
|
||
|
float staticSwitch161 = ( ( 1.0 - cameraDepthFade158 ) * tex2DNode33.a * _CutoutAlphalOD );
|
||
|
#else
|
||
|
float staticSwitch161 = tex2DNode33.a;
|
||
|
#endif
|
||
|
float GrassDistanceFade246 = staticSwitch161;
|
||
|
|
||
|
float3 Albedo = AlbedoOutput236.rgb;
|
||
|
float3 Normal = NormalMapOutput238;
|
||
|
float3 Emission = TranslucencyOutput245.rgb;
|
||
|
float3 Specular = 0.5;
|
||
|
float Metallic = 0;
|
||
|
float Smoothness = SmoothnessOutput225;
|
||
|
float Occlusion = AoOutput250;
|
||
|
float Alpha = GrassDistanceFade246;
|
||
|
float AlphaClipThreshold = _Cutout;
|
||
|
float AlphaClipThresholdShadow = 0.5;
|
||
|
float3 BakedGI = 0;
|
||
|
float3 RefractionColor = 1;
|
||
|
float RefractionIndex = 1;
|
||
|
float3 Transmission = 1;
|
||
|
float3 Translucency = 1;
|
||
|
#ifdef ASE_DEPTH_WRITE_ON
|
||
|
float DepthValue = 0;
|
||
|
#endif
|
||
|
|
||
|
#ifdef _ALPHATEST_ON
|
||
|
clip(Alpha - AlphaClipThreshold);
|
||
|
#endif
|
||
|
|
||
|
InputData inputData;
|
||
|
inputData.positionWS = WorldPosition;
|
||
|
inputData.viewDirectionWS = WorldViewDirection;
|
||
|
inputData.shadowCoord = ShadowCoords;
|
||
|
|
||
|
#ifdef _NORMALMAP
|
||
|
#if _NORMAL_DROPOFF_TS
|
||
|
inputData.normalWS = TransformTangentToWorld(Normal, half3x3( WorldTangent, WorldBiTangent, WorldNormal ));
|
||
|
#elif _NORMAL_DROPOFF_OS
|
||
|
inputData.normalWS = TransformObjectToWorldNormal(Normal);
|
||
|
#elif _NORMAL_DROPOFF_WS
|
||
|
inputData.normalWS = Normal;
|
||
|
#endif
|
||
|
inputData.normalWS = NormalizeNormalPerPixel(inputData.normalWS);
|
||
|
#else
|
||
|
inputData.normalWS = WorldNormal;
|
||
|
#endif
|
||
|
|
||
|
#ifdef ASE_FOG
|
||
|
inputData.fogCoord = IN.fogFactorAndVertexLight.x;
|
||
|
#endif
|
||
|
|
||
|
inputData.vertexLighting = IN.fogFactorAndVertexLight.yzw;
|
||
|
#if defined(ENABLE_TERRAIN_PERPIXEL_NORMAL)
|
||
|
float3 SH = SampleSH(inputData.normalWS.xyz);
|
||
|
#else
|
||
|
float3 SH = IN.lightmapUVOrVertexSH.xyz;
|
||
|
#endif
|
||
|
|
||
|
inputData.bakedGI = SAMPLE_GI( IN.lightmapUVOrVertexSH.xy, SH, inputData.normalWS );
|
||
|
#ifdef _ASE_BAKEDGI
|
||
|
inputData.bakedGI = BakedGI;
|
||
|
#endif
|
||
|
half4 color = UniversalFragmentPBR(
|
||
|
inputData,
|
||
|
Albedo,
|
||
|
Metallic,
|
||
|
Specular,
|
||
|
Smoothness,
|
||
|
Occlusion,
|
||
|
Emission,
|
||
|
Alpha);
|
||
|
|
||
|
#ifdef _TRANSMISSION_ASE
|
||
|
{
|
||
|
float shadow = _TransmissionShadow;
|
||
|
|
||
|
Light mainLight = GetMainLight( inputData.shadowCoord );
|
||
|
float3 mainAtten = mainLight.color * mainLight.distanceAttenuation;
|
||
|
mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow );
|
||
|
half3 mainTransmission = max(0 , -dot(inputData.normalWS, mainLight.direction)) * mainAtten * Transmission;
|
||
|
color.rgb += Albedo * mainTransmission;
|
||
|
|
||
|
#ifdef _ADDITIONAL_LIGHTS
|
||
|
int transPixelLightCount = GetAdditionalLightsCount();
|
||
|
for (int i = 0; i < transPixelLightCount; ++i)
|
||
|
{
|
||
|
Light light = GetAdditionalLight(i, inputData.positionWS);
|
||
|
float3 atten = light.color * light.distanceAttenuation;
|
||
|
atten = lerp( atten, atten * light.shadowAttenuation, shadow );
|
||
|
|
||
|
half3 transmission = max(0 , -dot(inputData.normalWS, light.direction)) * atten * Transmission;
|
||
|
color.rgb += Albedo * transmission;
|
||
|
}
|
||
|
#endif
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#ifdef _TRANSLUCENCY_ASE
|
||
|
{
|
||
|
float shadow = _TransShadow;
|
||
|
float normal = _TransNormal;
|
||
|
float scattering = _TransScattering;
|
||
|
float direct = _TransDirect;
|
||
|
float ambient = _TransAmbient;
|
||
|
float strength = _TransStrength;
|
||
|
|
||
|
Light mainLight = GetMainLight( inputData.shadowCoord );
|
||
|
float3 mainAtten = mainLight.color * mainLight.distanceAttenuation;
|
||
|
mainAtten = lerp( mainAtten, mainAtten * mainLight.shadowAttenuation, shadow );
|
||
|
|
||
|
half3 mainLightDir = mainLight.direction + inputData.normalWS * normal;
|
||
|
half mainVdotL = pow( saturate( dot( inputData.viewDirectionWS, -mainLightDir ) ), scattering );
|
||
|
half3 mainTranslucency = mainAtten * ( mainVdotL * direct + inputData.bakedGI * ambient ) * Translucency;
|
||
|
color.rgb += Albedo * mainTranslucency * strength;
|
||
|
|
||
|
#ifdef _ADDITIONAL_LIGHTS
|
||
|
int transPixelLightCount = GetAdditionalLightsCount();
|
||
|
for (int i = 0; i < transPixelLightCount; ++i)
|
||
|
{
|
||
|
Light light = GetAdditionalLight(i, inputData.positionWS);
|
||
|
float3 atten = light.color * light.distanceAttenuation;
|
||
|
atten = lerp( atten, atten * light.shadowAttenuation, shadow );
|
||
|
|
||
|
half3 lightDir = light.direction + inputData.normalWS * normal;
|
||
|
half VdotL = pow( saturate( dot( inputData.viewDirectionWS, -lightDir ) ), scattering );
|
||
|
half3 translucency = atten * ( VdotL * direct + inputData.bakedGI * ambient ) * Translucency;
|
||
|
color.rgb += Albedo * translucency * strength;
|
||
|
}
|
||
|
#endif
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#ifdef _REFRACTION_ASE
|
||
|
float4 projScreenPos = ScreenPos / ScreenPos.w;
|
||
|
float3 refractionOffset = ( RefractionIndex - 1.0 ) * mul( UNITY_MATRIX_V, float4( WorldNormal, 0 ) ).xyz * ( 1.0 - dot( WorldNormal, WorldViewDirection ) );
|
||
|
projScreenPos.xy += refractionOffset.xy;
|
||
|
float3 refraction = SHADERGRAPH_SAMPLE_SCENE_COLOR( projScreenPos.xy ) * RefractionColor;
|
||
|
color.rgb = lerp( refraction, color.rgb, color.a );
|
||
|
color.a = 1;
|
||
|
#endif
|
||
|
|
||
|
#ifdef ASE_FINAL_COLOR_ALPHA_MULTIPLY
|
||
|
color.rgb *= color.a;
|
||
|
#endif
|
||
|
|
||
|
#ifdef ASE_FOG
|
||
|
#ifdef TERRAIN_SPLAT_ADDPASS
|
||
|
color.rgb = MixFogColor(color.rgb, half3( 0, 0, 0 ), IN.fogFactorAndVertexLight.x );
|
||
|
#else
|
||
|
color.rgb = MixFog(color.rgb, IN.fogFactorAndVertexLight.x);
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
#ifdef ASE_DEPTH_WRITE_ON
|
||
|
outputDepth = DepthValue;
|
||
|
#endif
|
||
|
|
||
|
return color;
|
||
|
}
|
||
|
|
||
|
ENDHLSL
|
||
|
}
|
||
|
|
||
|
|
||
|
Pass
|
||
|
{
|
||
|
|
||
|
Name "ShadowCaster"
|
||
|
Tags { "LightMode"="ShadowCaster" }
|
||
|
|
||
|
ZWrite On
|
||
|
ZTest LEqual
|
||
|
AlphaToMask Off
|
||
|
|
||
|
HLSLPROGRAM
|
||
|
|
||
|
#define _NORMAL_DROPOFF_TS 1
|
||
|
#pragma multi_compile_instancing
|
||
|
#pragma multi_compile_fog
|
||
|
#define ASE_FOG 1
|
||
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
||
|
#define _EMISSION
|
||
|
#define _ALPHATEST_ON 1
|
||
|
#define _NORMALMAP 1
|
||
|
#define ASE_SRP_VERSION 80200
|
||
|
|
||
|
|
||
|
#pragma vertex vert
|
||
|
#pragma fragment frag
|
||
|
|
||
|
#define SHADERPASS_SHADOWCASTER
|
||
|
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
|
|
||
|
#define ASE_NEEDS_VERT_POSITION
|
||
|
#pragma shader_feature_local _FADEONOFF_ON
|
||
|
|
||
|
|
||
|
struct VertexInput
|
||
|
{
|
||
|
float4 vertex : POSITION;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 ase_color : COLOR;
|
||
|
float4 ase_texcoord : TEXCOORD0;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct VertexOutput
|
||
|
{
|
||
|
float4 clipPos : SV_POSITION;
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
float3 worldPos : TEXCOORD0;
|
||
|
#endif
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
float4 shadowCoord : TEXCOORD1;
|
||
|
#endif
|
||
|
float4 ase_texcoord2 : TEXCOORD2;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
UNITY_VERTEX_OUTPUT_STEREO
|
||
|
};
|
||
|
|
||
|
CBUFFER_START(UnityPerMaterial)
|
||
|
float4 _AlbedoColor;
|
||
|
float4 _TranslucencyColor;
|
||
|
float _GlobalWindPower;
|
||
|
float _CameraOffset;
|
||
|
float _CameraLength;
|
||
|
float _VertexAointensity;
|
||
|
float _AmbientOcclusion;
|
||
|
float _SmoothnessIntensity;
|
||
|
float _TranslucencyRange;
|
||
|
float _TranslucencyPower;
|
||
|
float _NormalIntensity;
|
||
|
float _AlbedoLightness;
|
||
|
float _GrassColorVariation;
|
||
|
float _WindSpeed;
|
||
|
float _WindPower;
|
||
|
float _WindAnglexz;
|
||
|
float _WindAngley;
|
||
|
float _FlutterFrequency;
|
||
|
float _CutoutAlphalOD;
|
||
|
float _Cutout;
|
||
|
#ifdef _TRANSMISSION_ASE
|
||
|
float _TransmissionShadow;
|
||
|
#endif
|
||
|
#ifdef _TRANSLUCENCY_ASE
|
||
|
float _TransStrength;
|
||
|
float _TransNormal;
|
||
|
float _TransScattering;
|
||
|
float _TransDirect;
|
||
|
float _TransAmbient;
|
||
|
float _TransShadow;
|
||
|
#endif
|
||
|
#ifdef TESSELLATION_ON
|
||
|
float _TessPhongStrength;
|
||
|
float _TessValue;
|
||
|
float _TessMin;
|
||
|
float _TessMax;
|
||
|
float _TessEdgeLength;
|
||
|
float _TessMaxDisp;
|
||
|
#endif
|
||
|
CBUFFER_END
|
||
|
sampler2D _AlbedoMap;
|
||
|
|
||
|
|
||
|
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
|
||
|
float snoise( float2 v )
|
||
|
{
|
||
|
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
|
||
|
float2 i = floor( v + dot( v, C.yy ) );
|
||
|
float2 x0 = v - i + dot( i, C.xx );
|
||
|
float2 i1;
|
||
|
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
|
||
|
float4 x12 = x0.xyxy + C.xxzz;
|
||
|
x12.xy -= i1;
|
||
|
i = mod2D289( i );
|
||
|
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
|
||
|
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
|
||
|
m = m * m;
|
||
|
m = m * m;
|
||
|
float3 x = 2.0 * frac( p * C.www ) - 1.0;
|
||
|
float3 h = abs( x ) - 0.5;
|
||
|
float3 ox = floor( x + 0.5 );
|
||
|
float3 a0 = x - ox;
|
||
|
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
|
||
|
float3 g;
|
||
|
g.x = a0.x * x0.x + h.x * x0.y;
|
||
|
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
|
||
|
return 130.0 * dot( m, g );
|
||
|
}
|
||
|
|
||
|
//https://www.shadertoy.com/view/XdXGW8
|
||
|
float2 GradientNoiseDir( float2 x )
|
||
|
{
|
||
|
const float2 k = float2( 0.3183099, 0.3678794 );
|
||
|
x = x * k + k.yx;
|
||
|
return -1.0 + 2.0 * frac( 16.0 * k * frac( x.x * x.y * ( x.x + x.y ) ) );
|
||
|
}
|
||
|
|
||
|
float GradientNoise( float2 UV, float Scale )
|
||
|
{
|
||
|
float2 p = UV * Scale;
|
||
|
float2 i = floor( p );
|
||
|
float2 f = frac( p );
|
||
|
float2 u = f * f * ( 3.0 - 2.0 * f );
|
||
|
return lerp( lerp( dot( GradientNoiseDir( i + float2( 0.0, 0.0 ) ), f - float2( 0.0, 0.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 0.0 ) ), f - float2( 1.0, 0.0 ) ), u.x ),
|
||
|
lerp( dot( GradientNoiseDir( i + float2( 0.0, 1.0 ) ), f - float2( 0.0, 1.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 1.0 ) ), f - float2( 1.0, 1.0 ) ), u.x ), u.y );
|
||
|
}
|
||
|
|
||
|
float4 CalculateContrast( float contrastValue, float4 colorTarget )
|
||
|
{
|
||
|
float t = 0.5 * ( 1.0 - contrastValue );
|
||
|
return mul( float4x4( contrastValue,0,0,t, 0,contrastValue,0,t, 0,0,contrastValue,t, 0,0,0,1 ), colorTarget );
|
||
|
}
|
||
|
|
||
|
float3 _LightDirection;
|
||
|
|
||
|
VertexOutput VertexFunction( VertexInput v )
|
||
|
{
|
||
|
VertexOutput o;
|
||
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||
|
|
||
|
float3 ase_worldPos = mul(GetObjectToWorldMatrix(), v.vertex).xyz;
|
||
|
float mulTime7 = _TimeParameters.x * 0.1;
|
||
|
float simplePerlin2D34 = snoise( (ase_worldPos*1.0 + float3( ( mulTime7 * float2( -0.5,-0.5 ) ) , 0.0 )).xy*_FlutterFrequency );
|
||
|
simplePerlin2D34 = simplePerlin2D34*0.5 + 0.5;
|
||
|
float temp_output_120_0 = ( v.vertex.xyz.y + simplePerlin2D34 );
|
||
|
float gradientNoise14 = GradientNoise((ase_worldPos*1.0 + float3( ( _TimeParameters.x * float2( 0,-0.1 ) ) , 0.0 )).xy,20.0);
|
||
|
gradientNoise14 = gradientNoise14*0.5 + 0.5;
|
||
|
float4 temp_cast_6 = (gradientNoise14).xxxx;
|
||
|
float temp_output_29_0 = ( v.vertex.xyz.y * 1.2 );
|
||
|
float3 appendResult141 = (float3(temp_output_120_0 , ( ( CalculateContrast(_WindAngley,temp_cast_6) * 0.2 ) + temp_output_29_0 ).r , v.vertex.xyz.z));
|
||
|
float4 temp_cast_9 = (gradientNoise14).xxxx;
|
||
|
float4 appendResult51 = (float4(( ( CalculateContrast(_WindAnglexz,temp_cast_9) * 0.2 ) + temp_output_29_0 ).r , temp_output_120_0 , v.vertex.xyz.z , 0.0));
|
||
|
float4 lerpResult56 = lerp( float4( v.vertex.xyz , 0.0 ) , ( float4( appendResult141 , 0.0 ) + appendResult51 ) , v.ase_color.g);
|
||
|
float2 texCoord31 = v.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||
|
float2 appendResult32 = (float2(ase_worldPos.x , ase_worldPos.z));
|
||
|
float2 appendResult35 = (float2(_TimeParameters.x , _TimeParameters.x));
|
||
|
float simplePerlin2D48 = snoise( ( appendResult32 + appendResult35 )*_WindSpeed );
|
||
|
simplePerlin2D48 = simplePerlin2D48*0.5 + 0.5;
|
||
|
float4 WindOutput253 = ( ( _GlobalWindPower * ( float4( v.vertex.xyz , 0.0 ) - lerpResult56 ) ) * ( v.ase_color.g * ( pow( ( texCoord31.y * 0.5 ) , ( 1.0 - _WindPower ) ) * simplePerlin2D48 ) ) );
|
||
|
|
||
|
float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.vertex.xyz));
|
||
|
float eyeDepth = -objectToViewPos.z;
|
||
|
o.ase_texcoord2.z = eyeDepth;
|
||
|
|
||
|
o.ase_texcoord2.xy = v.ase_texcoord.xy;
|
||
|
|
||
|
//setting value to unused interpolator channels and avoid initialization warnings
|
||
|
o.ase_texcoord2.w = 0;
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
float3 defaultVertexValue = v.vertex.xyz;
|
||
|
#else
|
||
|
float3 defaultVertexValue = float3(0, 0, 0);
|
||
|
#endif
|
||
|
float3 vertexValue = WindOutput253.xyz;
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
v.vertex.xyz = vertexValue;
|
||
|
#else
|
||
|
v.vertex.xyz += vertexValue;
|
||
|
#endif
|
||
|
|
||
|
v.ase_normal = v.ase_normal;
|
||
|
|
||
|
float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
o.worldPos = positionWS;
|
||
|
#endif
|
||
|
float3 normalWS = TransformObjectToWorldDir(v.ase_normal);
|
||
|
|
||
|
float4 clipPos = TransformWorldToHClip( ApplyShadowBias( positionWS, normalWS, _LightDirection ) );
|
||
|
|
||
|
#if UNITY_REVERSED_Z
|
||
|
clipPos.z = min(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE);
|
||
|
#else
|
||
|
clipPos.z = max(clipPos.z, clipPos.w * UNITY_NEAR_CLIP_VALUE);
|
||
|
#endif
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
VertexPositionInputs vertexInput = (VertexPositionInputs)0;
|
||
|
vertexInput.positionWS = positionWS;
|
||
|
vertexInput.positionCS = clipPos;
|
||
|
o.shadowCoord = GetShadowCoord( vertexInput );
|
||
|
#endif
|
||
|
o.clipPos = clipPos;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
#if defined(TESSELLATION_ON)
|
||
|
struct VertexControl
|
||
|
{
|
||
|
float4 vertex : INTERNALTESSPOS;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 ase_color : COLOR;
|
||
|
float4 ase_texcoord : TEXCOORD0;
|
||
|
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct TessellationFactors
|
||
|
{
|
||
|
float edge[3] : SV_TessFactor;
|
||
|
float inside : SV_InsideTessFactor;
|
||
|
};
|
||
|
|
||
|
VertexControl vert ( VertexInput v )
|
||
|
{
|
||
|
VertexControl o;
|
||
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
o.vertex = v.vertex;
|
||
|
o.ase_normal = v.ase_normal;
|
||
|
o.ase_color = v.ase_color;
|
||
|
o.ase_texcoord = v.ase_texcoord;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> 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, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
||
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
||
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _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<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
||
|
{
|
||
|
return patch[id];
|
||
|
}
|
||
|
|
||
|
[domain("tri")]
|
||
|
VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
||
|
{
|
||
|
VertexInput o = (VertexInput) 0;
|
||
|
o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
|
||
|
o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
|
||
|
o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
|
||
|
o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
|
||
|
#if defined(ASE_PHONG_TESSELLATION)
|
||
|
float3 pp[3];
|
||
|
for (int i = 0; i < 3; ++i)
|
||
|
pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_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
|
||
|
VertexOutput vert ( VertexInput v )
|
||
|
{
|
||
|
return VertexFunction( v );
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
|
||
|
#define ASE_SV_DEPTH SV_DepthLessEqual
|
||
|
#else
|
||
|
#define ASE_SV_DEPTH SV_Depth
|
||
|
#endif
|
||
|
|
||
|
half4 frag( VertexOutput IN
|
||
|
#ifdef ASE_DEPTH_WRITE_ON
|
||
|
,out float outputDepth : ASE_SV_DEPTH
|
||
|
#endif
|
||
|
) : SV_TARGET
|
||
|
{
|
||
|
UNITY_SETUP_INSTANCE_ID( IN );
|
||
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
float3 WorldPosition = IN.worldPos;
|
||
|
#endif
|
||
|
float4 ShadowCoords = float4( 0, 0, 0, 0 );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||
|
ShadowCoords = IN.shadowCoord;
|
||
|
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
|
||
|
ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
float2 uv_AlbedoMap33 = IN.ase_texcoord2.xy;
|
||
|
float4 tex2DNode33 = tex2D( _AlbedoMap, uv_AlbedoMap33 );
|
||
|
float eyeDepth = IN.ase_texcoord2.z;
|
||
|
float cameraDepthFade158 = (( eyeDepth -_ProjectionParams.y - _CameraOffset ) / _CameraLength);
|
||
|
#ifdef _FADEONOFF_ON
|
||
|
float staticSwitch161 = ( ( 1.0 - cameraDepthFade158 ) * tex2DNode33.a * _CutoutAlphalOD );
|
||
|
#else
|
||
|
float staticSwitch161 = tex2DNode33.a;
|
||
|
#endif
|
||
|
float GrassDistanceFade246 = staticSwitch161;
|
||
|
|
||
|
float Alpha = GrassDistanceFade246;
|
||
|
float AlphaClipThreshold = _Cutout;
|
||
|
float AlphaClipThresholdShadow = 0.5;
|
||
|
#ifdef ASE_DEPTH_WRITE_ON
|
||
|
float DepthValue = 0;
|
||
|
#endif
|
||
|
|
||
|
#ifdef _ALPHATEST_ON
|
||
|
#ifdef _ALPHATEST_SHADOW_ON
|
||
|
clip(Alpha - AlphaClipThresholdShadow);
|
||
|
#else
|
||
|
clip(Alpha - AlphaClipThreshold);
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
#ifdef LOD_FADE_CROSSFADE
|
||
|
LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
|
||
|
#endif
|
||
|
#ifdef ASE_DEPTH_WRITE_ON
|
||
|
outputDepth = DepthValue;
|
||
|
#endif
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
ENDHLSL
|
||
|
}
|
||
|
|
||
|
|
||
|
Pass
|
||
|
{
|
||
|
|
||
|
Name "DepthOnly"
|
||
|
Tags { "LightMode"="DepthOnly" }
|
||
|
|
||
|
ZWrite On
|
||
|
ColorMask 0
|
||
|
AlphaToMask Off
|
||
|
|
||
|
HLSLPROGRAM
|
||
|
|
||
|
#define _NORMAL_DROPOFF_TS 1
|
||
|
#pragma multi_compile_instancing
|
||
|
#pragma multi_compile_fog
|
||
|
#define ASE_FOG 1
|
||
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
||
|
#define _EMISSION
|
||
|
#define _ALPHATEST_ON 1
|
||
|
#define _NORMALMAP 1
|
||
|
#define ASE_SRP_VERSION 80200
|
||
|
|
||
|
|
||
|
#pragma vertex vert
|
||
|
#pragma fragment frag
|
||
|
|
||
|
#define SHADERPASS_DEPTHONLY
|
||
|
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
|
|
||
|
#define ASE_NEEDS_VERT_POSITION
|
||
|
#pragma shader_feature_local _FADEONOFF_ON
|
||
|
|
||
|
|
||
|
struct VertexInput
|
||
|
{
|
||
|
float4 vertex : POSITION;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 ase_color : COLOR;
|
||
|
float4 ase_texcoord : TEXCOORD0;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct VertexOutput
|
||
|
{
|
||
|
float4 clipPos : SV_POSITION;
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
float3 worldPos : TEXCOORD0;
|
||
|
#endif
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
float4 shadowCoord : TEXCOORD1;
|
||
|
#endif
|
||
|
float4 ase_texcoord2 : TEXCOORD2;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
UNITY_VERTEX_OUTPUT_STEREO
|
||
|
};
|
||
|
|
||
|
CBUFFER_START(UnityPerMaterial)
|
||
|
float4 _AlbedoColor;
|
||
|
float4 _TranslucencyColor;
|
||
|
float _GlobalWindPower;
|
||
|
float _CameraOffset;
|
||
|
float _CameraLength;
|
||
|
float _VertexAointensity;
|
||
|
float _AmbientOcclusion;
|
||
|
float _SmoothnessIntensity;
|
||
|
float _TranslucencyRange;
|
||
|
float _TranslucencyPower;
|
||
|
float _NormalIntensity;
|
||
|
float _AlbedoLightness;
|
||
|
float _GrassColorVariation;
|
||
|
float _WindSpeed;
|
||
|
float _WindPower;
|
||
|
float _WindAnglexz;
|
||
|
float _WindAngley;
|
||
|
float _FlutterFrequency;
|
||
|
float _CutoutAlphalOD;
|
||
|
float _Cutout;
|
||
|
#ifdef _TRANSMISSION_ASE
|
||
|
float _TransmissionShadow;
|
||
|
#endif
|
||
|
#ifdef _TRANSLUCENCY_ASE
|
||
|
float _TransStrength;
|
||
|
float _TransNormal;
|
||
|
float _TransScattering;
|
||
|
float _TransDirect;
|
||
|
float _TransAmbient;
|
||
|
float _TransShadow;
|
||
|
#endif
|
||
|
#ifdef TESSELLATION_ON
|
||
|
float _TessPhongStrength;
|
||
|
float _TessValue;
|
||
|
float _TessMin;
|
||
|
float _TessMax;
|
||
|
float _TessEdgeLength;
|
||
|
float _TessMaxDisp;
|
||
|
#endif
|
||
|
CBUFFER_END
|
||
|
sampler2D _AlbedoMap;
|
||
|
|
||
|
|
||
|
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
|
||
|
float snoise( float2 v )
|
||
|
{
|
||
|
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
|
||
|
float2 i = floor( v + dot( v, C.yy ) );
|
||
|
float2 x0 = v - i + dot( i, C.xx );
|
||
|
float2 i1;
|
||
|
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
|
||
|
float4 x12 = x0.xyxy + C.xxzz;
|
||
|
x12.xy -= i1;
|
||
|
i = mod2D289( i );
|
||
|
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
|
||
|
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
|
||
|
m = m * m;
|
||
|
m = m * m;
|
||
|
float3 x = 2.0 * frac( p * C.www ) - 1.0;
|
||
|
float3 h = abs( x ) - 0.5;
|
||
|
float3 ox = floor( x + 0.5 );
|
||
|
float3 a0 = x - ox;
|
||
|
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
|
||
|
float3 g;
|
||
|
g.x = a0.x * x0.x + h.x * x0.y;
|
||
|
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
|
||
|
return 130.0 * dot( m, g );
|
||
|
}
|
||
|
|
||
|
//https://www.shadertoy.com/view/XdXGW8
|
||
|
float2 GradientNoiseDir( float2 x )
|
||
|
{
|
||
|
const float2 k = float2( 0.3183099, 0.3678794 );
|
||
|
x = x * k + k.yx;
|
||
|
return -1.0 + 2.0 * frac( 16.0 * k * frac( x.x * x.y * ( x.x + x.y ) ) );
|
||
|
}
|
||
|
|
||
|
float GradientNoise( float2 UV, float Scale )
|
||
|
{
|
||
|
float2 p = UV * Scale;
|
||
|
float2 i = floor( p );
|
||
|
float2 f = frac( p );
|
||
|
float2 u = f * f * ( 3.0 - 2.0 * f );
|
||
|
return lerp( lerp( dot( GradientNoiseDir( i + float2( 0.0, 0.0 ) ), f - float2( 0.0, 0.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 0.0 ) ), f - float2( 1.0, 0.0 ) ), u.x ),
|
||
|
lerp( dot( GradientNoiseDir( i + float2( 0.0, 1.0 ) ), f - float2( 0.0, 1.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 1.0 ) ), f - float2( 1.0, 1.0 ) ), u.x ), u.y );
|
||
|
}
|
||
|
|
||
|
float4 CalculateContrast( float contrastValue, float4 colorTarget )
|
||
|
{
|
||
|
float t = 0.5 * ( 1.0 - contrastValue );
|
||
|
return mul( float4x4( contrastValue,0,0,t, 0,contrastValue,0,t, 0,0,contrastValue,t, 0,0,0,1 ), colorTarget );
|
||
|
}
|
||
|
|
||
|
VertexOutput VertexFunction( VertexInput v )
|
||
|
{
|
||
|
VertexOutput o = (VertexOutput)0;
|
||
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||
|
|
||
|
float3 ase_worldPos = mul(GetObjectToWorldMatrix(), v.vertex).xyz;
|
||
|
float mulTime7 = _TimeParameters.x * 0.1;
|
||
|
float simplePerlin2D34 = snoise( (ase_worldPos*1.0 + float3( ( mulTime7 * float2( -0.5,-0.5 ) ) , 0.0 )).xy*_FlutterFrequency );
|
||
|
simplePerlin2D34 = simplePerlin2D34*0.5 + 0.5;
|
||
|
float temp_output_120_0 = ( v.vertex.xyz.y + simplePerlin2D34 );
|
||
|
float gradientNoise14 = GradientNoise((ase_worldPos*1.0 + float3( ( _TimeParameters.x * float2( 0,-0.1 ) ) , 0.0 )).xy,20.0);
|
||
|
gradientNoise14 = gradientNoise14*0.5 + 0.5;
|
||
|
float4 temp_cast_6 = (gradientNoise14).xxxx;
|
||
|
float temp_output_29_0 = ( v.vertex.xyz.y * 1.2 );
|
||
|
float3 appendResult141 = (float3(temp_output_120_0 , ( ( CalculateContrast(_WindAngley,temp_cast_6) * 0.2 ) + temp_output_29_0 ).r , v.vertex.xyz.z));
|
||
|
float4 temp_cast_9 = (gradientNoise14).xxxx;
|
||
|
float4 appendResult51 = (float4(( ( CalculateContrast(_WindAnglexz,temp_cast_9) * 0.2 ) + temp_output_29_0 ).r , temp_output_120_0 , v.vertex.xyz.z , 0.0));
|
||
|
float4 lerpResult56 = lerp( float4( v.vertex.xyz , 0.0 ) , ( float4( appendResult141 , 0.0 ) + appendResult51 ) , v.ase_color.g);
|
||
|
float2 texCoord31 = v.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||
|
float2 appendResult32 = (float2(ase_worldPos.x , ase_worldPos.z));
|
||
|
float2 appendResult35 = (float2(_TimeParameters.x , _TimeParameters.x));
|
||
|
float simplePerlin2D48 = snoise( ( appendResult32 + appendResult35 )*_WindSpeed );
|
||
|
simplePerlin2D48 = simplePerlin2D48*0.5 + 0.5;
|
||
|
float4 WindOutput253 = ( ( _GlobalWindPower * ( float4( v.vertex.xyz , 0.0 ) - lerpResult56 ) ) * ( v.ase_color.g * ( pow( ( texCoord31.y * 0.5 ) , ( 1.0 - _WindPower ) ) * simplePerlin2D48 ) ) );
|
||
|
|
||
|
float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.vertex.xyz));
|
||
|
float eyeDepth = -objectToViewPos.z;
|
||
|
o.ase_texcoord2.z = eyeDepth;
|
||
|
|
||
|
o.ase_texcoord2.xy = v.ase_texcoord.xy;
|
||
|
|
||
|
//setting value to unused interpolator channels and avoid initialization warnings
|
||
|
o.ase_texcoord2.w = 0;
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
float3 defaultVertexValue = v.vertex.xyz;
|
||
|
#else
|
||
|
float3 defaultVertexValue = float3(0, 0, 0);
|
||
|
#endif
|
||
|
float3 vertexValue = WindOutput253.xyz;
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
v.vertex.xyz = vertexValue;
|
||
|
#else
|
||
|
v.vertex.xyz += vertexValue;
|
||
|
#endif
|
||
|
|
||
|
v.ase_normal = v.ase_normal;
|
||
|
float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
|
||
|
float4 positionCS = TransformWorldToHClip( positionWS );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
o.worldPos = positionWS;
|
||
|
#endif
|
||
|
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
VertexPositionInputs vertexInput = (VertexPositionInputs)0;
|
||
|
vertexInput.positionWS = positionWS;
|
||
|
vertexInput.positionCS = positionCS;
|
||
|
o.shadowCoord = GetShadowCoord( vertexInput );
|
||
|
#endif
|
||
|
o.clipPos = positionCS;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
#if defined(TESSELLATION_ON)
|
||
|
struct VertexControl
|
||
|
{
|
||
|
float4 vertex : INTERNALTESSPOS;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 ase_color : COLOR;
|
||
|
float4 ase_texcoord : TEXCOORD0;
|
||
|
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct TessellationFactors
|
||
|
{
|
||
|
float edge[3] : SV_TessFactor;
|
||
|
float inside : SV_InsideTessFactor;
|
||
|
};
|
||
|
|
||
|
VertexControl vert ( VertexInput v )
|
||
|
{
|
||
|
VertexControl o;
|
||
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
o.vertex = v.vertex;
|
||
|
o.ase_normal = v.ase_normal;
|
||
|
o.ase_color = v.ase_color;
|
||
|
o.ase_texcoord = v.ase_texcoord;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> 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, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
||
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
||
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _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<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
||
|
{
|
||
|
return patch[id];
|
||
|
}
|
||
|
|
||
|
[domain("tri")]
|
||
|
VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
||
|
{
|
||
|
VertexInput o = (VertexInput) 0;
|
||
|
o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
|
||
|
o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
|
||
|
o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
|
||
|
o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
|
||
|
#if defined(ASE_PHONG_TESSELLATION)
|
||
|
float3 pp[3];
|
||
|
for (int i = 0; i < 3; ++i)
|
||
|
pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_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
|
||
|
VertexOutput vert ( VertexInput v )
|
||
|
{
|
||
|
return VertexFunction( v );
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE)
|
||
|
#define ASE_SV_DEPTH SV_DepthLessEqual
|
||
|
#else
|
||
|
#define ASE_SV_DEPTH SV_Depth
|
||
|
#endif
|
||
|
half4 frag( VertexOutput IN
|
||
|
#ifdef ASE_DEPTH_WRITE_ON
|
||
|
,out float outputDepth : ASE_SV_DEPTH
|
||
|
#endif
|
||
|
) : SV_TARGET
|
||
|
{
|
||
|
UNITY_SETUP_INSTANCE_ID(IN);
|
||
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
float3 WorldPosition = IN.worldPos;
|
||
|
#endif
|
||
|
float4 ShadowCoords = float4( 0, 0, 0, 0 );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||
|
ShadowCoords = IN.shadowCoord;
|
||
|
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
|
||
|
ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
float2 uv_AlbedoMap33 = IN.ase_texcoord2.xy;
|
||
|
float4 tex2DNode33 = tex2D( _AlbedoMap, uv_AlbedoMap33 );
|
||
|
float eyeDepth = IN.ase_texcoord2.z;
|
||
|
float cameraDepthFade158 = (( eyeDepth -_ProjectionParams.y - _CameraOffset ) / _CameraLength);
|
||
|
#ifdef _FADEONOFF_ON
|
||
|
float staticSwitch161 = ( ( 1.0 - cameraDepthFade158 ) * tex2DNode33.a * _CutoutAlphalOD );
|
||
|
#else
|
||
|
float staticSwitch161 = tex2DNode33.a;
|
||
|
#endif
|
||
|
float GrassDistanceFade246 = staticSwitch161;
|
||
|
|
||
|
float Alpha = GrassDistanceFade246;
|
||
|
float AlphaClipThreshold = _Cutout;
|
||
|
#ifdef ASE_DEPTH_WRITE_ON
|
||
|
float DepthValue = 0;
|
||
|
#endif
|
||
|
|
||
|
#ifdef _ALPHATEST_ON
|
||
|
clip(Alpha - AlphaClipThreshold);
|
||
|
#endif
|
||
|
|
||
|
#ifdef LOD_FADE_CROSSFADE
|
||
|
LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
|
||
|
#endif
|
||
|
#ifdef ASE_DEPTH_WRITE_ON
|
||
|
outputDepth = DepthValue;
|
||
|
#endif
|
||
|
return 0;
|
||
|
}
|
||
|
ENDHLSL
|
||
|
}
|
||
|
|
||
|
|
||
|
Pass
|
||
|
{
|
||
|
|
||
|
Name "Meta"
|
||
|
Tags { "LightMode"="Meta" }
|
||
|
|
||
|
Cull Off
|
||
|
|
||
|
HLSLPROGRAM
|
||
|
|
||
|
#define _NORMAL_DROPOFF_TS 1
|
||
|
#pragma multi_compile_instancing
|
||
|
#pragma multi_compile_fog
|
||
|
#define ASE_FOG 1
|
||
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
||
|
#define _EMISSION
|
||
|
#define _ALPHATEST_ON 1
|
||
|
#define _NORMALMAP 1
|
||
|
#define ASE_SRP_VERSION 80200
|
||
|
|
||
|
|
||
|
#pragma vertex vert
|
||
|
#pragma fragment frag
|
||
|
|
||
|
#define SHADERPASS_META
|
||
|
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MetaInput.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||
|
|
||
|
#define ASE_NEEDS_VERT_POSITION
|
||
|
#define ASE_NEEDS_FRAG_WORLD_POSITION
|
||
|
#define ASE_NEEDS_FRAG_SHADOWCOORDS
|
||
|
#define ASE_NEEDS_VERT_NORMAL
|
||
|
#pragma shader_feature _COLORVARIATION_ON
|
||
|
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS
|
||
|
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE
|
||
|
#pragma multi_compile _ _SHADOWS_SOFT
|
||
|
#pragma shader_feature_local _FADEONOFF_ON
|
||
|
|
||
|
|
||
|
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||
|
|
||
|
struct VertexInput
|
||
|
{
|
||
|
float4 vertex : POSITION;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 texcoord1 : TEXCOORD1;
|
||
|
float4 texcoord2 : TEXCOORD2;
|
||
|
float4 ase_color : COLOR;
|
||
|
float4 ase_texcoord : TEXCOORD0;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct VertexOutput
|
||
|
{
|
||
|
float4 clipPos : SV_POSITION;
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
float3 worldPos : TEXCOORD0;
|
||
|
#endif
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
float4 shadowCoord : TEXCOORD1;
|
||
|
#endif
|
||
|
float4 ase_texcoord2 : TEXCOORD2;
|
||
|
float4 ase_texcoord3 : TEXCOORD3;
|
||
|
float4 ase_texcoord4 : TEXCOORD4;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
UNITY_VERTEX_OUTPUT_STEREO
|
||
|
};
|
||
|
|
||
|
CBUFFER_START(UnityPerMaterial)
|
||
|
float4 _AlbedoColor;
|
||
|
float4 _TranslucencyColor;
|
||
|
float _GlobalWindPower;
|
||
|
float _CameraOffset;
|
||
|
float _CameraLength;
|
||
|
float _VertexAointensity;
|
||
|
float _AmbientOcclusion;
|
||
|
float _SmoothnessIntensity;
|
||
|
float _TranslucencyRange;
|
||
|
float _TranslucencyPower;
|
||
|
float _NormalIntensity;
|
||
|
float _AlbedoLightness;
|
||
|
float _GrassColorVariation;
|
||
|
float _WindSpeed;
|
||
|
float _WindPower;
|
||
|
float _WindAnglexz;
|
||
|
float _WindAngley;
|
||
|
float _FlutterFrequency;
|
||
|
float _CutoutAlphalOD;
|
||
|
float _Cutout;
|
||
|
#ifdef _TRANSMISSION_ASE
|
||
|
float _TransmissionShadow;
|
||
|
#endif
|
||
|
#ifdef _TRANSLUCENCY_ASE
|
||
|
float _TransStrength;
|
||
|
float _TransNormal;
|
||
|
float _TransScattering;
|
||
|
float _TransDirect;
|
||
|
float _TransAmbient;
|
||
|
float _TransShadow;
|
||
|
#endif
|
||
|
#ifdef TESSELLATION_ON
|
||
|
float _TessPhongStrength;
|
||
|
float _TessValue;
|
||
|
float _TessMin;
|
||
|
float _TessMax;
|
||
|
float _TessEdgeLength;
|
||
|
float _TessMaxDisp;
|
||
|
#endif
|
||
|
CBUFFER_END
|
||
|
sampler2D _AlbedoMap;
|
||
|
sampler2D _MaskMap;
|
||
|
|
||
|
|
||
|
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
|
||
|
float snoise( float2 v )
|
||
|
{
|
||
|
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
|
||
|
float2 i = floor( v + dot( v, C.yy ) );
|
||
|
float2 x0 = v - i + dot( i, C.xx );
|
||
|
float2 i1;
|
||
|
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
|
||
|
float4 x12 = x0.xyxy + C.xxzz;
|
||
|
x12.xy -= i1;
|
||
|
i = mod2D289( i );
|
||
|
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
|
||
|
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
|
||
|
m = m * m;
|
||
|
m = m * m;
|
||
|
float3 x = 2.0 * frac( p * C.www ) - 1.0;
|
||
|
float3 h = abs( x ) - 0.5;
|
||
|
float3 ox = floor( x + 0.5 );
|
||
|
float3 a0 = x - ox;
|
||
|
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
|
||
|
float3 g;
|
||
|
g.x = a0.x * x0.x + h.x * x0.y;
|
||
|
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
|
||
|
return 130.0 * dot( m, g );
|
||
|
}
|
||
|
|
||
|
//https://www.shadertoy.com/view/XdXGW8
|
||
|
float2 GradientNoiseDir( float2 x )
|
||
|
{
|
||
|
const float2 k = float2( 0.3183099, 0.3678794 );
|
||
|
x = x * k + k.yx;
|
||
|
return -1.0 + 2.0 * frac( 16.0 * k * frac( x.x * x.y * ( x.x + x.y ) ) );
|
||
|
}
|
||
|
|
||
|
float GradientNoise( float2 UV, float Scale )
|
||
|
{
|
||
|
float2 p = UV * Scale;
|
||
|
float2 i = floor( p );
|
||
|
float2 f = frac( p );
|
||
|
float2 u = f * f * ( 3.0 - 2.0 * f );
|
||
|
return lerp( lerp( dot( GradientNoiseDir( i + float2( 0.0, 0.0 ) ), f - float2( 0.0, 0.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 0.0 ) ), f - float2( 1.0, 0.0 ) ), u.x ),
|
||
|
lerp( dot( GradientNoiseDir( i + float2( 0.0, 1.0 ) ), f - float2( 0.0, 1.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 1.0 ) ), f - float2( 1.0, 1.0 ) ), u.x ), u.y );
|
||
|
}
|
||
|
|
||
|
float4 CalculateContrast( float contrastValue, float4 colorTarget )
|
||
|
{
|
||
|
float t = 0.5 * ( 1.0 - contrastValue );
|
||
|
return mul( float4x4( contrastValue,0,0,t, 0,contrastValue,0,t, 0,0,contrastValue,t, 0,0,0,1 ), colorTarget );
|
||
|
}
|
||
|
|
||
|
VertexOutput VertexFunction( VertexInput v )
|
||
|
{
|
||
|
VertexOutput o = (VertexOutput)0;
|
||
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||
|
|
||
|
float3 ase_worldPos = mul(GetObjectToWorldMatrix(), v.vertex).xyz;
|
||
|
float mulTime7 = _TimeParameters.x * 0.1;
|
||
|
float simplePerlin2D34 = snoise( (ase_worldPos*1.0 + float3( ( mulTime7 * float2( -0.5,-0.5 ) ) , 0.0 )).xy*_FlutterFrequency );
|
||
|
simplePerlin2D34 = simplePerlin2D34*0.5 + 0.5;
|
||
|
float temp_output_120_0 = ( v.vertex.xyz.y + simplePerlin2D34 );
|
||
|
float gradientNoise14 = GradientNoise((ase_worldPos*1.0 + float3( ( _TimeParameters.x * float2( 0,-0.1 ) ) , 0.0 )).xy,20.0);
|
||
|
gradientNoise14 = gradientNoise14*0.5 + 0.5;
|
||
|
float4 temp_cast_6 = (gradientNoise14).xxxx;
|
||
|
float temp_output_29_0 = ( v.vertex.xyz.y * 1.2 );
|
||
|
float3 appendResult141 = (float3(temp_output_120_0 , ( ( CalculateContrast(_WindAngley,temp_cast_6) * 0.2 ) + temp_output_29_0 ).r , v.vertex.xyz.z));
|
||
|
float4 temp_cast_9 = (gradientNoise14).xxxx;
|
||
|
float4 appendResult51 = (float4(( ( CalculateContrast(_WindAnglexz,temp_cast_9) * 0.2 ) + temp_output_29_0 ).r , temp_output_120_0 , v.vertex.xyz.z , 0.0));
|
||
|
float4 lerpResult56 = lerp( float4( v.vertex.xyz , 0.0 ) , ( float4( appendResult141 , 0.0 ) + appendResult51 ) , v.ase_color.g);
|
||
|
float2 texCoord31 = v.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||
|
float2 appendResult32 = (float2(ase_worldPos.x , ase_worldPos.z));
|
||
|
float2 appendResult35 = (float2(_TimeParameters.x , _TimeParameters.x));
|
||
|
float simplePerlin2D48 = snoise( ( appendResult32 + appendResult35 )*_WindSpeed );
|
||
|
simplePerlin2D48 = simplePerlin2D48*0.5 + 0.5;
|
||
|
float4 WindOutput253 = ( ( _GlobalWindPower * ( float4( v.vertex.xyz , 0.0 ) - lerpResult56 ) ) * ( v.ase_color.g * ( pow( ( texCoord31.y * 0.5 ) , ( 1.0 - _WindPower ) ) * simplePerlin2D48 ) ) );
|
||
|
|
||
|
float3 ase_worldNormal = TransformObjectToWorldNormal(v.ase_normal);
|
||
|
o.ase_texcoord3.xyz = ase_worldNormal;
|
||
|
|
||
|
float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.vertex.xyz));
|
||
|
float eyeDepth = -objectToViewPos.z;
|
||
|
o.ase_texcoord2.z = eyeDepth;
|
||
|
|
||
|
o.ase_texcoord2.xy = v.ase_texcoord.xy;
|
||
|
o.ase_texcoord4 = v.vertex;
|
||
|
|
||
|
//setting value to unused interpolator channels and avoid initialization warnings
|
||
|
o.ase_texcoord2.w = 0;
|
||
|
o.ase_texcoord3.w = 0;
|
||
|
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
float3 defaultVertexValue = v.vertex.xyz;
|
||
|
#else
|
||
|
float3 defaultVertexValue = float3(0, 0, 0);
|
||
|
#endif
|
||
|
float3 vertexValue = WindOutput253.xyz;
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
v.vertex.xyz = vertexValue;
|
||
|
#else
|
||
|
v.vertex.xyz += vertexValue;
|
||
|
#endif
|
||
|
|
||
|
v.ase_normal = v.ase_normal;
|
||
|
|
||
|
float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
o.worldPos = positionWS;
|
||
|
#endif
|
||
|
|
||
|
o.clipPos = MetaVertexPosition( v.vertex, v.texcoord1.xy, v.texcoord1.xy, unity_LightmapST, unity_DynamicLightmapST );
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
VertexPositionInputs vertexInput = (VertexPositionInputs)0;
|
||
|
vertexInput.positionWS = positionWS;
|
||
|
vertexInput.positionCS = o.clipPos;
|
||
|
o.shadowCoord = GetShadowCoord( vertexInput );
|
||
|
#endif
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
#if defined(TESSELLATION_ON)
|
||
|
struct VertexControl
|
||
|
{
|
||
|
float4 vertex : INTERNALTESSPOS;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 texcoord1 : TEXCOORD1;
|
||
|
float4 texcoord2 : TEXCOORD2;
|
||
|
float4 ase_color : COLOR;
|
||
|
float4 ase_texcoord : TEXCOORD0;
|
||
|
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct TessellationFactors
|
||
|
{
|
||
|
float edge[3] : SV_TessFactor;
|
||
|
float inside : SV_InsideTessFactor;
|
||
|
};
|
||
|
|
||
|
VertexControl vert ( VertexInput v )
|
||
|
{
|
||
|
VertexControl o;
|
||
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
o.vertex = v.vertex;
|
||
|
o.ase_normal = v.ase_normal;
|
||
|
o.texcoord1 = v.texcoord1;
|
||
|
o.texcoord2 = v.texcoord2;
|
||
|
o.ase_color = v.ase_color;
|
||
|
o.ase_texcoord = v.ase_texcoord;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> 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, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
||
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
||
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _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<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
||
|
{
|
||
|
return patch[id];
|
||
|
}
|
||
|
|
||
|
[domain("tri")]
|
||
|
VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
||
|
{
|
||
|
VertexInput o = (VertexInput) 0;
|
||
|
o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
|
||
|
o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_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;
|
||
|
o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
|
||
|
o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
|
||
|
#if defined(ASE_PHONG_TESSELLATION)
|
||
|
float3 pp[3];
|
||
|
for (int i = 0; i < 3; ++i)
|
||
|
pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_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
|
||
|
VertexOutput vert ( VertexInput v )
|
||
|
{
|
||
|
return VertexFunction( v );
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
half4 frag(VertexOutput IN ) : SV_TARGET
|
||
|
{
|
||
|
UNITY_SETUP_INSTANCE_ID(IN);
|
||
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
float3 WorldPosition = IN.worldPos;
|
||
|
#endif
|
||
|
float4 ShadowCoords = float4( 0, 0, 0, 0 );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||
|
ShadowCoords = IN.shadowCoord;
|
||
|
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
|
||
|
ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
float2 uv_AlbedoMap33 = IN.ase_texcoord2.xy;
|
||
|
float4 tex2DNode33 = tex2D( _AlbedoMap, uv_AlbedoMap33 );
|
||
|
float4 break183 = tex2DNode33;
|
||
|
float4 transform173 = mul(GetObjectToWorldMatrix(),float4( 1,1,1,1 ));
|
||
|
float dotResult4_g17 = dot( transform173.xy , float2( 12.9898,78.233 ) );
|
||
|
float lerpResult10_g17 = lerp( 0.9 , 1.15 , frac( ( sin( dotResult4_g17 ) * 43758.55 ) ));
|
||
|
float4 appendResult186 = (float4(( break183.r * lerpResult10_g17 ) , break183.g , break183.b , 0.0));
|
||
|
float4 lerpResult194 = lerp( tex2DNode33 , appendResult186 , _GrassColorVariation);
|
||
|
#ifdef _COLORVARIATION_ON
|
||
|
float4 staticSwitch57 = lerpResult194;
|
||
|
#else
|
||
|
float4 staticSwitch57 = tex2DNode33;
|
||
|
#endif
|
||
|
float4 AlbedoOutput236 = ( _AlbedoColor * ( staticSwitch57 * _AlbedoLightness ) );
|
||
|
|
||
|
float ase_lightAtten = 0;
|
||
|
Light ase_mainLight = GetMainLight( ShadowCoords );
|
||
|
ase_lightAtten = ase_mainLight.distanceAttenuation * ase_mainLight.shadowAttenuation;
|
||
|
float2 uv_MaskMap59 = IN.ase_texcoord2.xy;
|
||
|
float4 tex2DNode59 = tex2D( _MaskMap, uv_MaskMap59 );
|
||
|
float3 ase_worldViewDir = ( _WorldSpaceCameraPos.xyz - WorldPosition );
|
||
|
ase_worldViewDir = normalize(ase_worldViewDir);
|
||
|
float3 ase_worldNormal = IN.ase_texcoord3.xyz;
|
||
|
float fresnelNdotV42 = dot( ase_worldNormal, ase_worldViewDir );
|
||
|
float fresnelNode42 = ( 0.0 + 1.0 * pow( 1.0 - fresnelNdotV42, 5.0 ) );
|
||
|
float4 FresnelBase233 = ( tex2DNode59.b * ( staticSwitch57 * saturate( fresnelNode42 ) ) );
|
||
|
ase_worldViewDir = SafeNormalize( ase_worldViewDir );
|
||
|
float3 objToWorldDir75 = normalize( mul( GetObjectToWorldMatrix(), float4( IN.ase_texcoord4.xyz, 0 ) ).xyz );
|
||
|
float dotResult83 = dot( ase_worldViewDir , -( SafeNormalize(_MainLightPosition.xyz) + ( objToWorldDir75 * _TranslucencyRange ) ) );
|
||
|
float4 TranslucencyBase216 = saturate( ( dotResult83 * _TranslucencyColor ) );
|
||
|
float4 TranslucencyOutput245 = ( ase_lightAtten * ( ( _TranslucencyPower * ( FresnelBase233 * ( tex2DNode59.b * TranslucencyBase216 ) ) ) * float4( _MainLightColor.rgb , 0.0 ) * _MainLightColor.a ) );
|
||
|
|
||
|
float eyeDepth = IN.ase_texcoord2.z;
|
||
|
float cameraDepthFade158 = (( eyeDepth -_ProjectionParams.y - _CameraOffset ) / _CameraLength);
|
||
|
#ifdef _FADEONOFF_ON
|
||
|
float staticSwitch161 = ( ( 1.0 - cameraDepthFade158 ) * tex2DNode33.a * _CutoutAlphalOD );
|
||
|
#else
|
||
|
float staticSwitch161 = tex2DNode33.a;
|
||
|
#endif
|
||
|
float GrassDistanceFade246 = staticSwitch161;
|
||
|
|
||
|
|
||
|
float3 Albedo = AlbedoOutput236.rgb;
|
||
|
float3 Emission = TranslucencyOutput245.rgb;
|
||
|
float Alpha = GrassDistanceFade246;
|
||
|
float AlphaClipThreshold = _Cutout;
|
||
|
|
||
|
#ifdef _ALPHATEST_ON
|
||
|
clip(Alpha - AlphaClipThreshold);
|
||
|
#endif
|
||
|
|
||
|
MetaInput metaInput = (MetaInput)0;
|
||
|
metaInput.Albedo = Albedo;
|
||
|
metaInput.Emission = Emission;
|
||
|
|
||
|
return MetaFragment(metaInput);
|
||
|
}
|
||
|
ENDHLSL
|
||
|
}
|
||
|
|
||
|
|
||
|
Pass
|
||
|
{
|
||
|
|
||
|
Name "Universal2D"
|
||
|
Tags { "LightMode"="Universal2D" }
|
||
|
|
||
|
Blend One Zero, One Zero
|
||
|
ZWrite On
|
||
|
ZTest LEqual
|
||
|
Offset 0 , 0
|
||
|
ColorMask RGBA
|
||
|
|
||
|
HLSLPROGRAM
|
||
|
|
||
|
#define _NORMAL_DROPOFF_TS 1
|
||
|
#pragma multi_compile_instancing
|
||
|
#pragma multi_compile_fog
|
||
|
#define ASE_FOG 1
|
||
|
#pragma multi_compile _ LOD_FADE_CROSSFADE
|
||
|
#define _EMISSION
|
||
|
#define _ALPHATEST_ON 1
|
||
|
#define _NORMALMAP 1
|
||
|
#define ASE_SRP_VERSION 80200
|
||
|
|
||
|
|
||
|
#pragma vertex vert
|
||
|
#pragma fragment frag
|
||
|
|
||
|
#define SHADERPASS_2D
|
||
|
|
||
|
#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/Color.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/UnityInstancing.hlsl"
|
||
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||
|
|
||
|
#define ASE_NEEDS_VERT_POSITION
|
||
|
#pragma shader_feature _COLORVARIATION_ON
|
||
|
#pragma shader_feature_local _FADEONOFF_ON
|
||
|
|
||
|
|
||
|
#pragma shader_feature _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||
|
|
||
|
struct VertexInput
|
||
|
{
|
||
|
float4 vertex : POSITION;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 ase_color : COLOR;
|
||
|
float4 ase_texcoord : TEXCOORD0;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct VertexOutput
|
||
|
{
|
||
|
float4 clipPos : SV_POSITION;
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
float3 worldPos : TEXCOORD0;
|
||
|
#endif
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
float4 shadowCoord : TEXCOORD1;
|
||
|
#endif
|
||
|
float4 ase_texcoord2 : TEXCOORD2;
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
UNITY_VERTEX_OUTPUT_STEREO
|
||
|
};
|
||
|
|
||
|
CBUFFER_START(UnityPerMaterial)
|
||
|
float4 _AlbedoColor;
|
||
|
float4 _TranslucencyColor;
|
||
|
float _GlobalWindPower;
|
||
|
float _CameraOffset;
|
||
|
float _CameraLength;
|
||
|
float _VertexAointensity;
|
||
|
float _AmbientOcclusion;
|
||
|
float _SmoothnessIntensity;
|
||
|
float _TranslucencyRange;
|
||
|
float _TranslucencyPower;
|
||
|
float _NormalIntensity;
|
||
|
float _AlbedoLightness;
|
||
|
float _GrassColorVariation;
|
||
|
float _WindSpeed;
|
||
|
float _WindPower;
|
||
|
float _WindAnglexz;
|
||
|
float _WindAngley;
|
||
|
float _FlutterFrequency;
|
||
|
float _CutoutAlphalOD;
|
||
|
float _Cutout;
|
||
|
#ifdef _TRANSMISSION_ASE
|
||
|
float _TransmissionShadow;
|
||
|
#endif
|
||
|
#ifdef _TRANSLUCENCY_ASE
|
||
|
float _TransStrength;
|
||
|
float _TransNormal;
|
||
|
float _TransScattering;
|
||
|
float _TransDirect;
|
||
|
float _TransAmbient;
|
||
|
float _TransShadow;
|
||
|
#endif
|
||
|
#ifdef TESSELLATION_ON
|
||
|
float _TessPhongStrength;
|
||
|
float _TessValue;
|
||
|
float _TessMin;
|
||
|
float _TessMax;
|
||
|
float _TessEdgeLength;
|
||
|
float _TessMaxDisp;
|
||
|
#endif
|
||
|
CBUFFER_END
|
||
|
sampler2D _AlbedoMap;
|
||
|
|
||
|
|
||
|
float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
|
||
|
float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
|
||
|
float snoise( float2 v )
|
||
|
{
|
||
|
const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
|
||
|
float2 i = floor( v + dot( v, C.yy ) );
|
||
|
float2 x0 = v - i + dot( i, C.xx );
|
||
|
float2 i1;
|
||
|
i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
|
||
|
float4 x12 = x0.xyxy + C.xxzz;
|
||
|
x12.xy -= i1;
|
||
|
i = mod2D289( i );
|
||
|
float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
|
||
|
float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
|
||
|
m = m * m;
|
||
|
m = m * m;
|
||
|
float3 x = 2.0 * frac( p * C.www ) - 1.0;
|
||
|
float3 h = abs( x ) - 0.5;
|
||
|
float3 ox = floor( x + 0.5 );
|
||
|
float3 a0 = x - ox;
|
||
|
m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
|
||
|
float3 g;
|
||
|
g.x = a0.x * x0.x + h.x * x0.y;
|
||
|
g.yz = a0.yz * x12.xz + h.yz * x12.yw;
|
||
|
return 130.0 * dot( m, g );
|
||
|
}
|
||
|
|
||
|
//https://www.shadertoy.com/view/XdXGW8
|
||
|
float2 GradientNoiseDir( float2 x )
|
||
|
{
|
||
|
const float2 k = float2( 0.3183099, 0.3678794 );
|
||
|
x = x * k + k.yx;
|
||
|
return -1.0 + 2.0 * frac( 16.0 * k * frac( x.x * x.y * ( x.x + x.y ) ) );
|
||
|
}
|
||
|
|
||
|
float GradientNoise( float2 UV, float Scale )
|
||
|
{
|
||
|
float2 p = UV * Scale;
|
||
|
float2 i = floor( p );
|
||
|
float2 f = frac( p );
|
||
|
float2 u = f * f * ( 3.0 - 2.0 * f );
|
||
|
return lerp( lerp( dot( GradientNoiseDir( i + float2( 0.0, 0.0 ) ), f - float2( 0.0, 0.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 0.0 ) ), f - float2( 1.0, 0.0 ) ), u.x ),
|
||
|
lerp( dot( GradientNoiseDir( i + float2( 0.0, 1.0 ) ), f - float2( 0.0, 1.0 ) ),
|
||
|
dot( GradientNoiseDir( i + float2( 1.0, 1.0 ) ), f - float2( 1.0, 1.0 ) ), u.x ), u.y );
|
||
|
}
|
||
|
|
||
|
float4 CalculateContrast( float contrastValue, float4 colorTarget )
|
||
|
{
|
||
|
float t = 0.5 * ( 1.0 - contrastValue );
|
||
|
return mul( float4x4( contrastValue,0,0,t, 0,contrastValue,0,t, 0,0,contrastValue,t, 0,0,0,1 ), colorTarget );
|
||
|
}
|
||
|
|
||
|
VertexOutput VertexFunction( VertexInput v )
|
||
|
{
|
||
|
VertexOutput o = (VertexOutput)0;
|
||
|
UNITY_SETUP_INSTANCE_ID( v );
|
||
|
UNITY_TRANSFER_INSTANCE_ID( v, o );
|
||
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
|
||
|
|
||
|
float3 ase_worldPos = mul(GetObjectToWorldMatrix(), v.vertex).xyz;
|
||
|
float mulTime7 = _TimeParameters.x * 0.1;
|
||
|
float simplePerlin2D34 = snoise( (ase_worldPos*1.0 + float3( ( mulTime7 * float2( -0.5,-0.5 ) ) , 0.0 )).xy*_FlutterFrequency );
|
||
|
simplePerlin2D34 = simplePerlin2D34*0.5 + 0.5;
|
||
|
float temp_output_120_0 = ( v.vertex.xyz.y + simplePerlin2D34 );
|
||
|
float gradientNoise14 = GradientNoise((ase_worldPos*1.0 + float3( ( _TimeParameters.x * float2( 0,-0.1 ) ) , 0.0 )).xy,20.0);
|
||
|
gradientNoise14 = gradientNoise14*0.5 + 0.5;
|
||
|
float4 temp_cast_6 = (gradientNoise14).xxxx;
|
||
|
float temp_output_29_0 = ( v.vertex.xyz.y * 1.2 );
|
||
|
float3 appendResult141 = (float3(temp_output_120_0 , ( ( CalculateContrast(_WindAngley,temp_cast_6) * 0.2 ) + temp_output_29_0 ).r , v.vertex.xyz.z));
|
||
|
float4 temp_cast_9 = (gradientNoise14).xxxx;
|
||
|
float4 appendResult51 = (float4(( ( CalculateContrast(_WindAnglexz,temp_cast_9) * 0.2 ) + temp_output_29_0 ).r , temp_output_120_0 , v.vertex.xyz.z , 0.0));
|
||
|
float4 lerpResult56 = lerp( float4( v.vertex.xyz , 0.0 ) , ( float4( appendResult141 , 0.0 ) + appendResult51 ) , v.ase_color.g);
|
||
|
float2 texCoord31 = v.ase_texcoord.xy * float2( 1,1 ) + float2( 0,0 );
|
||
|
float2 appendResult32 = (float2(ase_worldPos.x , ase_worldPos.z));
|
||
|
float2 appendResult35 = (float2(_TimeParameters.x , _TimeParameters.x));
|
||
|
float simplePerlin2D48 = snoise( ( appendResult32 + appendResult35 )*_WindSpeed );
|
||
|
simplePerlin2D48 = simplePerlin2D48*0.5 + 0.5;
|
||
|
float4 WindOutput253 = ( ( _GlobalWindPower * ( float4( v.vertex.xyz , 0.0 ) - lerpResult56 ) ) * ( v.ase_color.g * ( pow( ( texCoord31.y * 0.5 ) , ( 1.0 - _WindPower ) ) * simplePerlin2D48 ) ) );
|
||
|
|
||
|
float3 objectToViewPos = TransformWorldToView(TransformObjectToWorld(v.vertex.xyz));
|
||
|
float eyeDepth = -objectToViewPos.z;
|
||
|
o.ase_texcoord2.z = eyeDepth;
|
||
|
|
||
|
o.ase_texcoord2.xy = v.ase_texcoord.xy;
|
||
|
|
||
|
//setting value to unused interpolator channels and avoid initialization warnings
|
||
|
o.ase_texcoord2.w = 0;
|
||
|
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
float3 defaultVertexValue = v.vertex.xyz;
|
||
|
#else
|
||
|
float3 defaultVertexValue = float3(0, 0, 0);
|
||
|
#endif
|
||
|
float3 vertexValue = WindOutput253.xyz;
|
||
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
||
|
v.vertex.xyz = vertexValue;
|
||
|
#else
|
||
|
v.vertex.xyz += vertexValue;
|
||
|
#endif
|
||
|
|
||
|
v.ase_normal = v.ase_normal;
|
||
|
|
||
|
float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
|
||
|
float4 positionCS = TransformWorldToHClip( positionWS );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
o.worldPos = positionWS;
|
||
|
#endif
|
||
|
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
VertexPositionInputs vertexInput = (VertexPositionInputs)0;
|
||
|
vertexInput.positionWS = positionWS;
|
||
|
vertexInput.positionCS = positionCS;
|
||
|
o.shadowCoord = GetShadowCoord( vertexInput );
|
||
|
#endif
|
||
|
|
||
|
o.clipPos = positionCS;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
#if defined(TESSELLATION_ON)
|
||
|
struct VertexControl
|
||
|
{
|
||
|
float4 vertex : INTERNALTESSPOS;
|
||
|
float3 ase_normal : NORMAL;
|
||
|
float4 ase_color : COLOR;
|
||
|
float4 ase_texcoord : TEXCOORD0;
|
||
|
|
||
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||
|
};
|
||
|
|
||
|
struct TessellationFactors
|
||
|
{
|
||
|
float edge[3] : SV_TessFactor;
|
||
|
float inside : SV_InsideTessFactor;
|
||
|
};
|
||
|
|
||
|
VertexControl vert ( VertexInput v )
|
||
|
{
|
||
|
VertexControl o;
|
||
|
UNITY_SETUP_INSTANCE_ID(v);
|
||
|
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||
|
o.vertex = v.vertex;
|
||
|
o.ase_normal = v.ase_normal;
|
||
|
o.ase_color = v.ase_color;
|
||
|
o.ase_texcoord = v.ase_texcoord;
|
||
|
return o;
|
||
|
}
|
||
|
|
||
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> 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, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
||
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
||
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
||
|
tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _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<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
||
|
{
|
||
|
return patch[id];
|
||
|
}
|
||
|
|
||
|
[domain("tri")]
|
||
|
VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
||
|
{
|
||
|
VertexInput o = (VertexInput) 0;
|
||
|
o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
|
||
|
o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
|
||
|
o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
|
||
|
o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
|
||
|
#if defined(ASE_PHONG_TESSELLATION)
|
||
|
float3 pp[3];
|
||
|
for (int i = 0; i < 3; ++i)
|
||
|
pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_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
|
||
|
VertexOutput vert ( VertexInput v )
|
||
|
{
|
||
|
return VertexFunction( v );
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
half4 frag(VertexOutput IN ) : SV_TARGET
|
||
|
{
|
||
|
UNITY_SETUP_INSTANCE_ID( IN );
|
||
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||
|
float3 WorldPosition = IN.worldPos;
|
||
|
#endif
|
||
|
float4 ShadowCoords = float4( 0, 0, 0, 0 );
|
||
|
|
||
|
#if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
|
||
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
|
||
|
ShadowCoords = IN.shadowCoord;
|
||
|
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
|
||
|
ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
|
||
|
#endif
|
||
|
#endif
|
||
|
|
||
|
float2 uv_AlbedoMap33 = IN.ase_texcoord2.xy;
|
||
|
float4 tex2DNode33 = tex2D( _AlbedoMap, uv_AlbedoMap33 );
|
||
|
float4 break183 = tex2DNode33;
|
||
|
float4 transform173 = mul(GetObjectToWorldMatrix(),float4( 1,1,1,1 ));
|
||
|
float dotResult4_g17 = dot( transform173.xy , float2( 12.9898,78.233 ) );
|
||
|
float lerpResult10_g17 = lerp( 0.9 , 1.15 , frac( ( sin( dotResult4_g17 ) * 43758.55 ) ));
|
||
|
float4 appendResult186 = (float4(( break183.r * lerpResult10_g17 ) , break183.g , break183.b , 0.0));
|
||
|
float4 lerpResult194 = lerp( tex2DNode33 , appendResult186 , _GrassColorVariation);
|
||
|
#ifdef _COLORVARIATION_ON
|
||
|
float4 staticSwitch57 = lerpResult194;
|
||
|
#else
|
||
|
float4 staticSwitch57 = tex2DNode33;
|
||
|
#endif
|
||
|
float4 AlbedoOutput236 = ( _AlbedoColor * ( staticSwitch57 * _AlbedoLightness ) );
|
||
|
|
||
|
float eyeDepth = IN.ase_texcoord2.z;
|
||
|
float cameraDepthFade158 = (( eyeDepth -_ProjectionParams.y - _CameraOffset ) / _CameraLength);
|
||
|
#ifdef _FADEONOFF_ON
|
||
|
float staticSwitch161 = ( ( 1.0 - cameraDepthFade158 ) * tex2DNode33.a * _CutoutAlphalOD );
|
||
|
#else
|
||
|
float staticSwitch161 = tex2DNode33.a;
|
||
|
#endif
|
||
|
float GrassDistanceFade246 = staticSwitch161;
|
||
|
|
||
|
|
||
|
float3 Albedo = AlbedoOutput236.rgb;
|
||
|
float Alpha = GrassDistanceFade246;
|
||
|
float AlphaClipThreshold = _Cutout;
|
||
|
|
||
|
half4 color = half4( Albedo, Alpha );
|
||
|
|
||
|
#ifdef _ALPHATEST_ON
|
||
|
clip(Alpha - AlphaClipThreshold);
|
||
|
#endif
|
||
|
|
||
|
return color;
|
||
|
}
|
||
|
ENDHLSL
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
CustomEditor "UnityEditor.ShaderGraph.PBRMasterGUI"
|
||
|
Fallback "Hidden/InternalErrorShader"
|
||
|
|
||
|
}
|
||
|
/*ASEBEGIN
|
||
|
Version=18935
|
||
|
0;219;1920;667;4361.029;-63.48279;1.709121;True;True
|
||
|
Node;AmplifyShaderEditor.CommentaryNode;1;-5204.375,609.4168;Inherit;False;3036.159;810.4699;;34;121;123;62;56;52;142;51;141;205;29;202;146;118;27;120;45;143;34;23;145;17;14;15;144;24;10;16;5;7;9;4;2;3;18;Vertex Wind_Layer A;0,0.7931032,1,1;0;0
|
||
|
Node;AmplifyShaderEditor.SimpleTimeNode;3;-5050.966,702.9636;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.Vector2Node;2;-5115.641,800.054;Inherit;False;Constant;_EdgeFlutterFrequency;Edge Flutter Frequency;14;0;Create;True;0;0;0;True;0;False;0,-0.1;0,-0.1;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
|
||
|
Node;AmplifyShaderEditor.CommentaryNode;22;-4216.001,-571.549;Inherit;False;2343.386;1166.695;;43;238;245;236;126;157;208;259;210;153;135;207;128;73;55;209;152;134;260;63;89;151;244;221;70;217;65;117;225;113;254;90;57;91;227;59;200;228;201;33;271;272;277;278;Base Inputs;1,1,1,1;0;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;4;-4870.226,758.9711;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
|
||
|
Node;AmplifyShaderEditor.WorldPosInputsNode;5;-5055.481,954.0665;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
|
||
|
Node;AmplifyShaderEditor.SamplerNode;33;-3936.256,-296.3244;Inherit;True;Property;_AlbedoMap;Albedo Map;5;1;[NoScaleOffset];Create;True;0;0;0;True;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;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;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
Node;AmplifyShaderEditor.WireNode;201;-3646.996,-110.406;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.Vector2Node;9;-5060.922,1218.869;Inherit;False;Constant;_Vector1;Vector 1;12;0;Create;True;0;0;0;True;0;False;-0.5,-0.5;0.5,0.5;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
|
||
|
Node;AmplifyShaderEditor.SimpleTimeNode;7;-5052.362,1118.497;Inherit;False;1;0;FLOAT;0.1;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.ScaleAndOffsetNode;10;-4717.022,826.8184;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT;1;False;2;FLOAT3;0,0,0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.WireNode;228;-3898.889,-86.15732;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.CommentaryNode;195;-5322.509,-573.1503;Inherit;False;1055.403;552.1744;Comment;10;199;194;198;162;186;184;183;180;173;229;Grass Color Variation;0.7504205,1,0,1;0;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;16;-4845.298,1178.182;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
|
||
|
Node;AmplifyShaderEditor.NoiseGeneratorNode;14;-4487.37,671.1433;Inherit;True;Gradient;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;20;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;144;-4503.605,999.7039;Inherit;False;Property;_WindAngley;Wind Angle (y);22;0;Create;True;0;0;0;True;0;False;20;10;-100;100;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleContrastOpNode;145;-4196.605,894.7039;Inherit;True;2;1;COLOR;0,0,0,0;False;0;FLOAT;0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;15;-4505.262,908.5745;Inherit;False;Property;_WindAnglexz;Wind Angle (xz);21;0;Create;True;0;0;0;True;0;False;20;40;-200;200;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;229;-4501.689,-114.5986;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.ScaleAndOffsetNode;24;-4716.532,958.799;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT;1;False;2;FLOAT3;0,0,0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.WireNode;198;-5061.319,-166.0125;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.ObjectToWorldTransfNode;173;-5256.75,-509.8167;Inherit;False;1;0;FLOAT4;1,1,1,1;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
Node;AmplifyShaderEditor.PosVertexDataNode;18;-3994.522,1207.768;Inherit;False;0;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
Node;AmplifyShaderEditor.SimpleContrastOpNode;23;-4234.978,666.5739;Inherit;True;2;1;COLOR;0,0,0,0;False;0;FLOAT;0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.WireNode;118;-4545.083,1150.857;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.ScaleNode;146;-3954.914,898.6412;Inherit;False;0.2;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;17;-4553.096,1250.353;Inherit;False;Property;_FlutterFrequency;Flutter Frequency;20;0;Create;True;0;0;0;True;0;False;2;2;0;5;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.NoiseGeneratorNode;34;-4233.404,1159.289;Inherit;True;Simplex2D;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.CommentaryNode;11;-3553.389,1504.292;Inherit;False;1373.475;707.0101;;14;21;31;36;64;60;48;50;38;44;37;39;30;35;32;Vertex Wind_Layer B;1,1,1,1;0;0
|
||
|
Node;AmplifyShaderEditor.ScaleNode;29;-3760.063,1054.559;Inherit;False;1.2;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;202;-3662.513,939.6882;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.ScaleNode;27;-3990.62,669.1539;Inherit;False;0.2;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.BreakToComponentsNode;183;-5057.661,-397.1574;Inherit;False;COLOR;1;0;COLOR;0,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.FunctionNode;180;-5056.521,-519.6232;Inherit;False;Random Range;-1;;17;7b754edb8aebbfb4a9ace907af661cfc;0;3;1;FLOAT2;0,0;False;2;FLOAT;0.9;False;3;FLOAT;1.15;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;205;-3803.176,1065.298;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;200;-3747.219,-429.6998;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;184;-4867.658,-453.7746;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleAddOpNode;45;-3574.481,887.2444;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.SimpleAddOpNode;143;-3548.93,1126.855;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.WireNode;213;-4772.875,1774.564;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;212;-4800.806,1825.345;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleTimeNode;21;-3494.454,2098.178;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleAddOpNode;120;-3578.439,664.0344;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.DynamicAppendNode;186;-4727.744,-391.0389;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.WireNode;199;-4520.792,-167.8321;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;162;-4856.865,-242.9268;Inherit;False;Property;_GrassColorVariation;Grass Color Variation;4;0;Create;True;0;0;0;False;0;False;0.6;1;0;5;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.TextureCoordinatesNode;31;-3507.724,1565.292;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
Node;AmplifyShaderEditor.DynamicAppendNode;141;-3253.517,675.6587;Inherit;True;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.DynamicAppendNode;51;-3260.184,896.5288;Inherit;True;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.DynamicAppendNode;35;-3300.589,2091.127;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
|
||
|
Node;AmplifyShaderEditor.DynamicAppendNode;32;-3271.59,1994.127;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
|
||
|
Node;AmplifyShaderEditor.CommentaryNode;211;-3988.725,-1570.191;Inherit;False;1289.431;412.6073;Comment;8;161;160;169;159;158;170;171;246;Grass Distance Fade;1,1,1,1;0;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;30;-3346.996,1812.752;Inherit;False;Property;_WindPower;Wind Power;19;0;Create;True;0;0;0;False;0;False;1;0.9;0;0.9;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;36;-3472.686,1696.372;Inherit;False;Constant;_WindGradient;Wind Gradient;9;0;Create;True;0;0;0;False;0;False;0.5;0.5;0;0;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;37;-3216.794,1904.803;Inherit;False;Property;_WindSpeed;Wind Speed;18;0;Create;True;0;0;0;False;0;False;1;1;0;2;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.LerpOp;194;-4533.33,-402.1788;Inherit;True;3;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT;0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.SimpleAddOpNode;142;-3001.518,741.1985;Inherit;True;2;2;0;FLOAT3;0,0,0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;170;-3949.725,-1519.191;Inherit;False;Property;_CameraLength;Camera Length;25;0;Create;True;0;0;0;False;0;False;0;40;0;0;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleAddOpNode;44;-3095.876,2039.412;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;171;-3947.725,-1392.192;Inherit;False;Property;_CameraOffset;Camera Offset;26;0;Create;True;0;0;0;False;0;False;0;30;0;0;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.VertexColorNode;52;-3210.386,1192.007;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;38;-3222.037,1581.95;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.OneMinusNode;39;-3071.449,1805.005;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.LerpOp;56;-2716.511,1032.083;Inherit;False;3;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT;0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.NoiseGeneratorNode;48;-2905.422,1830.782;Inherit;True;Simplex2D;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.CameraDepthFade;158;-3776.299,-1491.247;Inherit;False;3;2;FLOAT3;0,0,0;False;0;FLOAT;60;False;1;FLOAT;25;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.PowerNode;50;-2937.689,1573.056;Inherit;True;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;227;-3722.079,-349.2048;Inherit;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;60;-2660.146,1730.257;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;209;-3556.401,-501.6639;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;169;-3678.579,-1353.1;Inherit;False;Property;_CutoutAlphalOD;Cutout Alpha lOD;24;0;Create;True;0;0;0;False;0;False;1;0.8;0;0;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleSubtractOpNode;62;-2545.483,928.8225;Inherit;True;2;0;FLOAT3;0,0,0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;55;-3566.588,-209.3899;Inherit;False;Property;_AlbedoLightness;Albedo Lightness;1;0;Create;True;0;0;0;True;0;False;1;1;0;5;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.StaticSwitch;57;-3523.359,-317.3572;Inherit;False;Property;_ColorVariation;Color Variation;2;0;Create;True;0;0;0;True;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;False;True;All;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;123;-2624.881,837.0327;Inherit;False;Property;_GlobalWindPower;Global Wind Power;17;0;Create;True;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.OneMinusNode;159;-3533.299,-1486.946;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;73;-3267.356,-259.0565;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.ColorNode;128;-3491.881,-495.1998;Inherit;False;Property;_AlbedoColor;Albedo Color;0;0;Create;True;0;0;0;False;0;False;1,1,1,0;1,1,1,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
Node;AmplifyShaderEditor.CommentaryNode;214;-2115.338,1122.344;Inherit;False;285;304;Comment;1;69;Final Wind;1,1,1,1;0;0
|
||
|
Node;AmplifyShaderEditor.WireNode;210;-3536.411,-497.022;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;64;-2423.016,1605.542;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;160;-3373.684,-1399.111;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;121;-2330.121,876.3655;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT4;0,0,0,0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;69;-2065.338,1172.344;Inherit;True;2;2;0;FLOAT4;0,0,0,0;False;1;FLOAT;0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;126;-3126,-364.2295;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.StaticSwitch;161;-3227.573,-1360.258;Inherit;False;Property;_FadeOnOff;Fade On/Off;23;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;236;-2244.708,-205.3391;Inherit;False;AlbedoOutput;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;253;-1798.304,1176.395;Inherit;False;WindOutput;-1;True;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.CommentaryNode;132;-2131.984,1522.099;Inherit;False;1202.948;374.0176;Comment;5;109;108;222;111;250;Vertex Ao Switch;1,1,1,1;0;0
|
||
|
Node;AmplifyShaderEditor.CommentaryNode;232;-3371.861,-1102.134;Inherit;False;1173.995;473.4484;Comment;5;66;53;46;42;233;Fresnel Base;1,1,1,1;0;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;246;-2993.609,-1357.844;Inherit;False;GrassDistanceFade;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.CommentaryNode;88;-3578.179,2291.333;Inherit;False;1436.148;585.5387;Comment;13;216;85;87;86;83;80;84;78;77;79;76;75;258;Translucency Base;1,1,1,1;0;0
|
||
|
Node;AmplifyShaderEditor.SamplerNode;59;-3915.083,247.5;Inherit;True;Property;_MaskMap;Mask Map;9;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;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;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;91;-3587.063,464.8436;Inherit;False;Property;_SmoothnessIntensity;Smoothness Intensity;10;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;216;-2369.981,2567.832;Inherit;False;TranslucencyBase;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;53;-2917.594,-977.6501;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;233;-2443.89,-1049.405;Inherit;False;FresnelBase;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.DynamicAppendNode;153;-3454.683,63.29012;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.SimpleAddOpNode;78;-3063.362,2542.703;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;245;-2261.19,-25.25538;Inherit;False;TranslucencyOutput;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;239;-331.08,-54.5589;Inherit;False;238;NormalMapOutput;1;0;OBJECT;;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.FaceVariableNode;151;-3739.403,167.0617;Inherit;False;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;250;-1215.649,1711.598;Inherit;False;AoOutput;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;225;-2250.871,77.86255;Inherit;False;SmoothnessOutput;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;208;-2593.239,148.5372;Inherit;False;3;3;0;COLOR;0,0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT;0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.LightAttenuation;272;-2680.47,13.10501;Inherit;False;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.StaticSwitch;157;-3287.06,-76.03461;Inherit;False;Property;_NormalBackFaceFixBranch;Normal BackFace Fix (Branch);8;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;FLOAT3;0,0,0;False;0;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;4;FLOAT3;0,0,0;False;5;FLOAT3;0,0,0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT3;0,0,0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;152;-3589.12,141.7624;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.DynamicAppendNode;259;-3450.144,-105.0254;Inherit;False;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.WorldSpaceLightDirHlpNode;79;-3454.489,2346.333;Inherit;False;True;1;0;FLOAT;0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;251;-290.5127,229.7268;Inherit;False;250;AoOutput;1;0;OBJECT;;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;66;-2702.315,-1052.133;Inherit;True;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.WireNode;226;-3447.983,-832.2581;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;238;-2251.358,-112.1982;Inherit;False;NormalMapOutput;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.BlendOpsNode;108;-1759.883,1605.814;Inherit;True;Multiply;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;134;-2927.334,184.1541;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.LightColorNode;207;-2778.057,219.2164;Inherit;False;0;3;COLOR;0;FLOAT3;1;FLOAT;2
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;135;-2777.548,105.4842;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;221;-2233.949,171.7417;Inherit;False;AoBase;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.PowerNode;117;-3593.754,240.7053;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.StaticSwitch;109;-1458.316,1696.129;Inherit;False;Property;_VertexAo;Vertex Ao;15;0;Create;True;0;0;0;False;0;False;0;1;1;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;222;-2042.559,1647.606;Inherit;False;221;AoBase;1;0;OBJECT;;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;260;-3593.581,-63.55314;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;223;-2323.348,1446.469;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;248;-352.2792,53.53506;Inherit;False;245;TranslucencyOutput;1;0;OBJECT;;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.ViewDirInputsCoordNode;84;-3101.632,2389.974;Inherit;False;World;True;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
|
||
|
Node;AmplifyShaderEditor.DotProductOpNode;83;-2783.8,2473.449;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;111;-2081.984,1749.687;Inherit;False;Property;_VertexAointensity;Vertex Ao intensity;16;0;Create;True;0;0;0;False;0;False;0;0.52;0;1;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.ColorNode;86;-3064.373,2671.478;Inherit;False;Property;_TranslucencyColor;Translucency Color;11;0;Create;True;0;0;0;False;0;False;0.5,0.5,0.5,0;1,1,1,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
Node;AmplifyShaderEditor.WireNode;277;-2520.915,445.5934;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;244;-3157.421,136.3327;Inherit;False;233;FresnelBase;1;0;OBJECT;;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;113;-3895.451,471.7122;Inherit;False;Property;_AmbientOcclusion;Ambient Occlusion;14;0;Create;True;0;0;0;False;0;False;1;1;0;1;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;124;-3664.753,2345.522;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.SaturateNode;85;-2515.772,2574.105;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;77;-3205.12,2639.121;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;217;-3389.697,296.4232;Inherit;False;216;TranslucencyBase;1;0;OBJECT;;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.WireNode;230;-3528.419,-921.5862;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;65;-4186.325,22.59504;Inherit;False;Property;_NormalIntensity;Normal Intensity;7;0;Create;True;0;0;0;False;0;False;0;1;-3;3;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;271;-2465.009,14.11078;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.WireNode;254;-2514.928,365.3991;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;90;-3354.915,396.3879;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;87;-2651.372,2571.478;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RegisterLocalVarNode;258;-2622.327,2444.959;Inherit;False;TranslucencyNoC;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;89;-3152,243.2303;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;76;-3446.619,2717.69;Inherit;False;Property;_TranslucencyRange;Translucency Range;13;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;63;-3075.262,42.58302;Inherit;False;Property;_TranslucencyPower;Translucency Power;12;0;Create;True;0;0;0;False;0;False;8;15;0;40;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.WireNode;278;-3447.136,347.2464;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;249;-338.0674,148.2529;Inherit;False;225;SmoothnessOutput;1;0;OBJECT;;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;252;-303.4424,501.9265;Inherit;False;253;WindOutput;1;0;OBJECT;;False;1;FLOAT4;0
|
||
|
Node;AmplifyShaderEditor.SamplerNode;70;-3914.615,-29.38072;Inherit;True;Property;_NormalMap;Normal Map;6;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;None;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;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;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
||
|
Node;AmplifyShaderEditor.NegateNode;80;-2929.528,2541.27;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
|
||
|
Node;AmplifyShaderEditor.TransformDirectionNode;75;-3444.758,2546.719;Inherit;False;Object;World;True;Fast;False;1;0;FLOAT3;0,0,0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;237;-332.6181,-147.9459;Inherit;False;236;AlbedoOutput;1;0;OBJECT;;False;1;COLOR;0
|
||
|
Node;AmplifyShaderEditor.SaturateNode;46;-3081.405,-833.2057;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.GetLocalVarNode;247;-337.1431,324.0378;Inherit;False;246;GrassDistanceFade;1;0;OBJECT;;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.RangedFloatNode;273;-386.126,405.7122;Inherit;False;Property;_Cutout;Cutout;3;0;Create;True;0;0;0;False;0;False;0.4;0.408;0;1;0;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.FresnelNode;42;-3321.861,-837.8929;Inherit;False;Standard;WorldNormal;ViewDir;False;False;5;0;FLOAT3;0,0,1;False;4;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;5;False;1;FLOAT;0
|
||
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;261;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;True;1;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;0;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;265;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;263;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=ShadowCaster;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;266;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=Universal2D;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;264;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphLitGUI;0;1;New Amplify Shader;94348b07e5e8bab40bd6c8a1e3df54cd;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;True;False;False;False;False;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;False;False;True;1;LightMode=DepthOnly;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
|
||
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;262;0,0;Float;False;True;-1;2;UnityEditor.ShaderGraph.PBRMasterGUI;0;2;Tobyfredson/Grass Foliage Basic (URP);94348b07e5e8bab40bd6c8a1e3df54cd;True;Forward;0;1;Forward;18;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;2;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;18;all;0;False;True;1;1;False;-1;0;False;-1;1;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;1;LightMode=UniversalForward;False;False;0;Hidden/InternalErrorShader;0;0;Standard;38;Workflow;1;0;Surface;0;0; Refraction Model;0;0; Blend;0;0;Two Sided;0;637807835902892981;Fragment Normal Space,InvertActionOnDeselection;0;0;Transmission;0;0; Transmission Shadow;0.5,False,-1;0;Translucency;0;0; Translucency Strength;1,False,-1;0; Normal Distortion;0.5,False,-1;0; Scattering;2,False,-1;0; Direct;0.9,False,-1;0; Ambient;0.1,False,-1;0; Shadow;0.5,False,-1;0;Cast Shadows;1;0; Use Shadow Threshold;0;0;Receive Shadows;1;0;GPU Instancing;1;0;LOD CrossFade;1;637807836056723975;Built-in Fog;1;0;_FinalColorxAlpha;0;0;Meta Pass;1;637807838539285466;Override Baked GI;0;0;Extra Pre Pass;0;0;DOTS Instancing;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,-1;0; Type;0;0; Tess;16,False,-1;0; Min;10,False,-1;0; Max;25,False,-1;0; Edge Length;16,False,-1;0; Max Displacement;25,False,-1;0;Write Depth;0;0; Early Z;0;0;Vertex Position,InvertActionOnDeselection;1;0;0;6;False;True;True;True;True;True;False;;False;0
|
||
|
WireConnection;4;0;3;0
|
||
|
WireConnection;4;1;2;0
|
||
|
WireConnection;201;0;33;0
|
||
|
WireConnection;10;0;5;0
|
||
|
WireConnection;10;2;4;0
|
||
|
WireConnection;228;0;201;0
|
||
|
WireConnection;16;0;7;0
|
||
|
WireConnection;16;1;9;0
|
||
|
WireConnection;14;0;10;0
|
||
|
WireConnection;145;1;14;0
|
||
|
WireConnection;145;0;144;0
|
||
|
WireConnection;229;0;228;0
|
||
|
WireConnection;24;0;5;0
|
||
|
WireConnection;24;2;16;0
|
||
|
WireConnection;198;0;229;0
|
||
|
WireConnection;23;1;14;0
|
||
|
WireConnection;23;0;15;0
|
||
|
WireConnection;118;0;24;0
|
||
|
WireConnection;146;0;145;0
|
||
|
WireConnection;34;0;118;0
|
||
|
WireConnection;34;1;17;0
|
||
|
WireConnection;29;0;18;2
|
||
|
WireConnection;202;0;146;0
|
||
|
WireConnection;27;0;23;0
|
||
|
WireConnection;183;0;198;0
|
||
|
WireConnection;180;1;173;0
|
||
|
WireConnection;205;0;18;2
|
||
|
WireConnection;200;0;33;0
|
||
|
WireConnection;184;0;183;0
|
||
|
WireConnection;184;1;180;0
|
||
|
WireConnection;45;0;27;0
|
||
|
WireConnection;45;1;29;0
|
||
|
WireConnection;143;0;202;0
|
||
|
WireConnection;143;1;29;0
|
||
|
WireConnection;213;0;5;1
|
||
|
WireConnection;212;0;5;3
|
||
|
WireConnection;120;0;205;0
|
||
|
WireConnection;120;1;34;0
|
||
|
WireConnection;186;0;184;0
|
||
|
WireConnection;186;1;183;1
|
||
|
WireConnection;186;2;183;2
|
||
|
WireConnection;199;0;200;0
|
||
|
WireConnection;141;0;120;0
|
||
|
WireConnection;141;1;143;0
|
||
|
WireConnection;141;2;18;3
|
||
|
WireConnection;51;0;45;0
|
||
|
WireConnection;51;1;120;0
|
||
|
WireConnection;51;2;18;3
|
||
|
WireConnection;35;0;21;0
|
||
|
WireConnection;35;1;21;0
|
||
|
WireConnection;32;0;213;0
|
||
|
WireConnection;32;1;212;0
|
||
|
WireConnection;194;0;199;0
|
||
|
WireConnection;194;1;186;0
|
||
|
WireConnection;194;2;162;0
|
||
|
WireConnection;142;0;141;0
|
||
|
WireConnection;142;1;51;0
|
||
|
WireConnection;44;0;32;0
|
||
|
WireConnection;44;1;35;0
|
||
|
WireConnection;38;0;31;2
|
||
|
WireConnection;38;1;36;0
|
||
|
WireConnection;39;0;30;0
|
||
|
WireConnection;56;0;18;0
|
||
|
WireConnection;56;1;142;0
|
||
|
WireConnection;56;2;52;2
|
||
|
WireConnection;48;0;44;0
|
||
|
WireConnection;48;1;37;0
|
||
|
WireConnection;158;0;170;0
|
||
|
WireConnection;158;1;171;0
|
||
|
WireConnection;50;0;38;0
|
||
|
WireConnection;50;1;39;0
|
||
|
WireConnection;227;0;194;0
|
||
|
WireConnection;60;0;50;0
|
||
|
WireConnection;60;1;48;0
|
||
|
WireConnection;209;0;33;4
|
||
|
WireConnection;62;0;18;0
|
||
|
WireConnection;62;1;56;0
|
||
|
WireConnection;57;1;33;0
|
||
|
WireConnection;57;0;227;0
|
||
|
WireConnection;159;0;158;0
|
||
|
WireConnection;73;0;57;0
|
||
|
WireConnection;73;1;55;0
|
||
|
WireConnection;210;0;33;4
|
||
|
WireConnection;64;0;52;2
|
||
|
WireConnection;64;1;60;0
|
||
|
WireConnection;160;0;159;0
|
||
|
WireConnection;160;1;209;0
|
||
|
WireConnection;160;2;169;0
|
||
|
WireConnection;121;0;123;0
|
||
|
WireConnection;121;1;62;0
|
||
|
WireConnection;69;0;121;0
|
||
|
WireConnection;69;1;64;0
|
||
|
WireConnection;126;0;128;0
|
||
|
WireConnection;126;1;73;0
|
||
|
WireConnection;161;1;210;0
|
||
|
WireConnection;161;0;160;0
|
||
|
WireConnection;236;0;126;0
|
||
|
WireConnection;253;0;69;0
|
||
|
WireConnection;246;0;161;0
|
||
|
WireConnection;216;0;85;0
|
||
|
WireConnection;53;0;226;0
|
||
|
WireConnection;53;1;46;0
|
||
|
WireConnection;233;0;66;0
|
||
|
WireConnection;153;0;70;1
|
||
|
WireConnection;153;1;70;2
|
||
|
WireConnection;153;2;152;0
|
||
|
WireConnection;78;0;79;0
|
||
|
WireConnection;78;1;77;0
|
||
|
WireConnection;245;0;271;0
|
||
|
WireConnection;250;0;109;0
|
||
|
WireConnection;225;0;254;0
|
||
|
WireConnection;208;0;135;0
|
||
|
WireConnection;208;1;207;1
|
||
|
WireConnection;208;2;207;2
|
||
|
WireConnection;157;1;259;0
|
||
|
WireConnection;157;0;153;0
|
||
|
WireConnection;152;0;70;3
|
||
|
WireConnection;152;1;151;0
|
||
|
WireConnection;259;0;70;1
|
||
|
WireConnection;259;1;260;0
|
||
|
WireConnection;259;2;70;3
|
||
|
WireConnection;66;0;230;0
|
||
|
WireConnection;66;1;53;0
|
||
|
WireConnection;226;0;57;0
|
||
|
WireConnection;238;0;157;0
|
||
|
WireConnection;108;0;223;0
|
||
|
WireConnection;108;1;222;0
|
||
|
WireConnection;108;2;111;0
|
||
|
WireConnection;134;0;244;0
|
||
|
WireConnection;134;1;89;0
|
||
|
WireConnection;135;0;63;0
|
||
|
WireConnection;135;1;134;0
|
||
|
WireConnection;221;0;277;0
|
||
|
WireConnection;117;0;59;2
|
||
|
WireConnection;117;1;113;0
|
||
|
WireConnection;109;1;222;0
|
||
|
WireConnection;109;0;108;0
|
||
|
WireConnection;260;0;70;2
|
||
|
WireConnection;260;1;151;0
|
||
|
WireConnection;223;0;52;1
|
||
|
WireConnection;83;0;84;0
|
||
|
WireConnection;83;1;80;0
|
||
|
WireConnection;277;0;278;0
|
||
|
WireConnection;124;0;18;0
|
||
|
WireConnection;85;0;87;0
|
||
|
WireConnection;77;0;75;0
|
||
|
WireConnection;77;1;76;0
|
||
|
WireConnection;230;0;59;3
|
||
|
WireConnection;271;0;272;0
|
||
|
WireConnection;271;1;208;0
|
||
|
WireConnection;254;0;90;0
|
||
|
WireConnection;90;0;59;4
|
||
|
WireConnection;90;1;91;0
|
||
|
WireConnection;87;0;83;0
|
||
|
WireConnection;87;1;86;0
|
||
|
WireConnection;258;0;83;0
|
||
|
WireConnection;89;0;59;3
|
||
|
WireConnection;89;1;217;0
|
||
|
WireConnection;278;0;117;0
|
||
|
WireConnection;70;5;65;0
|
||
|
WireConnection;80;0;78;0
|
||
|
WireConnection;75;0;124;0
|
||
|
WireConnection;46;0;42;0
|
||
|
WireConnection;262;0;237;0
|
||
|
WireConnection;262;1;239;0
|
||
|
WireConnection;262;2;248;0
|
||
|
WireConnection;262;4;249;0
|
||
|
WireConnection;262;5;251;0
|
||
|
WireConnection;262;6;247;0
|
||
|
WireConnection;262;7;273;0
|
||
|
WireConnection;262;8;252;0
|
||
|
ASEEND*/
|
||
|
//CHKSM=6B81FA7A4D0E0BD2138DA46439C9B198B5487E65
|