2539 lines
116 KiB
GLSL
2539 lines
116 KiB
GLSL
// Made with Amplify Shader Editor v1.9.9.8
|
|
// Available at the Unity Asset Store - http://u3d.as/y3X
|
|
Shader "ToonScapes/URP/Background"
|
|
{
|
|
Properties
|
|
{
|
|
[HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
|
|
[Header(Fog)][Space(8)][Toggle( _ENABLEFOG_ON )] _EnableFog( "Enable Fog", Float ) = 1
|
|
_FogHeight( "Fog Height", Range( 0, 10000 ) ) = 1
|
|
_FogDensity( "Fog Density", Range( 0, 1 ) ) = 1
|
|
[Header(Color)][Space(8)][Toggle( _ENABLECOLORTINT_ON )] _EnableColorTint( "Enable Color Tint", Float ) = 1
|
|
[Space(8)] _BaseTint( "Base Tint", Color ) = ( 1, 1, 1, 1 )
|
|
[Header(Textures)][NoScaleOffset][SingleLineTexture][Space (8)] _TextureRamp( "Texture Ramp", 2D ) = "white" {}
|
|
_RampScale( "Ramp Scale", Range( 0, 1 ) ) = 0.5
|
|
_RampOffset( "Ramp Offset", Range( 0, 1 ) ) = 0.5
|
|
[NoScaleOffset][SingleLineTexture][Space (8)] _MainTexture( "Main Texture", 2D ) = "white" {}
|
|
[NoScaleOffset][Normal][SingleLineTexture][Space (8)] _NormalMap( "Normal Map", 2D ) = "white" {}
|
|
_NormalScale( "Normal Scale", Range( 0, 5 ) ) = 1
|
|
|
|
|
|
//_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
|
|
//_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
|
|
//_TessMin( "Tess Min Distance", Float ) = 10
|
|
//_TessMax( "Tess Max Distance", Float ) = 25
|
|
//_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
|
|
//_TessMaxDisp( "Tess Max Displacement", Float ) = 25
|
|
|
|
[HideInInspector] _QueueOffset("_QueueOffset", Float) = 0
|
|
[HideInInspector] _QueueControl("_QueueControl", Float) = -1
|
|
|
|
[HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
|
|
[HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
|
|
[HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
|
|
|
|
[HideInInspector][ToggleUI] _AddPrecomputedVelocity("Add Precomputed Velocity", Float) = 1
|
|
[HideInInspector][ToggleUI] _ReceiveShadows("Receive Shadows", Float) = 1.0
|
|
|
|
[HideInInspector] _XRMotionVectorsPass("_XRMotionVectorsPass", Float) = 1
|
|
|
|
//[HideInInspector] _AlphaClip("__clip", Float) = 0.0
|
|
}
|
|
|
|
SubShader
|
|
{
|
|
LOD 0
|
|
|
|
|
|
|
|
|
|
|
|
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Opaque" "Queue"="Geometry" "UniversalMaterialType"="Unlit" }
|
|
|
|
Cull Back
|
|
AlphaToMask Off
|
|
|
|
|
|
|
|
HLSLINCLUDE
|
|
#pragma target 4.5
|
|
#pragma prefer_hlslcc gles
|
|
// ensure rendering platforms toggle list is visible
|
|
|
|
#if ( SHADER_TARGET > 35 ) && defined( SHADER_API_GLES3 )
|
|
#error For WebGL2/GLES3, please set your shader target to 3.5 via SubShader options. URP shaders in ASE use target 4.5 by default.
|
|
#endif
|
|
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
|
|
|
|
#ifndef ASE_TESS_FUNCS
|
|
#define ASE_TESS_FUNCS
|
|
float4 FixedTess( float tessValue )
|
|
{
|
|
return tessValue;
|
|
}
|
|
|
|
float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
|
|
{
|
|
float3 wpos = mul(o2w,vertex).xyz;
|
|
float dist = distance (wpos, cameraPos);
|
|
float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
|
|
return f;
|
|
}
|
|
|
|
float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
|
|
{
|
|
float4 tess;
|
|
tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
|
|
tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
|
|
tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
|
|
tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
|
|
return tess;
|
|
}
|
|
|
|
float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
|
|
{
|
|
float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
|
|
float len = distance(wpos0, wpos1);
|
|
float f = max(len * scParams.y / (edgeLen * dist), 1.0);
|
|
return f;
|
|
}
|
|
|
|
float DistanceFromPlane (float3 pos, float4 plane)
|
|
{
|
|
float d = dot (float4(pos,1.0f), plane);
|
|
return d;
|
|
}
|
|
|
|
bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
|
|
{
|
|
float4 planeTest;
|
|
planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
|
|
(( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
|
|
(( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
|
|
planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
|
|
(( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
|
|
(( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
|
|
planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
|
|
(( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
|
|
(( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
|
|
planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
|
|
(( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
|
|
(( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
|
|
return !all (planeTest);
|
|
}
|
|
|
|
float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
|
|
{
|
|
float3 f;
|
|
f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
|
|
f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
|
|
f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
|
|
|
|
return CalcTriEdgeTessFactors (f);
|
|
}
|
|
|
|
float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
|
|
{
|
|
float3 pos0 = mul(o2w,v0).xyz;
|
|
float3 pos1 = mul(o2w,v1).xyz;
|
|
float3 pos2 = mul(o2w,v2).xyz;
|
|
float4 tess;
|
|
tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
|
|
tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
|
|
tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
|
|
tess.w = (tess.x + tess.y + tess.z) / 3.0f;
|
|
return tess;
|
|
}
|
|
|
|
float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
|
|
{
|
|
float3 pos0 = mul(o2w,v0).xyz;
|
|
float3 pos1 = mul(o2w,v1).xyz;
|
|
float3 pos2 = mul(o2w,v2).xyz;
|
|
float4 tess;
|
|
|
|
if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
|
|
{
|
|
tess = 0.0f;
|
|
}
|
|
else
|
|
{
|
|
tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
|
|
tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
|
|
tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
|
|
tess.w = (tess.x + tess.y + tess.z) / 3.0f;
|
|
}
|
|
return tess;
|
|
}
|
|
#endif //ASE_TESS_FUNCS
|
|
ENDHLSL
|
|
|
|
|
|
Pass
|
|
{
|
|
|
|
Name "Forward"
|
|
Tags { "LightMode"="UniversalForwardOnly" }
|
|
|
|
Blend One Zero, One Zero
|
|
ZWrite On
|
|
ZTest LEqual
|
|
Offset 0 , 0
|
|
ColorMask RGBA
|
|
|
|
|
|
|
|
HLSLPROGRAM
|
|
|
|
#pragma shader_feature_local_fragment _RECEIVE_SHADOWS_OFF
|
|
#define ASE_VERSION 19908
|
|
#define ASE_SRP_VERSION 170100
|
|
|
|
|
|
#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
|
|
|
|
#pragma multi_compile_fragment _ DEBUG_DISPLAY
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define SHADERPASS SHADERPASS_UNLIT
|
|
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
|
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
|
|
#endif
|
|
|
|
#define ASE_NEEDS_TEXTURE_COORDINATES0
|
|
#define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0
|
|
#define ASE_NEEDS_FRAG_WORLD_TANGENT
|
|
#define ASE_NEEDS_WORLD_NORMAL
|
|
#define ASE_NEEDS_FRAG_WORLD_NORMAL
|
|
#define ASE_NEEDS_FRAG_WORLD_BITANGENT
|
|
#define ASE_NEEDS_WORLD_POSITION
|
|
#define ASE_NEEDS_FRAG_WORLD_POSITION
|
|
#define ASE_NEEDS_FRAG_SHADOWCOORDS
|
|
#define ASE_NEEDS_VERT_NORMAL
|
|
#define ASE_NEEDS_FRAG_WORLD_VIEW_DIR
|
|
#define ASE_NEEDS_FRAG_SCREEN_POSITION_NORMALIZED
|
|
#pragma shader_feature_local _ENABLEFOG_ON
|
|
#pragma shader_feature_local _ENABLECOLORTINT_ON
|
|
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
|
|
#pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
|
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
|
|
#pragma multi_compile _ LIGHTMAP_BICUBIC_SAMPLING
|
|
#pragma multi_compile_fragment _ _REFLECTION_PROBE_ATLAS
|
|
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
|
|
#pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
|
|
#pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
|
|
#pragma multi_compile _ _CLUSTER_LIGHT_LOOP
|
|
#pragma multi_compile _ _LIGHT_LAYERS
|
|
|
|
|
|
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
|
|
#define ASE_SV_DEPTH SV_DepthLessEqual
|
|
#define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
|
|
#else
|
|
#define ASE_SV_DEPTH SV_Depth
|
|
#define ASE_SV_POSITION_QUALIFIERS
|
|
#endif
|
|
|
|
struct Attributes
|
|
{
|
|
float4 positionOS : POSITION;
|
|
half3 normalOS : NORMAL;
|
|
half4 tangentOS : TANGENT;
|
|
float4 ase_texcoord : TEXCOORD0;
|
|
float4 texcoord1 : TEXCOORD1;
|
|
float4 texcoord2 : TEXCOORD2;
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct PackedVaryings
|
|
{
|
|
ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float4 positionWSAndFogFactor : TEXCOORD0;
|
|
half3 normalWS : TEXCOORD1;
|
|
half4 tangentWS : TEXCOORD2;
|
|
float4 ase_texcoord3 : TEXCOORD3;
|
|
float4 lightmapUVOrVertexSH : TEXCOORD4;
|
|
float4 dynamicLightmapUV : TEXCOORD5;
|
|
float4 ase_texcoord6 : TEXCOORD6;
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
};
|
|
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _BaseTint;
|
|
float _NormalScale;
|
|
float _RampScale;
|
|
float _RampOffset;
|
|
float _FogHeight;
|
|
float _FogDensity;
|
|
float _AlphaClip;
|
|
float _Cutoff;
|
|
#ifdef ASE_TESSELLATION
|
|
float _TessPhongStrength;
|
|
float _TessValue;
|
|
float _TessMin;
|
|
float _TessMax;
|
|
float _TessEdgeLength;
|
|
float _TessMaxDisp;
|
|
#endif
|
|
CBUFFER_END
|
|
|
|
sampler2D _MainTexture;
|
|
sampler2D _TextureRamp;
|
|
sampler2D _NormalMap;
|
|
|
|
|
|
half3 ASEIndirectDiffuse( PackedVaryings input, half3 normalWS, float3 positionWS, half3 viewDirWS )
|
|
{
|
|
#if defined( DYNAMICLIGHTMAP_ON )
|
|
return SAMPLE_GI( input.lightmapUVOrVertexSH.xy, input.dynamicLightmapUV.xy, 0, normalWS );
|
|
#elif defined( LIGHTMAP_ON )
|
|
return SAMPLE_GI( input.lightmapUVOrVertexSH.xy, 0, normalWS );
|
|
#elif defined( PROBE_VOLUMES_L1 ) || defined( PROBE_VOLUMES_L2 )
|
|
return SampleProbeVolumePixel( SampleSH( normalWS ), positionWS, normalWS, viewDirWS, input.positionCS.xy );
|
|
#else
|
|
return SampleSH( normalWS );
|
|
#endif
|
|
}
|
|
|
|
half4 CalculateShadowMask343_g61167( )
|
|
{
|
|
#if defined(SHADOWS_SHADOWMASK) && defined(LIGHTMAP_ON)
|
|
half4 shadowMask = inputData.shadowMask;
|
|
#elif !defined (LIGHTMAP_ON)
|
|
half4 shadowMask = unity_ProbesOcclusion;
|
|
#else
|
|
half4 shadowMask = half4(1, 1, 1, 1);
|
|
#endif
|
|
return shadowMask;
|
|
}
|
|
|
|
float3 AdditionalLightsLambertMask171x( float3 WorldPosition, float2 ScreenUV, float3 WorldNormal, float4 ShadowMask )
|
|
{
|
|
float3 Color = 0;
|
|
#if defined(_ADDITIONAL_LIGHTS)
|
|
#define SUM_LIGHTLAMBERT(Light)\
|
|
half3 AttLightColor = Light.color * ( Light.distanceAttenuation * Light.shadowAttenuation );\
|
|
Color += LightingLambert( AttLightColor, Light.direction, WorldNormal );
|
|
InputData inputData = (InputData)0;
|
|
inputData.normalizedScreenSpaceUV = ScreenUV;
|
|
inputData.positionWS = WorldPosition;
|
|
uint meshRenderingLayers = GetMeshRenderingLayer();
|
|
uint pixelLightCount = GetAdditionalLightsCount();
|
|
#if USE_CLUSTER_LIGHT_LOOP
|
|
[loop] for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++)
|
|
{
|
|
CLUSTER_LIGHT_LOOP_SUBTRACTIVE_LIGHT_CHECK
|
|
Light light = GetAdditionalLight(lightIndex, WorldPosition, ShadowMask);
|
|
#ifdef _LIGHT_LAYERS
|
|
if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
|
|
#endif
|
|
{
|
|
SUM_LIGHTLAMBERT( light );
|
|
}
|
|
}
|
|
#endif
|
|
|
|
LIGHT_LOOP_BEGIN( pixelLightCount )
|
|
Light light = GetAdditionalLight(lightIndex, WorldPosition, ShadowMask);
|
|
#ifdef _LIGHT_LAYERS
|
|
if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
|
|
#endif
|
|
{
|
|
SUM_LIGHTLAMBERT( light );
|
|
}
|
|
LIGHT_LOOP_END
|
|
#endif
|
|
return Color;
|
|
}
|
|
|
|
|
|
PackedVaryings VertexFunction( Attributes input )
|
|
{
|
|
PackedVaryings output = (PackedVaryings)0;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
|
|
|
float3 ase_normalWS = TransformObjectToWorldNormal( input.normalOS );
|
|
OUTPUT_LIGHTMAP_UV( input.texcoord1, unity_LightmapST, output.lightmapUVOrVertexSH.xy );
|
|
float3 ase_positionWS = TransformObjectToWorld( ( input.positionOS ).xyz );
|
|
#if !defined( OUTPUT_SH4 )
|
|
OUTPUT_SH( ase_positionWS, ase_normalWS, GetWorldSpaceNormalizeViewDir( ase_positionWS ), output.lightmapUVOrVertexSH.xyz );
|
|
#elif UNITY_VERSION > 60000009
|
|
OUTPUT_SH4( ase_positionWS, ase_normalWS, GetWorldSpaceNormalizeViewDir( ase_positionWS ), output.lightmapUVOrVertexSH.xyz, output.probeOcclusion );
|
|
#else
|
|
OUTPUT_SH4( ase_positionWS, ase_normalWS, GetWorldSpaceNormalizeViewDir( ase_positionWS ), output.lightmapUVOrVertexSH.xyz );
|
|
#endif
|
|
#if defined( DYNAMICLIGHTMAP_ON )
|
|
output.dynamicLightmapUV.xy = input.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
|
|
#endif
|
|
|
|
output.ase_texcoord3.xy = input.ase_texcoord.xy;
|
|
output.ase_texcoord6 = input.positionOS;
|
|
|
|
//setting value to unused interpolator channels and avoid initialization warnings
|
|
output.ase_texcoord3.zw = 0;
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
float3 defaultVertexValue = input.positionOS.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3(0, 0, 0);
|
|
#endif
|
|
|
|
float3 vertexValue = defaultVertexValue;
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
input.positionOS.xyz = vertexValue;
|
|
#else
|
|
input.positionOS.xyz += vertexValue;
|
|
#endif
|
|
|
|
input.normalOS = input.normalOS;
|
|
input.tangentOS = input.tangentOS;
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
|
|
VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS, input.tangentOS );
|
|
|
|
float fogFactor = 0;
|
|
#if defined(ASE_FOG) && !defined(_FOG_FRAGMENT)
|
|
fogFactor = ComputeFogFactor(vertexInput.positionCS.z);
|
|
#endif
|
|
|
|
output.positionCS = vertexInput.positionCS;
|
|
output.positionWSAndFogFactor = float4( vertexInput.positionWS, fogFactor );
|
|
output.normalWS = normalInput.normalWS;
|
|
output.tangentWS = half4( normalInput.tangentWS, ( input.tangentOS.w > 0.0 ? 1.0 : -1.0 ) * GetOddNegativeScale() );;
|
|
return output;
|
|
}
|
|
|
|
#if defined(ASE_TESSELLATION)
|
|
struct VertexControl
|
|
{
|
|
float4 positionOS : INTERNALTESSPOS;
|
|
half3 normalOS : NORMAL;
|
|
half4 tangentOS : TANGENT;
|
|
float4 ase_texcoord : TEXCOORD0;
|
|
float4 texcoord1 : TEXCOORD1;
|
|
float4 texcoord2 : TEXCOORD2;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct TessellationFactors
|
|
{
|
|
float edge[3] : SV_TessFactor;
|
|
float inside : SV_InsideTessFactor;
|
|
};
|
|
|
|
VertexControl vert ( Attributes input )
|
|
{
|
|
VertexControl output;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
output.positionOS = input.positionOS;
|
|
output.normalOS = input.normalOS;
|
|
output.tangentOS = input.tangentOS;
|
|
output.ase_texcoord = input.ase_texcoord;
|
|
output.texcoord1 = input.texcoord1;
|
|
output.texcoord2 = input.texcoord2;
|
|
return output;
|
|
}
|
|
|
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
|
|
{
|
|
TessellationFactors output;
|
|
float4 tf = 1;
|
|
float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
|
|
float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
|
|
#if defined(ASE_FIXED_TESSELLATION)
|
|
tf = FixedTess( tessValue );
|
|
#elif defined(ASE_DISTANCE_TESSELLATION)
|
|
tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
|
tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
|
tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
|
|
#endif
|
|
output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
|
|
return output;
|
|
}
|
|
|
|
[domain("tri")]
|
|
[partitioning("fractional_odd")]
|
|
[outputtopology("triangle_cw")]
|
|
[patchconstantfunc("TessellationFunction")]
|
|
[outputcontrolpoints(3)]
|
|
VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
|
{
|
|
return patch[id];
|
|
}
|
|
|
|
[domain("tri")]
|
|
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
|
{
|
|
Attributes output = (Attributes) 0;
|
|
output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
|
|
output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
|
|
output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z;
|
|
output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
|
|
output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
|
|
output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z;
|
|
#if defined(ASE_PHONG_TESSELLATION)
|
|
float3 pp[3];
|
|
for (int i = 0; i < 3; ++i)
|
|
pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
|
|
float phongStrength = _TessPhongStrength;
|
|
output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
|
|
#endif
|
|
UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
|
|
return VertexFunction(output);
|
|
}
|
|
#else
|
|
PackedVaryings vert ( Attributes input )
|
|
{
|
|
return VertexFunction( input );
|
|
}
|
|
#endif
|
|
|
|
half4 frag ( PackedVaryings input
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
,out float outputDepth : ASE_SV_DEPTH
|
|
#endif
|
|
#ifdef _WRITE_RENDERING_LAYERS
|
|
, out float4 outRenderingLayers : SV_Target1
|
|
#endif
|
|
) : SV_Target
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
|
|
|
|
#if defined( _SURFACE_TYPE_TRANSPARENT )
|
|
const bool isTransparent = true;
|
|
#else
|
|
const bool isTransparent = false;
|
|
#endif
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
LODFadeCrossFade( input.positionCS );
|
|
#endif
|
|
|
|
#if defined(MAIN_LIGHT_CALCULATE_SHADOWS)
|
|
float4 shadowCoord = TransformWorldToShadowCoord( input.positionWSAndFogFactor.xyz );
|
|
#else
|
|
float4 shadowCoord = float4(0, 0, 0, 0);
|
|
#endif
|
|
|
|
// @diogo: mikktspace compliant
|
|
float renormFactor = 1.0 / max( FLT_MIN, length( input.normalWS ) );
|
|
|
|
float3 PositionWS = input.positionWSAndFogFactor.xyz;
|
|
float3 PositionRWS = GetCameraRelativePositionWS( PositionWS );
|
|
half3 ViewDirWS = GetWorldSpaceNormalizeViewDir( PositionWS );
|
|
float4 ShadowCoord = shadowCoord;
|
|
float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw );
|
|
float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w;
|
|
float4 ScreenPos = ComputeScreenPos( ClipPos );
|
|
float3 TangentWS = input.tangentWS.xyz * renormFactor;
|
|
float3 BitangentWS = cross( input.normalWS, input.tangentWS.xyz ) * input.tangentWS.w * renormFactor;
|
|
float3 NormalWS = input.normalWS * renormFactor;
|
|
|
|
float4 color217 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
|
|
#ifdef _ENABLECOLORTINT_ON
|
|
float4 staticSwitch213 = _BaseTint;
|
|
#else
|
|
float4 staticSwitch213 = color217;
|
|
#endif
|
|
float2 uv_MainTexture18 = input.ase_texcoord3.xy;
|
|
float4 tex2DNode18 = tex2D( _MainTexture, uv_MainTexture18 );
|
|
float2 uv_NormalMap51 = input.ase_texcoord3.xy;
|
|
float3 unpack51 = UnpackNormalScale( tex2D( _NormalMap, uv_NormalMap51 ), _NormalScale );
|
|
unpack51.z = lerp( 1, unpack51.z, saturate(_NormalScale) );
|
|
float3 tanToWorld0 = float3( TangentWS.x, BitangentWS.x, NormalWS.x );
|
|
float3 tanToWorld1 = float3( TangentWS.y, BitangentWS.y, NormalWS.y );
|
|
float3 tanToWorld2 = float3( TangentWS.z, BitangentWS.z, NormalWS.z );
|
|
float3 tanNormal6 = unpack51;
|
|
float3 worldNormal6 = normalize( float3( dot( tanToWorld0, tanNormal6 ), dot( tanToWorld1, tanNormal6 ), dot( tanToWorld2, tanNormal6 ) ) );
|
|
float3 normalizeResult90 = normalize( worldNormal6 );
|
|
float3 Normals91 = normalizeResult90;
|
|
float dotResult221 = dot( Normals91 , SafeNormalize( _MainLightPosition.xyz ) );
|
|
float RampScale665 = _RampScale;
|
|
float RampOffset666 = _RampOffset;
|
|
float CEL_Effect224 = saturate( (dotResult221*RampScale665 + RampOffset666) );
|
|
float2 temp_cast_0 = (CEL_Effect224).xx;
|
|
float ase_lightIntensity = max( max( _MainLightColor.r, _MainLightColor.g ), _MainLightColor.b ) + 1e-7;
|
|
float4 ase_lightColor = float4( _MainLightColor.rgb / ase_lightIntensity, ase_lightIntensity );
|
|
float ase_lightAtten = 0;
|
|
Light ase_mainLight = GetMainLight( ShadowCoord );
|
|
ase_lightAtten = ase_mainLight.distanceAttenuation * ase_mainLight.shadowAttenuation;
|
|
float3 bakedGI167 = ASEIndirectDiffuse( input, NormalWS, PositionWS, ViewDirWS );
|
|
MixRealtimeAndBakedGI( ase_mainLight, NormalWS, bakedGI167, half4( 0, 0, 0, 0 ) );
|
|
float4 HalfLambert96 = ( ( ase_lightColor * ase_lightAtten ) + float4( bakedGI167 , 0.0 ) );
|
|
float3 WorldPosition288_g61167 = PositionWS;
|
|
float3 WorldPosition337_g61167 = WorldPosition288_g61167;
|
|
float2 ScreenUV286_g61167 = (ScreenPosNorm).xy;
|
|
float2 ScreenUV337_g61167 = ScreenUV286_g61167;
|
|
float3 WorldNormal281_g61167 = Normals91;
|
|
float3 WorldNormal337_g61167 = WorldNormal281_g61167;
|
|
half4 localCalculateShadowMask343_g61167 = CalculateShadowMask343_g61167();
|
|
float4 ShadowMask360_g61167 = localCalculateShadowMask343_g61167;
|
|
float4 ShadowMask337_g61167 = ShadowMask360_g61167;
|
|
float3 localAdditionalLightsLambertMask171x337_g61167 = AdditionalLightsLambertMask171x( WorldPosition337_g61167 , ScreenUV337_g61167 , WorldNormal337_g61167 , ShadowMask337_g61167 );
|
|
float4 temp_output_212_0 = ( staticSwitch213 * ( ( ( tex2DNode18 * tex2D( _TextureRamp, temp_cast_0 ) ) * HalfLambert96 ) + ( tex2DNode18 * tex2D( _TextureRamp, (saturate( localAdditionalLightsLambertMask171x337_g61167 )*RampScale665 + RampOffset666).xy ) ) ) );
|
|
float4 lerpResult761 = lerp( temp_output_212_0 , unity_FogColor , saturate( ( ( ( ( 1.0 - input.ase_texcoord6.xyz.y ) + _FogHeight ) / 10.0 ) * ( _FogDensity / 10.0 ) ) ));
|
|
#ifdef _ENABLEFOG_ON
|
|
float4 staticSwitch721 = lerpResult761;
|
|
#else
|
|
float4 staticSwitch721 = temp_output_212_0;
|
|
#endif
|
|
|
|
float3 BakedAlbedo = 0;
|
|
float3 BakedEmission = 0;
|
|
float3 Color = staticSwitch721.rgb;
|
|
float Alpha = 1;
|
|
#if defined( _ALPHATEST_ON )
|
|
float AlphaClipThreshold = _Cutoff;
|
|
float AlphaClipThresholdShadow = 0.5;
|
|
#endif
|
|
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
input.positionCS.z = input.positionCS.z;
|
|
#endif
|
|
|
|
#if defined( _ALPHATEST_ON )
|
|
AlphaDiscard( Alpha, AlphaClipThreshold );
|
|
#endif
|
|
|
|
#if defined(MAIN_LIGHT_CALCULATE_SHADOWS) && defined(ASE_CHANGES_WORLD_POS)
|
|
ShadowCoord = TransformWorldToShadowCoord( PositionWS );
|
|
#endif
|
|
|
|
InputData inputData = (InputData)0;
|
|
inputData.positionWS = PositionWS;
|
|
inputData.positionCS = input.positionCS;
|
|
inputData.normalizedScreenSpaceUV = ScreenPosNorm.xy;
|
|
inputData.normalWS = NormalWS;
|
|
inputData.viewDirectionWS = ViewDirWS;
|
|
|
|
#if defined(_SCREEN_SPACE_OCCLUSION) && !defined(_SURFACE_TYPE_TRANSPARENT)
|
|
float2 normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
|
|
AmbientOcclusionFactor aoFactor = GetScreenSpaceAmbientOcclusion(normalizedScreenSpaceUV);
|
|
Color.rgb *= aoFactor.directAmbientOcclusion;
|
|
#endif
|
|
|
|
#ifdef ASE_FOG
|
|
inputData.fogCoord = InitializeInputDataFog(float4(inputData.positionWS, 1.0), input.positionWSAndFogFactor.w);
|
|
#endif
|
|
|
|
#if defined(_DBUFFER)
|
|
ApplyDecalToBaseColor(input.positionCS, Color);
|
|
#endif
|
|
|
|
#ifdef ASE_FOG
|
|
#ifdef TERRAIN_SPLAT_ADDPASS
|
|
Color.rgb = MixFogColor(Color.rgb, half3(0,0,0), inputData.fogCoord);
|
|
#else
|
|
Color.rgb = MixFog(Color.rgb, inputData.fogCoord);
|
|
#endif
|
|
#endif
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
outputDepth = input.positionCS.z;
|
|
#endif
|
|
|
|
#ifdef _WRITE_RENDERING_LAYERS
|
|
uint renderingLayers = GetMeshRenderingLayer();
|
|
outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 );
|
|
#endif
|
|
|
|
#if defined( ASE_OPAQUE_KEEP_ALPHA )
|
|
return half4( Color, Alpha );
|
|
#else
|
|
return half4( Color, OutputAlpha( Alpha, isTransparent ) );
|
|
#endif
|
|
}
|
|
ENDHLSL
|
|
}
|
|
|
|
|
|
Pass
|
|
{
|
|
|
|
Name "ShadowCaster"
|
|
Tags { "LightMode"="ShadowCaster" }
|
|
|
|
ZWrite On
|
|
ZTest LEqual
|
|
AlphaToMask Off
|
|
ColorMask 0
|
|
|
|
HLSLPROGRAM
|
|
|
|
#define ASE_VERSION 19908
|
|
#define ASE_SRP_VERSION 170100
|
|
|
|
|
|
#pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define SHADERPASS SHADERPASS_SHADOWCASTER
|
|
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
|
|
#define ASE_SV_DEPTH SV_DepthLessEqual
|
|
#define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
|
|
#else
|
|
#define ASE_SV_DEPTH SV_Depth
|
|
#define ASE_SV_POSITION_QUALIFIERS
|
|
#endif
|
|
|
|
struct Attributes
|
|
{
|
|
float4 positionOS : POSITION;
|
|
half3 normalOS : NORMAL;
|
|
half4 tangentOS : TANGENT;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct PackedVaryings
|
|
{
|
|
ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
};
|
|
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _BaseTint;
|
|
float _NormalScale;
|
|
float _RampScale;
|
|
float _RampOffset;
|
|
float _FogHeight;
|
|
float _FogDensity;
|
|
float _AlphaClip;
|
|
float _Cutoff;
|
|
#ifdef ASE_TESSELLATION
|
|
float _TessPhongStrength;
|
|
float _TessValue;
|
|
float _TessMin;
|
|
float _TessMax;
|
|
float _TessEdgeLength;
|
|
float _TessMaxDisp;
|
|
#endif
|
|
CBUFFER_END
|
|
|
|
|
|
|
|
|
|
float3 _LightDirection;
|
|
float3 _LightPosition;
|
|
|
|
PackedVaryings VertexFunction( Attributes input )
|
|
{
|
|
PackedVaryings output;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( output );
|
|
|
|
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
float3 defaultVertexValue = input.positionOS.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3(0, 0, 0);
|
|
#endif
|
|
|
|
float3 vertexValue = defaultVertexValue;
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
input.positionOS.xyz = vertexValue;
|
|
#else
|
|
input.positionOS.xyz += vertexValue;
|
|
#endif
|
|
|
|
input.normalOS = input.normalOS;
|
|
input.tangentOS = input.tangentOS;
|
|
|
|
float3 positionWS = TransformObjectToWorld( input.positionOS.xyz );
|
|
half3 normalWS = TransformObjectToWorldDir(input.normalOS);
|
|
|
|
#if _CASTING_PUNCTUAL_LIGHT_SHADOW
|
|
float3 lightDirectionWS = normalize(_LightPosition - positionWS);
|
|
#else
|
|
float3 lightDirectionWS = _LightDirection;
|
|
#endif
|
|
|
|
float4 positionCS = TransformWorldToHClip(ApplyShadowBias(positionWS, normalWS, lightDirectionWS));
|
|
|
|
#if UNITY_REVERSED_Z
|
|
positionCS.z = min(positionCS.z, UNITY_NEAR_CLIP_VALUE);
|
|
#else
|
|
positionCS.z = max(positionCS.z, UNITY_NEAR_CLIP_VALUE);
|
|
#endif
|
|
|
|
output.positionCS = positionCS;
|
|
return output;
|
|
}
|
|
|
|
#if defined(ASE_TESSELLATION)
|
|
struct VertexControl
|
|
{
|
|
float4 positionOS : INTERNALTESSPOS;
|
|
half3 normalOS : NORMAL;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct TessellationFactors
|
|
{
|
|
float edge[3] : SV_TessFactor;
|
|
float inside : SV_InsideTessFactor;
|
|
};
|
|
|
|
VertexControl vert ( Attributes input )
|
|
{
|
|
VertexControl output;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
output.positionOS = input.positionOS;
|
|
output.normalOS = input.normalOS;
|
|
|
|
return output;
|
|
}
|
|
|
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
|
|
{
|
|
TessellationFactors output;
|
|
float4 tf = 1;
|
|
float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
|
|
float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
|
|
#if defined(ASE_FIXED_TESSELLATION)
|
|
tf = FixedTess( tessValue );
|
|
#elif defined(ASE_DISTANCE_TESSELLATION)
|
|
tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
|
tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
|
tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
|
|
#endif
|
|
output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
|
|
return output;
|
|
}
|
|
|
|
[domain("tri")]
|
|
[partitioning("fractional_odd")]
|
|
[outputtopology("triangle_cw")]
|
|
[patchconstantfunc("TessellationFunction")]
|
|
[outputcontrolpoints(3)]
|
|
VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
|
{
|
|
return patch[id];
|
|
}
|
|
|
|
[domain("tri")]
|
|
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
|
{
|
|
Attributes output = (Attributes) 0;
|
|
output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
|
|
output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
|
|
|
|
#if defined(ASE_PHONG_TESSELLATION)
|
|
float3 pp[3];
|
|
for (int i = 0; i < 3; ++i)
|
|
pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
|
|
float phongStrength = _TessPhongStrength;
|
|
output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
|
|
#endif
|
|
UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
|
|
return VertexFunction(output);
|
|
}
|
|
#else
|
|
PackedVaryings vert ( Attributes input )
|
|
{
|
|
return VertexFunction( input );
|
|
}
|
|
#endif
|
|
|
|
half4 frag(PackedVaryings input
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
,out float outputDepth : ASE_SV_DEPTH
|
|
#endif
|
|
) : SV_Target
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID( input );
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
|
|
|
|
float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw );
|
|
float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w;
|
|
float4 ScreenPos = ComputeScreenPos( ClipPos );
|
|
|
|
|
|
|
|
float Alpha = 1;
|
|
#if defined( _ALPHATEST_ON )
|
|
float AlphaClipThreshold = _Cutoff;
|
|
float AlphaClipThresholdShadow = 0.5;
|
|
#endif
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
input.positionCS.z = input.positionCS.z;
|
|
#endif
|
|
|
|
#if defined( _ALPHATEST_ON )
|
|
#if defined( _ALPHATEST_SHADOW_ON )
|
|
AlphaDiscard( Alpha, AlphaClipThresholdShadow );
|
|
#else
|
|
AlphaDiscard( Alpha, AlphaClipThreshold );
|
|
#endif
|
|
#endif
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
LODFadeCrossFade( input.positionCS );
|
|
#endif
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
outputDepth = input.positionCS.z;
|
|
#endif
|
|
|
|
return 0;
|
|
}
|
|
ENDHLSL
|
|
}
|
|
|
|
|
|
Pass
|
|
{
|
|
|
|
Name "DepthOnly"
|
|
Tags { "LightMode"="DepthOnly" }
|
|
|
|
ZWrite On
|
|
ColorMask 0
|
|
AlphaToMask Off
|
|
|
|
HLSLPROGRAM
|
|
|
|
#define ASE_VERSION 19908
|
|
#define ASE_SRP_VERSION 170100
|
|
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
|
|
#define ASE_SV_DEPTH SV_DepthLessEqual
|
|
#define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
|
|
#else
|
|
#define ASE_SV_DEPTH SV_Depth
|
|
#define ASE_SV_POSITION_QUALIFIERS
|
|
#endif
|
|
|
|
struct Attributes
|
|
{
|
|
float4 positionOS : POSITION;
|
|
half3 normalOS : NORMAL;
|
|
half4 tangentOS : TANGENT;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct PackedVaryings
|
|
{
|
|
ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
};
|
|
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _BaseTint;
|
|
float _NormalScale;
|
|
float _RampScale;
|
|
float _RampOffset;
|
|
float _FogHeight;
|
|
float _FogDensity;
|
|
float _AlphaClip;
|
|
float _Cutoff;
|
|
#ifdef ASE_TESSELLATION
|
|
float _TessPhongStrength;
|
|
float _TessValue;
|
|
float _TessMin;
|
|
float _TessMax;
|
|
float _TessEdgeLength;
|
|
float _TessMaxDisp;
|
|
#endif
|
|
CBUFFER_END
|
|
|
|
|
|
|
|
|
|
PackedVaryings VertexFunction( Attributes input )
|
|
{
|
|
PackedVaryings output = (PackedVaryings)0;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
|
|
|
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
float3 defaultVertexValue = input.positionOS.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3(0, 0, 0);
|
|
#endif
|
|
|
|
float3 vertexValue = defaultVertexValue;
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
input.positionOS.xyz = vertexValue;
|
|
#else
|
|
input.positionOS.xyz += vertexValue;
|
|
#endif
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
|
|
|
|
output.positionCS = vertexInput.positionCS;
|
|
return output;
|
|
}
|
|
|
|
#if defined(ASE_TESSELLATION)
|
|
struct VertexControl
|
|
{
|
|
float4 positionOS : INTERNALTESSPOS;
|
|
half3 normalOS : NORMAL;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct TessellationFactors
|
|
{
|
|
float edge[3] : SV_TessFactor;
|
|
float inside : SV_InsideTessFactor;
|
|
};
|
|
|
|
VertexControl vert ( Attributes input )
|
|
{
|
|
VertexControl output;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
output.positionOS = input.positionOS;
|
|
output.normalOS = input.normalOS;
|
|
|
|
return output;
|
|
}
|
|
|
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
|
|
{
|
|
TessellationFactors output;
|
|
float4 tf = 1;
|
|
float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
|
|
float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
|
|
#if defined(ASE_FIXED_TESSELLATION)
|
|
tf = FixedTess( tessValue );
|
|
#elif defined(ASE_DISTANCE_TESSELLATION)
|
|
tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
|
tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
|
tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
|
|
#endif
|
|
output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
|
|
return output;
|
|
}
|
|
|
|
[domain("tri")]
|
|
[partitioning("fractional_odd")]
|
|
[outputtopology("triangle_cw")]
|
|
[patchconstantfunc("TessellationFunction")]
|
|
[outputcontrolpoints(3)]
|
|
VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
|
{
|
|
return patch[id];
|
|
}
|
|
|
|
[domain("tri")]
|
|
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
|
{
|
|
Attributes output = (Attributes) 0;
|
|
output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
|
|
output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
|
|
|
|
#if defined(ASE_PHONG_TESSELLATION)
|
|
float3 pp[3];
|
|
for (int i = 0; i < 3; ++i)
|
|
pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
|
|
float phongStrength = _TessPhongStrength;
|
|
output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
|
|
#endif
|
|
UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
|
|
return VertexFunction(output);
|
|
}
|
|
#else
|
|
PackedVaryings vert ( Attributes input )
|
|
{
|
|
return VertexFunction( input );
|
|
}
|
|
#endif
|
|
|
|
half4 frag(PackedVaryings input
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
,out float outputDepth : ASE_SV_DEPTH
|
|
#endif
|
|
) : SV_Target
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
|
|
|
|
float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw );
|
|
float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w;
|
|
float4 ScreenPos = ComputeScreenPos( ClipPos );
|
|
|
|
|
|
|
|
float Alpha = 1;
|
|
#if defined( _ALPHATEST_ON )
|
|
float AlphaClipThreshold = _Cutoff;
|
|
#endif
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
input.positionCS.z = input.positionCS.z;
|
|
#endif
|
|
|
|
#if defined( _ALPHATEST_ON )
|
|
AlphaDiscard( Alpha, AlphaClipThreshold );
|
|
#endif
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
LODFadeCrossFade( input.positionCS );
|
|
#endif
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
outputDepth = input.positionCS.z;
|
|
#endif
|
|
|
|
return 0;
|
|
}
|
|
ENDHLSL
|
|
}
|
|
|
|
|
|
Pass
|
|
{
|
|
|
|
Name "SceneSelectionPass"
|
|
Tags { "LightMode"="SceneSelectionPass" }
|
|
|
|
Cull Off
|
|
AlphaToMask Off
|
|
|
|
HLSLPROGRAM
|
|
|
|
#define ASE_VERSION 19908
|
|
#define ASE_SRP_VERSION 170100
|
|
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define SHADERPASS SHADERPASS_DEPTHONLY
|
|
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
|
|
|
|
|
|
|
struct Attributes
|
|
{
|
|
float4 positionOS : POSITION;
|
|
half3 normalOS : NORMAL;
|
|
half4 tangentOS : TANGENT;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct PackedVaryings
|
|
{
|
|
float4 positionCS : SV_POSITION;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
};
|
|
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _BaseTint;
|
|
float _NormalScale;
|
|
float _RampScale;
|
|
float _RampOffset;
|
|
float _FogHeight;
|
|
float _FogDensity;
|
|
float _AlphaClip;
|
|
float _Cutoff;
|
|
#ifdef ASE_TESSELLATION
|
|
float _TessPhongStrength;
|
|
float _TessValue;
|
|
float _TessMin;
|
|
float _TessMax;
|
|
float _TessEdgeLength;
|
|
float _TessMaxDisp;
|
|
#endif
|
|
CBUFFER_END
|
|
|
|
|
|
|
|
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
|
|
struct SurfaceDescription
|
|
{
|
|
float Alpha;
|
|
float AlphaClipThreshold;
|
|
};
|
|
|
|
PackedVaryings VertexFunction(Attributes input )
|
|
{
|
|
PackedVaryings output;
|
|
ZERO_INITIALIZE(PackedVaryings, output);
|
|
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
|
|
|
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
float3 defaultVertexValue = input.positionOS.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3(0, 0, 0);
|
|
#endif
|
|
|
|
float3 vertexValue = defaultVertexValue;
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
input.positionOS.xyz = vertexValue;
|
|
#else
|
|
input.positionOS.xyz += vertexValue;
|
|
#endif
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
|
|
|
|
output.positionCS = vertexInput.positionCS;
|
|
return output;
|
|
}
|
|
|
|
#if defined(ASE_TESSELLATION)
|
|
struct VertexControl
|
|
{
|
|
float4 positionOS : INTERNALTESSPOS;
|
|
half3 normalOS : NORMAL;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct TessellationFactors
|
|
{
|
|
float edge[3] : SV_TessFactor;
|
|
float inside : SV_InsideTessFactor;
|
|
};
|
|
|
|
VertexControl vert ( Attributes input )
|
|
{
|
|
VertexControl output;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
output.positionOS = input.positionOS;
|
|
output.normalOS = input.normalOS;
|
|
|
|
return output;
|
|
}
|
|
|
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
|
|
{
|
|
TessellationFactors output;
|
|
float4 tf = 1;
|
|
float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
|
|
float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
|
|
#if defined(ASE_FIXED_TESSELLATION)
|
|
tf = FixedTess( tessValue );
|
|
#elif defined(ASE_DISTANCE_TESSELLATION)
|
|
tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
|
tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
|
tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
|
|
#endif
|
|
output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
|
|
return output;
|
|
}
|
|
|
|
[domain("tri")]
|
|
[partitioning("fractional_odd")]
|
|
[outputtopology("triangle_cw")]
|
|
[patchconstantfunc("TessellationFunction")]
|
|
[outputcontrolpoints(3)]
|
|
VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
|
{
|
|
return patch[id];
|
|
}
|
|
|
|
[domain("tri")]
|
|
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
|
{
|
|
Attributes output = (Attributes) 0;
|
|
output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
|
|
output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
|
|
|
|
#if defined(ASE_PHONG_TESSELLATION)
|
|
float3 pp[3];
|
|
for (int i = 0; i < 3; ++i)
|
|
pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
|
|
float phongStrength = _TessPhongStrength;
|
|
output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
|
|
#endif
|
|
UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
|
|
return VertexFunction(output);
|
|
}
|
|
#else
|
|
PackedVaryings vert ( Attributes input )
|
|
{
|
|
return VertexFunction( input );
|
|
}
|
|
#endif
|
|
|
|
half4 frag(PackedVaryings input ) : SV_Target
|
|
{
|
|
SurfaceDescription surfaceDescription = (SurfaceDescription)0;
|
|
|
|
|
|
|
|
surfaceDescription.Alpha = 1;
|
|
#if defined( _ALPHATEST_ON )
|
|
surfaceDescription.AlphaClipThreshold = _Cutoff;
|
|
#endif
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
|
|
#endif
|
|
|
|
half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
|
|
return outColor;
|
|
}
|
|
ENDHLSL
|
|
}
|
|
|
|
|
|
Pass
|
|
{
|
|
|
|
Name "ScenePickingPass"
|
|
Tags { "LightMode"="Picking" }
|
|
|
|
AlphaToMask Off
|
|
|
|
HLSLPROGRAM
|
|
|
|
#define ASE_VERSION 19908
|
|
#define ASE_SRP_VERSION 170100
|
|
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
|
|
#define SHADERPASS SHADERPASS_DEPTHONLY
|
|
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
|
|
#endif
|
|
|
|
|
|
|
|
struct Attributes
|
|
{
|
|
float4 positionOS : POSITION;
|
|
half3 normalOS : NORMAL;
|
|
half4 tangentOS : TANGENT;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct PackedVaryings
|
|
{
|
|
float4 positionCS : SV_POSITION;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
};
|
|
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _BaseTint;
|
|
float _NormalScale;
|
|
float _RampScale;
|
|
float _RampOffset;
|
|
float _FogHeight;
|
|
float _FogDensity;
|
|
float _AlphaClip;
|
|
float _Cutoff;
|
|
#ifdef ASE_TESSELLATION
|
|
float _TessPhongStrength;
|
|
float _TessValue;
|
|
float _TessMin;
|
|
float _TessMax;
|
|
float _TessEdgeLength;
|
|
float _TessMaxDisp;
|
|
#endif
|
|
CBUFFER_END
|
|
|
|
|
|
|
|
|
|
float4 _SelectionID;
|
|
|
|
struct SurfaceDescription
|
|
{
|
|
float Alpha;
|
|
float AlphaClipThreshold;
|
|
};
|
|
|
|
PackedVaryings VertexFunction(Attributes input )
|
|
{
|
|
PackedVaryings output;
|
|
ZERO_INITIALIZE(PackedVaryings, output);
|
|
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
|
|
|
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
float3 defaultVertexValue = input.positionOS.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3(0, 0, 0);
|
|
#endif
|
|
|
|
float3 vertexValue = defaultVertexValue;
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
input.positionOS.xyz = vertexValue;
|
|
#else
|
|
input.positionOS.xyz += vertexValue;
|
|
#endif
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
|
|
|
|
output.positionCS = vertexInput.positionCS;
|
|
return output;
|
|
}
|
|
|
|
#if defined(ASE_TESSELLATION)
|
|
struct VertexControl
|
|
{
|
|
float4 positionOS : INTERNALTESSPOS;
|
|
half3 normalOS : NORMAL;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct TessellationFactors
|
|
{
|
|
float edge[3] : SV_TessFactor;
|
|
float inside : SV_InsideTessFactor;
|
|
};
|
|
|
|
VertexControl vert ( Attributes input )
|
|
{
|
|
VertexControl output;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
output.positionOS = input.positionOS;
|
|
output.normalOS = input.normalOS;
|
|
|
|
return output;
|
|
}
|
|
|
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
|
|
{
|
|
TessellationFactors output;
|
|
float4 tf = 1;
|
|
float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
|
|
float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
|
|
#if defined(ASE_FIXED_TESSELLATION)
|
|
tf = FixedTess( tessValue );
|
|
#elif defined(ASE_DISTANCE_TESSELLATION)
|
|
tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
|
tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
|
tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
|
|
#endif
|
|
output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
|
|
return output;
|
|
}
|
|
|
|
[domain("tri")]
|
|
[partitioning("fractional_odd")]
|
|
[outputtopology("triangle_cw")]
|
|
[patchconstantfunc("TessellationFunction")]
|
|
[outputcontrolpoints(3)]
|
|
VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
|
{
|
|
return patch[id];
|
|
}
|
|
|
|
[domain("tri")]
|
|
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
|
{
|
|
Attributes output = (Attributes) 0;
|
|
output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
|
|
output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
|
|
|
|
#if defined(ASE_PHONG_TESSELLATION)
|
|
float3 pp[3];
|
|
for (int i = 0; i < 3; ++i)
|
|
pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
|
|
float phongStrength = _TessPhongStrength;
|
|
output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
|
|
#endif
|
|
UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
|
|
return VertexFunction(output);
|
|
}
|
|
#else
|
|
PackedVaryings vert ( Attributes input )
|
|
{
|
|
return VertexFunction( input );
|
|
}
|
|
#endif
|
|
|
|
half4 frag(PackedVaryings input ) : SV_Target
|
|
{
|
|
SurfaceDescription surfaceDescription = (SurfaceDescription)0;
|
|
|
|
|
|
|
|
surfaceDescription.Alpha = 1;
|
|
#if defined( _ALPHATEST_ON )
|
|
surfaceDescription.AlphaClipThreshold = _Cutoff;
|
|
#endif
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
|
|
#endif
|
|
|
|
half4 outColor = 0;
|
|
outColor = unity_SelectionID;
|
|
|
|
return outColor;
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
|
|
Pass
|
|
{
|
|
|
|
Name "DepthNormals"
|
|
Tags { "LightMode"="DepthNormalsOnly" }
|
|
|
|
ZTest LEqual
|
|
ZWrite On
|
|
|
|
HLSLPROGRAM
|
|
|
|
#define ASE_VERSION 19908
|
|
#define ASE_SRP_VERSION 170100
|
|
|
|
|
|
#pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define ATTRIBUTES_NEED_NORMAL
|
|
#define ATTRIBUTES_NEED_TANGENT
|
|
#define VARYINGS_NEED_NORMAL_WS
|
|
|
|
#define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
|
|
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
|
|
#define ASE_SV_DEPTH SV_DepthLessEqual
|
|
#define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
|
|
#else
|
|
#define ASE_SV_DEPTH SV_Depth
|
|
#define ASE_SV_POSITION_QUALIFIERS
|
|
#endif
|
|
|
|
struct Attributes
|
|
{
|
|
float4 positionOS : POSITION;
|
|
half3 normalOS : NORMAL;
|
|
half4 tangentOS : TANGENT;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct PackedVaryings
|
|
{
|
|
ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
half3 normalWS : TEXCOORD0;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
};
|
|
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _BaseTint;
|
|
float _NormalScale;
|
|
float _RampScale;
|
|
float _RampOffset;
|
|
float _FogHeight;
|
|
float _FogDensity;
|
|
float _AlphaClip;
|
|
float _Cutoff;
|
|
#ifdef ASE_TESSELLATION
|
|
float _TessPhongStrength;
|
|
float _TessValue;
|
|
float _TessMin;
|
|
float _TessMax;
|
|
float _TessEdgeLength;
|
|
float _TessMaxDisp;
|
|
#endif
|
|
CBUFFER_END
|
|
|
|
|
|
|
|
|
|
struct SurfaceDescription
|
|
{
|
|
float Alpha;
|
|
float AlphaClipThreshold;
|
|
};
|
|
|
|
PackedVaryings VertexFunction( Attributes input )
|
|
{
|
|
PackedVaryings output;
|
|
ZERO_INITIALIZE(PackedVaryings, output);
|
|
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
|
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
float3 defaultVertexValue = input.positionOS.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3(0, 0, 0);
|
|
#endif
|
|
|
|
float3 vertexValue = defaultVertexValue;
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
input.positionOS.xyz = vertexValue;
|
|
#else
|
|
input.positionOS.xyz += vertexValue;
|
|
#endif
|
|
|
|
input.normalOS = input.normalOS;
|
|
input.tangentOS = input.tangentOS;
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
|
|
VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS );
|
|
|
|
output.positionCS = vertexInput.positionCS;
|
|
output.normalWS = normalInput.normalWS;
|
|
return output;
|
|
}
|
|
|
|
#if defined(ASE_TESSELLATION)
|
|
struct VertexControl
|
|
{
|
|
float4 positionOS : INTERNALTESSPOS;
|
|
half3 normalOS : NORMAL;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct TessellationFactors
|
|
{
|
|
float edge[3] : SV_TessFactor;
|
|
float inside : SV_InsideTessFactor;
|
|
};
|
|
|
|
VertexControl vert ( Attributes input )
|
|
{
|
|
VertexControl output;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
output.positionOS = input.positionOS;
|
|
output.normalOS = input.normalOS;
|
|
|
|
return output;
|
|
}
|
|
|
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
|
|
{
|
|
TessellationFactors output;
|
|
float4 tf = 1;
|
|
float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
|
|
float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
|
|
#if defined(ASE_FIXED_TESSELLATION)
|
|
tf = FixedTess( tessValue );
|
|
#elif defined(ASE_DISTANCE_TESSELLATION)
|
|
tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
|
tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
|
tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
|
|
#endif
|
|
output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
|
|
return output;
|
|
}
|
|
|
|
[domain("tri")]
|
|
[partitioning("fractional_odd")]
|
|
[outputtopology("triangle_cw")]
|
|
[patchconstantfunc("TessellationFunction")]
|
|
[outputcontrolpoints(3)]
|
|
VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
|
{
|
|
return patch[id];
|
|
}
|
|
|
|
[domain("tri")]
|
|
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
|
{
|
|
Attributes output = (Attributes) 0;
|
|
output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
|
|
output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
|
|
|
|
#if defined(ASE_PHONG_TESSELLATION)
|
|
float3 pp[3];
|
|
for (int i = 0; i < 3; ++i)
|
|
pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
|
|
float phongStrength = _TessPhongStrength;
|
|
output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
|
|
#endif
|
|
UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
|
|
return VertexFunction(output);
|
|
}
|
|
#else
|
|
PackedVaryings vert ( Attributes input )
|
|
{
|
|
return VertexFunction( input );
|
|
}
|
|
#endif
|
|
|
|
void frag(PackedVaryings input
|
|
, out half4 outNormalWS : SV_Target0
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
,out float outputDepth : ASE_SV_DEPTH
|
|
#endif
|
|
#ifdef _WRITE_RENDERING_LAYERS
|
|
, out float4 outRenderingLayers : SV_Target1
|
|
#endif
|
|
)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
|
|
|
|
half3 NormalWS = normalize( input.normalWS );
|
|
float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw );
|
|
float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w;
|
|
float4 ScreenPos = ComputeScreenPos( ClipPos );
|
|
|
|
|
|
|
|
float Alpha = 1;
|
|
#if defined( _ALPHATEST_ON )
|
|
float AlphaClipThreshold = _Cutoff;
|
|
#endif
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
input.positionCS.z = input.positionCS.z;
|
|
#endif
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
clip(Alpha - AlphaClipThreshold);
|
|
#endif
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
LODFadeCrossFade( input.positionCS );
|
|
#endif
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
outputDepth = input.positionCS.z;
|
|
#endif
|
|
|
|
#if defined(_GBUFFER_NORMALS_OCT)
|
|
float2 octNormalWS = PackNormalOctQuadEncode(NormalWS);
|
|
float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5);
|
|
half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS);
|
|
outNormalWS = half4(packedNormalWS, 0.0);
|
|
#else
|
|
outNormalWS = half4(NormalizeNormalPerPixel( NormalWS ), 0.0);
|
|
#endif
|
|
|
|
#ifdef _WRITE_RENDERING_LAYERS
|
|
uint renderingLayers = GetMeshRenderingLayer();
|
|
outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0);
|
|
#endif
|
|
}
|
|
ENDHLSL
|
|
}
|
|
|
|
|
|
Pass
|
|
{
|
|
|
|
Name "GBuffer"
|
|
Tags { "LightMode"="UniversalGBuffer" }
|
|
|
|
Blend One Zero, One Zero
|
|
ZWrite On
|
|
ZTest LEqual
|
|
Offset 0 , 0
|
|
ColorMask RGBA
|
|
|
|
|
|
|
|
HLSLPROGRAM
|
|
|
|
#pragma shader_feature_local_fragment _RECEIVE_SHADOWS_OFF
|
|
#define ASE_VERSION 19908
|
|
#define ASE_SRP_VERSION 170100
|
|
|
|
|
|
// Deferred Rendering Path does not support the OpenGL-based graphics API:
|
|
// Desktop OpenGL, OpenGL ES 3.0, WebGL 2.0.
|
|
#pragma exclude_renderers glcore gles3
|
|
|
|
#pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
|
|
#pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
|
|
#pragma multi_compile_fragment _ _RENDER_PASS_ENABLED
|
|
|
|
#pragma vertex vert
|
|
#pragma fragment frag
|
|
|
|
#define SHADERPASS SHADERPASS_GBUFFER
|
|
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ProbeVolumeVariants.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
|
#include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
|
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
|
|
#endif
|
|
|
|
#if defined(UNITY_INSTANCING_ENABLED) && defined(_TERRAIN_INSTANCED_PERPIXEL_NORMAL)
|
|
#define ENABLE_TERRAIN_PERPIXEL_NORMAL
|
|
#endif
|
|
|
|
#define ASE_NEEDS_TEXTURE_COORDINATES0
|
|
#define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0
|
|
#define ASE_NEEDS_FRAG_WORLD_TANGENT
|
|
#define ASE_NEEDS_WORLD_NORMAL
|
|
#define ASE_NEEDS_FRAG_WORLD_NORMAL
|
|
#define ASE_NEEDS_FRAG_WORLD_BITANGENT
|
|
#define ASE_NEEDS_WORLD_POSITION
|
|
#define ASE_NEEDS_FRAG_WORLD_POSITION
|
|
#define ASE_NEEDS_VERT_NORMAL
|
|
#define ASE_NEEDS_FRAG_WORLD_VIEW_DIR
|
|
#define ASE_NEEDS_FRAG_SCREEN_POSITION_NORMALIZED
|
|
#pragma shader_feature_local _ENABLEFOG_ON
|
|
#pragma shader_feature_local _ENABLECOLORTINT_ON
|
|
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
|
|
#pragma multi_compile_fragment _ _SHADOWS_SOFT _SHADOWS_SOFT_LOW _SHADOWS_SOFT_MEDIUM _SHADOWS_SOFT_HIGH
|
|
#pragma multi_compile _ LIGHTMAP_ON
|
|
#pragma multi_compile _ DIRLIGHTMAP_COMBINED
|
|
#pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
|
|
#pragma multi_compile _ LIGHTMAP_BICUBIC_SAMPLING
|
|
#pragma multi_compile_fragment _ _REFLECTION_PROBE_ATLAS
|
|
#pragma multi_compile _ DYNAMICLIGHTMAP_ON
|
|
|
|
|
|
#if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
|
|
#define ASE_SV_DEPTH SV_DepthLessEqual
|
|
#define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
|
|
#else
|
|
#define ASE_SV_DEPTH SV_Depth
|
|
#define ASE_SV_POSITION_QUALIFIERS
|
|
#endif
|
|
|
|
struct Attributes
|
|
{
|
|
float4 positionOS : POSITION;
|
|
half3 normalOS : NORMAL;
|
|
half4 tangentOS : TANGENT;
|
|
float4 ase_texcoord : TEXCOORD0;
|
|
float4 texcoord1 : TEXCOORD1;
|
|
float4 texcoord2 : TEXCOORD2;
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct PackedVaryings
|
|
{
|
|
ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
|
|
float3 positionWS : TEXCOORD0;
|
|
half3 normalWS : TEXCOORD1;
|
|
half4 tangentWS : TEXCOORD2;
|
|
float4 ase_texcoord3 : TEXCOORD3;
|
|
float4 ase_texcoord4 : TEXCOORD4;
|
|
float4 lightmapUVOrVertexSH : TEXCOORD5;
|
|
float4 dynamicLightmapUV : TEXCOORD6;
|
|
float4 ase_texcoord7 : TEXCOORD7;
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
UNITY_VERTEX_OUTPUT_STEREO
|
|
};
|
|
|
|
CBUFFER_START(UnityPerMaterial)
|
|
float4 _BaseTint;
|
|
float _NormalScale;
|
|
float _RampScale;
|
|
float _RampOffset;
|
|
float _FogHeight;
|
|
float _FogDensity;
|
|
float _AlphaClip;
|
|
float _Cutoff;
|
|
#ifdef ASE_TESSELLATION
|
|
float _TessPhongStrength;
|
|
float _TessValue;
|
|
float _TessMin;
|
|
float _TessMax;
|
|
float _TessEdgeLength;
|
|
float _TessMaxDisp;
|
|
#endif
|
|
CBUFFER_END
|
|
|
|
#ifdef SCENEPICKINGPASS
|
|
float4 _SelectionID;
|
|
#endif
|
|
|
|
#ifdef SCENESELECTIONPASS
|
|
int _ObjectId;
|
|
int _PassValue;
|
|
#endif
|
|
|
|
sampler2D _MainTexture;
|
|
sampler2D _TextureRamp;
|
|
sampler2D _NormalMap;
|
|
|
|
|
|
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/GBufferOutput.hlsl"
|
|
|
|
half3 ASEIndirectDiffuse( PackedVaryings input, half3 normalWS, float3 positionWS, half3 viewDirWS )
|
|
{
|
|
#if defined( DYNAMICLIGHTMAP_ON )
|
|
return SAMPLE_GI( input.lightmapUVOrVertexSH.xy, input.dynamicLightmapUV.xy, 0, normalWS );
|
|
#elif defined( LIGHTMAP_ON )
|
|
return SAMPLE_GI( input.lightmapUVOrVertexSH.xy, 0, normalWS );
|
|
#elif defined( PROBE_VOLUMES_L1 ) || defined( PROBE_VOLUMES_L2 )
|
|
return SampleProbeVolumePixel( SampleSH( normalWS ), positionWS, normalWS, viewDirWS, input.positionCS.xy );
|
|
#else
|
|
return SampleSH( normalWS );
|
|
#endif
|
|
}
|
|
|
|
half4 CalculateShadowMask343_g61167( )
|
|
{
|
|
#if defined(SHADOWS_SHADOWMASK) && defined(LIGHTMAP_ON)
|
|
half4 shadowMask = inputData.shadowMask;
|
|
#elif !defined (LIGHTMAP_ON)
|
|
half4 shadowMask = unity_ProbesOcclusion;
|
|
#else
|
|
half4 shadowMask = half4(1, 1, 1, 1);
|
|
#endif
|
|
return shadowMask;
|
|
}
|
|
|
|
float3 AdditionalLightsLambertMask171x( float3 WorldPosition, float2 ScreenUV, float3 WorldNormal, float4 ShadowMask )
|
|
{
|
|
float3 Color = 0;
|
|
#if defined(_ADDITIONAL_LIGHTS)
|
|
#define SUM_LIGHTLAMBERT(Light)\
|
|
half3 AttLightColor = Light.color * ( Light.distanceAttenuation * Light.shadowAttenuation );\
|
|
Color += LightingLambert( AttLightColor, Light.direction, WorldNormal );
|
|
InputData inputData = (InputData)0;
|
|
inputData.normalizedScreenSpaceUV = ScreenUV;
|
|
inputData.positionWS = WorldPosition;
|
|
uint meshRenderingLayers = GetMeshRenderingLayer();
|
|
uint pixelLightCount = GetAdditionalLightsCount();
|
|
#if USE_CLUSTER_LIGHT_LOOP
|
|
[loop] for (uint lightIndex = 0; lightIndex < min(URP_FP_DIRECTIONAL_LIGHTS_COUNT, MAX_VISIBLE_LIGHTS); lightIndex++)
|
|
{
|
|
CLUSTER_LIGHT_LOOP_SUBTRACTIVE_LIGHT_CHECK
|
|
Light light = GetAdditionalLight(lightIndex, WorldPosition, ShadowMask);
|
|
#ifdef _LIGHT_LAYERS
|
|
if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
|
|
#endif
|
|
{
|
|
SUM_LIGHTLAMBERT( light );
|
|
}
|
|
}
|
|
#endif
|
|
|
|
LIGHT_LOOP_BEGIN( pixelLightCount )
|
|
Light light = GetAdditionalLight(lightIndex, WorldPosition, ShadowMask);
|
|
#ifdef _LIGHT_LAYERS
|
|
if (IsMatchingLightLayer(light.layerMask, meshRenderingLayers))
|
|
#endif
|
|
{
|
|
SUM_LIGHTLAMBERT( light );
|
|
}
|
|
LIGHT_LOOP_END
|
|
#endif
|
|
return Color;
|
|
}
|
|
|
|
|
|
PackedVaryings VertexFunction( Attributes input )
|
|
{
|
|
PackedVaryings output = (PackedVaryings)0;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
|
|
|
|
float3 ase_positionWS = TransformObjectToWorld( ( input.positionOS ).xyz );
|
|
float4 ase_shadowCoords = TransformWorldToShadowCoord( ase_positionWS );
|
|
output.ase_texcoord4 = ase_shadowCoords;
|
|
float3 ase_normalWS = TransformObjectToWorldNormal( input.normalOS );
|
|
OUTPUT_LIGHTMAP_UV( input.texcoord1, unity_LightmapST, output.lightmapUVOrVertexSH.xy );
|
|
#if !defined( OUTPUT_SH4 )
|
|
OUTPUT_SH( ase_positionWS, ase_normalWS, GetWorldSpaceNormalizeViewDir( ase_positionWS ), output.lightmapUVOrVertexSH.xyz );
|
|
#elif UNITY_VERSION > 60000009
|
|
OUTPUT_SH4( ase_positionWS, ase_normalWS, GetWorldSpaceNormalizeViewDir( ase_positionWS ), output.lightmapUVOrVertexSH.xyz, output.probeOcclusion );
|
|
#else
|
|
OUTPUT_SH4( ase_positionWS, ase_normalWS, GetWorldSpaceNormalizeViewDir( ase_positionWS ), output.lightmapUVOrVertexSH.xyz );
|
|
#endif
|
|
#if defined( DYNAMICLIGHTMAP_ON )
|
|
output.dynamicLightmapUV.xy = input.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
|
|
#endif
|
|
|
|
output.ase_texcoord3.xy = input.ase_texcoord.xy;
|
|
output.ase_texcoord7 = input.positionOS;
|
|
|
|
//setting value to unused interpolator channels and avoid initialization warnings
|
|
output.ase_texcoord3.zw = 0;
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
float3 defaultVertexValue = input.positionOS.xyz;
|
|
#else
|
|
float3 defaultVertexValue = float3(0, 0, 0);
|
|
#endif
|
|
|
|
float3 vertexValue = defaultVertexValue;
|
|
|
|
#ifdef ASE_ABSOLUTE_VERTEX_POS
|
|
input.positionOS.xyz = vertexValue;
|
|
#else
|
|
input.positionOS.xyz += vertexValue;
|
|
#endif
|
|
|
|
input.normalOS = input.normalOS;
|
|
input.tangentOS = input.tangentOS;
|
|
|
|
VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
|
|
VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS, input.tangentOS );
|
|
|
|
output.positionCS = vertexInput.positionCS;
|
|
output.positionWS = vertexInput.positionWS;
|
|
output.normalWS = normalInput.normalWS;
|
|
output.tangentWS = half4( normalInput.tangentWS, ( input.tangentOS.w > 0.0 ? 1.0 : -1.0 ) * GetOddNegativeScale() );;
|
|
return output;
|
|
}
|
|
|
|
#if defined(ASE_TESSELLATION)
|
|
struct VertexControl
|
|
{
|
|
float4 positionOS : INTERNALTESSPOS;
|
|
half3 normalOS : NORMAL;
|
|
half4 tangentOS : TANGENT;
|
|
float4 ase_texcoord : TEXCOORD0;
|
|
float4 texcoord1 : TEXCOORD1;
|
|
float4 texcoord2 : TEXCOORD2;
|
|
|
|
UNITY_VERTEX_INPUT_INSTANCE_ID
|
|
};
|
|
|
|
struct TessellationFactors
|
|
{
|
|
float edge[3] : SV_TessFactor;
|
|
float inside : SV_InsideTessFactor;
|
|
};
|
|
|
|
VertexControl vert ( Attributes input )
|
|
{
|
|
VertexControl output;
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_TRANSFER_INSTANCE_ID(input, output);
|
|
output.positionOS = input.positionOS;
|
|
output.normalOS = input.normalOS;
|
|
output.tangentOS = input.tangentOS;
|
|
output.ase_texcoord = input.ase_texcoord;
|
|
output.texcoord1 = input.texcoord1;
|
|
output.texcoord2 = input.texcoord2;
|
|
return output;
|
|
}
|
|
|
|
TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
|
|
{
|
|
TessellationFactors output;
|
|
float4 tf = 1;
|
|
float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
|
|
float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
|
|
#if defined(ASE_FIXED_TESSELLATION)
|
|
tf = FixedTess( tessValue );
|
|
#elif defined(ASE_DISTANCE_TESSELLATION)
|
|
tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
|
|
#elif defined(ASE_LENGTH_TESSELLATION)
|
|
tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
|
|
#elif defined(ASE_LENGTH_CULL_TESSELLATION)
|
|
tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
|
|
#endif
|
|
output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
|
|
return output;
|
|
}
|
|
|
|
[domain("tri")]
|
|
[partitioning("fractional_odd")]
|
|
[outputtopology("triangle_cw")]
|
|
[patchconstantfunc("TessellationFunction")]
|
|
[outputcontrolpoints(3)]
|
|
VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
|
|
{
|
|
return patch[id];
|
|
}
|
|
|
|
[domain("tri")]
|
|
PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
|
|
{
|
|
Attributes output = (Attributes) 0;
|
|
output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
|
|
output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
|
|
output.tangentOS = patch[0].tangentOS * bary.x + patch[1].tangentOS * bary.y + patch[2].tangentOS * bary.z;
|
|
output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
|
|
output.texcoord1 = patch[0].texcoord1 * bary.x + patch[1].texcoord1 * bary.y + patch[2].texcoord1 * bary.z;
|
|
output.texcoord2 = patch[0].texcoord2 * bary.x + patch[1].texcoord2 * bary.y + patch[2].texcoord2 * bary.z;
|
|
#if defined(ASE_PHONG_TESSELLATION)
|
|
float3 pp[3];
|
|
for (int i = 0; i < 3; ++i)
|
|
pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
|
|
float phongStrength = _TessPhongStrength;
|
|
output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
|
|
#endif
|
|
UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
|
|
return VertexFunction(output);
|
|
}
|
|
#else
|
|
PackedVaryings vert ( Attributes input )
|
|
{
|
|
return VertexFunction( input );
|
|
}
|
|
#endif
|
|
|
|
GBufferFragOutput frag ( PackedVaryings input
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
,out float outputDepth : ASE_SV_DEPTH
|
|
#endif
|
|
)
|
|
{
|
|
UNITY_SETUP_INSTANCE_ID(input);
|
|
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
|
|
|
|
#if defined(LOD_FADE_CROSSFADE)
|
|
LODFadeCrossFade( input.positionCS );
|
|
#endif
|
|
|
|
// @diogo: mikktspace compliant
|
|
float renormFactor = 1.0 / max( FLT_MIN, length( input.normalWS ) );
|
|
|
|
float3 PositionWS = input.positionWS;
|
|
float3 ViewDirWS = GetWorldSpaceNormalizeViewDir( PositionWS );
|
|
float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw );
|
|
float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w;
|
|
float4 ScreenPos = ComputeScreenPos( ClipPos );
|
|
float3 TangentWS = input.tangentWS.xyz * renormFactor;
|
|
float3 BitangentWS = cross( input.normalWS, input.tangentWS.xyz ) * input.tangentWS.w * renormFactor;
|
|
float3 NormalWS = input.normalWS * renormFactor;
|
|
|
|
float4 color217 = IsGammaSpace() ? float4( 1, 1, 1, 1 ) : float4( 1, 1, 1, 1 );
|
|
#ifdef _ENABLECOLORTINT_ON
|
|
float4 staticSwitch213 = _BaseTint;
|
|
#else
|
|
float4 staticSwitch213 = color217;
|
|
#endif
|
|
float2 uv_MainTexture18 = input.ase_texcoord3.xy;
|
|
float4 tex2DNode18 = tex2D( _MainTexture, uv_MainTexture18 );
|
|
float2 uv_NormalMap51 = input.ase_texcoord3.xy;
|
|
float3 unpack51 = UnpackNormalScale( tex2D( _NormalMap, uv_NormalMap51 ), _NormalScale );
|
|
unpack51.z = lerp( 1, unpack51.z, saturate(_NormalScale) );
|
|
float3 tanToWorld0 = float3( TangentWS.x, BitangentWS.x, NormalWS.x );
|
|
float3 tanToWorld1 = float3( TangentWS.y, BitangentWS.y, NormalWS.y );
|
|
float3 tanToWorld2 = float3( TangentWS.z, BitangentWS.z, NormalWS.z );
|
|
float3 tanNormal6 = unpack51;
|
|
float3 worldNormal6 = normalize( float3( dot( tanToWorld0, tanNormal6 ), dot( tanToWorld1, tanNormal6 ), dot( tanToWorld2, tanNormal6 ) ) );
|
|
float3 normalizeResult90 = normalize( worldNormal6 );
|
|
float3 Normals91 = normalizeResult90;
|
|
float dotResult221 = dot( Normals91 , SafeNormalize( _MainLightPosition.xyz ) );
|
|
float RampScale665 = _RampScale;
|
|
float RampOffset666 = _RampOffset;
|
|
float CEL_Effect224 = saturate( (dotResult221*RampScale665 + RampOffset666) );
|
|
float2 temp_cast_0 = (CEL_Effect224).xx;
|
|
float ase_lightIntensity = max( max( _MainLightColor.r, _MainLightColor.g ), _MainLightColor.b ) + 1e-7;
|
|
float4 ase_lightColor = float4( _MainLightColor.rgb / ase_lightIntensity, ase_lightIntensity );
|
|
float ase_lightAtten = 0;
|
|
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) //la
|
|
float4 ase_shadowCoords = input.ase_texcoord4;
|
|
#elif defined(MAIN_LIGHT_CALCULATE_SHADOWS) //la
|
|
float4 ase_shadowCoords = TransformWorldToShadowCoord( PositionWS );
|
|
#else //la
|
|
float4 ase_shadowCoords = 0;
|
|
#endif //la
|
|
Light ase_mainLight = GetMainLight( ase_shadowCoords );
|
|
ase_lightAtten = ase_mainLight.distanceAttenuation * ase_mainLight.shadowAttenuation;
|
|
float3 bakedGI167 = ASEIndirectDiffuse( input, NormalWS, PositionWS, ViewDirWS );
|
|
MixRealtimeAndBakedGI( ase_mainLight, NormalWS, bakedGI167, half4( 0, 0, 0, 0 ) );
|
|
float4 HalfLambert96 = ( ( ase_lightColor * ase_lightAtten ) + float4( bakedGI167 , 0.0 ) );
|
|
float3 WorldPosition288_g61167 = PositionWS;
|
|
float3 WorldPosition337_g61167 = WorldPosition288_g61167;
|
|
float2 ScreenUV286_g61167 = (ScreenPosNorm).xy;
|
|
float2 ScreenUV337_g61167 = ScreenUV286_g61167;
|
|
float3 WorldNormal281_g61167 = Normals91;
|
|
float3 WorldNormal337_g61167 = WorldNormal281_g61167;
|
|
half4 localCalculateShadowMask343_g61167 = CalculateShadowMask343_g61167();
|
|
float4 ShadowMask360_g61167 = localCalculateShadowMask343_g61167;
|
|
float4 ShadowMask337_g61167 = ShadowMask360_g61167;
|
|
float3 localAdditionalLightsLambertMask171x337_g61167 = AdditionalLightsLambertMask171x( WorldPosition337_g61167 , ScreenUV337_g61167 , WorldNormal337_g61167 , ShadowMask337_g61167 );
|
|
float4 temp_output_212_0 = ( staticSwitch213 * ( ( ( tex2DNode18 * tex2D( _TextureRamp, temp_cast_0 ) ) * HalfLambert96 ) + ( tex2DNode18 * tex2D( _TextureRamp, (saturate( localAdditionalLightsLambertMask171x337_g61167 )*RampScale665 + RampOffset666).xy ) ) ) );
|
|
float4 lerpResult761 = lerp( temp_output_212_0 , unity_FogColor , saturate( ( ( ( ( 1.0 - input.ase_texcoord7.xyz.y ) + _FogHeight ) / 10.0 ) * ( _FogDensity / 10.0 ) ) ));
|
|
#ifdef _ENABLEFOG_ON
|
|
float4 staticSwitch721 = lerpResult761;
|
|
#else
|
|
float4 staticSwitch721 = temp_output_212_0;
|
|
#endif
|
|
|
|
|
|
float3 Color = staticSwitch721.rgb;
|
|
float Alpha = 1;
|
|
#if defined( _ALPHATEST_ON )
|
|
float AlphaClipThreshold = _Cutoff;
|
|
float AlphaClipThresholdShadow = 0.5;
|
|
#endif
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
input.positionCS.z = input.positionCS.z;
|
|
#endif
|
|
|
|
#ifdef _ALPHATEST_ON
|
|
clip(Alpha - AlphaClipThreshold);
|
|
#endif
|
|
|
|
InputData inputData = (InputData)0;
|
|
inputData.positionWS = PositionWS;
|
|
inputData.positionCS = input.positionCS;
|
|
inputData.normalizedScreenSpaceUV = ScreenPosNorm.xy;
|
|
inputData.normalWS = NormalWS;
|
|
inputData.viewDirectionWS = ViewDirWS;
|
|
|
|
#if defined(_DBUFFER)
|
|
ApplyDecalToBaseColor(input.positionCS, Color);
|
|
#endif
|
|
|
|
#if defined( ASE_DEPTH_WRITE_ON )
|
|
outputDepth = input.positionCS.z;
|
|
#endif
|
|
|
|
SurfaceData surfaceData = (SurfaceData)0;
|
|
surfaceData.albedo = Color;
|
|
surfaceData.alpha = Alpha;
|
|
|
|
#if defined( _SCREEN_SPACE_OCCLUSION ) // GBuffer never has transparents
|
|
float2 normalizedScreenSpaceUV = GetNormalizedScreenSpaceUV( input.positionCS );
|
|
AmbientOcclusionFactor aoFactor = GetScreenSpaceAmbientOcclusion( normalizedScreenSpaceUV );
|
|
surfaceData.occlusion = aoFactor.directAmbientOcclusion;
|
|
#else
|
|
surfaceData.occlusion = 1;
|
|
#endif
|
|
|
|
return PackGBuffersSurfaceData( surfaceData, inputData, float3( 0, 0, 0 ) );
|
|
}
|
|
|
|
ENDHLSL
|
|
}
|
|
|
|
}
|
|
|
|
CustomEditor "UnityEditor.ShaderGraphUnlitGUI"
|
|
FallBack "Hidden/Shader Graph/FallbackError"
|
|
|
|
Fallback Off
|
|
}
|
|
/*ASEBEGIN
|
|
Version=19908
|
|
Node;AmplifyShaderEditor.TexturePropertyNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;131;-2864,-2768;Inherit;True;Property;_NormalMap;Normal Map;9;3;[NoScaleOffset];[Normal];[SingleLineTexture];Create;True;0;0;0;False;1;Space (8);False;None;None;False;white;Auto;Texture2D;False;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1
|
|
Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;139;-2864,-2048;Inherit;False;1092;325;;5;52;134;51;6;90;Normals;0.6382856,0.4745098,1,1;0;0
|
|
Node;AmplifyShaderEditor.RegisterLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;132;-2624,-2768;Inherit;False;NormalMap;-1;True;1;0;SAMPLER2D;;False;1;SAMPLER2D;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;134;-2768,-2000;Inherit;False;132;NormalMap;1;0;OBJECT;;False;1;SAMPLER2D;0
|
|
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;52;-2816,-1888;Inherit;False;Property;_NormalScale;Normal Scale;10;0;Create;True;0;0;0;False;0;False;1;1;0;5;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;51;-2464,-1952;Inherit;True;Property;_Normal;Normal;2;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;True;Object;-1;Auto;Texture2D;False;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
|
Node;AmplifyShaderEditor.WorldNormalVector, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;6;-2144,-1952;Inherit;False;True;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
|
|
Node;AmplifyShaderEditor.NormalizeNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;90;-1952,-1952;Inherit;False;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
|
|
Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;226;-1712,-2448;Inherit;False;1166.792;305.3181;;7;223;222;221;220;219;668;667;CEL Effect;0.7960785,0.7215686,0,1;0;0
|
|
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;663;-2320,-2976;Inherit;False;Property;_RampScale;Ramp Scale;6;0;Create;True;0;0;0;False;0;False;0.5;0;0;1;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;662;-2320,-2880;Inherit;False;Property;_RampOffset;Ramp Offset;7;0;Create;True;0;0;0;False;0;False;0.5;0;0;1;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.RegisterLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;91;-1712,-1952;Inherit;False;Normals;-1;True;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
|
|
Node;AmplifyShaderEditor.WorldSpaceLightDirHlpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;219;-1664,-2304;Inherit;False;True;1;0;FLOAT;0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
|
|
Node;AmplifyShaderEditor.RegisterLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;666;-2000,-2880;Inherit;False;RampOffset;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.RegisterLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;665;-2000,-2976;Inherit;False;RampScale;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;220;-1632,-2400;Inherit;False;91;Normals;1;0;OBJECT;;False;1;FLOAT3;0
|
|
Node;AmplifyShaderEditor.DotProductOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;221;-1392,-2384;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;668;-1280,-2240;Inherit;False;666;RampOffset;1;0;OBJECT;;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;667;-1280,-2320;Inherit;False;665;RampScale;1;0;OBJECT;;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.CommentaryNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;163;-2864,-2448;Inherit;False;816;304;;5;164;165;167;168;166;Half Lambert;0.8078432,0.7294118,0,1;0;0
|
|
Node;AmplifyShaderEditor.ScaleAndOffsetNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;222;-976,-2384;Inherit;False;3;0;FLOAT;1;False;1;FLOAT;0.5;False;2;FLOAT;0.5;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;223;-720,-2384;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.LightColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;166;-2816,-2400;Inherit;False;0;3;COLOR;0;FLOAT3;1;FLOAT;2
|
|
Node;AmplifyShaderEditor.LightAttenuation, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;168;-2816,-2256;Inherit;False;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.TexturePropertyNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;121;-2864,-3184;Inherit;True;Property;_MainTexture;Main Texture;8;2;[NoScaleOffset];[SingleLineTexture];Create;True;0;0;0;False;1;Space (8);False;None;None;False;white;Auto;Texture2D;False;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1
|
|
Node;AmplifyShaderEditor.TexturePropertyNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;123;-2864,-2976;Inherit;True;Property;_TextureRamp;Texture Ramp;5;3;[Header];[NoScaleOffset];[SingleLineTexture];Create;True;1;Textures;0;0;False;1;Space (8);False;None;None;False;white;Auto;Texture2D;False;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;274;384,-720;Inherit;False;91;Normals;1;0;OBJECT;;False;1;FLOAT3;0
|
|
Node;AmplifyShaderEditor.RegisterLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;124;-2624,-2976;Inherit;False;TextureRamp;-1;True;1;0;SAMPLER2D;;False;1;SAMPLER2D;0
|
|
Node;AmplifyShaderEditor.RegisterLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;122;-2624,-3184;Inherit;False;MainTexture;-1;True;1;0;SAMPLER2D;;False;1;SAMPLER2D;0
|
|
Node;AmplifyShaderEditor.IndirectDiffuseLighting, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;167;-2480,-2256;Inherit;False;Tangent;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;165;-2480,-2400;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;272;608,-720;Inherit;False;SRP Additional Light;-1;;61167;6c86746ad131a0a408ca599df5f40861;3,6,1,351,1,23,0;6;2;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;345;FLOAT3;0,0,0;False;346;FLOAT3;0,0,0;False;347;FLOAT;0.5;False;32;FLOAT4;0,0,0,0;False;1;FLOAT3;0
|
|
Node;AmplifyShaderEditor.RegisterLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;224;-480,-2384;Inherit;False;CEL Effect;-1;True;1;0;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.PosVertexDataNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;710;1280,-512;Inherit;False;0;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
|
|
Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;164;-2208,-2400;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT3;0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;125;1056,-1168;Inherit;False;122;MainTexture;1;0;OBJECT;;False;1;SAMPLER2D;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;126;1024,-976;Inherit;False;124;TextureRamp;1;0;OBJECT;;False;1;SAMPLER2D;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;225;1024,-896;Inherit;False;224;CEL Effect;1;0;OBJECT;;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;318;896,-720;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;669;672,-528;Inherit;False;666;RampOffset;1;0;OBJECT;;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;670;672,-608;Inherit;False;665;RampScale;1;0;OBJECT;;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.OneMinusNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;711;1488,-464;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;712;1280,-368;Inherit;False;Property;_FogHeight;Fog Height;1;0;Create;True;0;0;0;False;0;False;1;0;0;10000;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;14;1280,-976;Inherit;True;Property;_TextureRamp1;Texture Ramp 1;0;1;[Header];Create;True;1;Textures;0;0;False;1;Space(8);False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;False;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
|
Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;18;1280,-1168;Inherit;True;Property;_MainTexture1;Main Texture 1;0;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Instance;-1;Auto;Texture2D;False;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
|
Node;AmplifyShaderEditor.ScaleAndOffsetNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;664;1056,-720;Inherit;False;3;0;FLOAT3;0,0,0;False;1;FLOAT;1;False;2;FLOAT;0;False;1;FLOAT3;0
|
|
Node;AmplifyShaderEditor.RegisterLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;96;-1984,-2400;Inherit;False;HalfLambert;-1;True;1;0;COLOR;0,0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;713;1776,-432;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;714;1616,-320;Inherit;False;Property;_FogDensity;Fog Density;2;0;Create;True;0;0;0;False;0;False;1;0;0;1;0;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;170;1792,-1168;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.GetLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;218;1760,-1040;Inherit;False;96;HalfLambert;1;0;OBJECT;;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.SamplerNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;281;1280,-784;Inherit;True;Property;_TextureRamp2;Texture Ramp 1;0;1;[Header];Create;True;1;Textures;0;0;False;1;Space(8);False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;False;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
|
Node;AmplifyShaderEditor.SimpleDivideOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;716;1952,-448;Inherit;False;2;0;FLOAT;1;False;1;FLOAT;10;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SimpleDivideOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;715;1952,-336;Inherit;False;2;0;FLOAT;1;False;1;FLOAT;10;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;217;1344,-1616;Inherit;False;Constant;_DefaultTint;Default Tint;19;0;Create;True;0;0;0;False;0;False;1,1,1,1;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;169;1984,-1168;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;278;1792,-944;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;211;1344,-1392;Inherit;False;Property;_BaseTint;Base Tint;4;0;Create;True;0;0;0;False;1;Space(8);False;1,1,1,1;0,0,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;717;2144,-384;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;279;2176,-1168;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;213;1920,-1392;Inherit;False;Property;_EnableColorTint;Enable Color Tint;3;0;Create;True;0;0;0;False;2;Header(Color);Space(8);False;0;1;1;True;;Toggle;2;Key0;Key1;Create;True;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.FogAndAmbientColorsNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;718;2336,-1024;Inherit;True;unity_FogColor;0;1;COLOR;0
|
|
Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;719;2304,-384;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
|
|
Node;AmplifyShaderEditor.LerpOp, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;761;2784,-1024;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;212;2560,-1296;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
|
|
Node;AmplifyShaderEditor.RegisterLocalVarNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;147;-2624,-3392;Inherit;False;Emission Map;-1;True;1;0;SAMPLER2D;;False;1;SAMPLER2D;0
|
|
Node;AmplifyShaderEditor.TexturePropertyNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;146;-2864,-3392;Inherit;True;Property;_EmissionMap;Emission Map;11;2;[NoScaleOffset];[SingleLineTexture];Create;True;0;0;0;False;1;Space (8);False;None;None;False;white;Auto;Texture2D;False;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1
|
|
Node;AmplifyShaderEditor.StaticSwitch, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;721;2976,-1120;Inherit;False;Property;_EnableFog;Enable Fog;0;0;Create;False;0;0;0;False;2;Header(Fog);Space(8);False;0;1;1;True;;Toggle;2;Key0;Key1;Create;True;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.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;778;2944,-1120;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;6;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;False;True;0;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;780;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;781;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;782;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;783;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;False;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;784;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;785;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;786;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;787;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;False;True;1;LightMode=DepthNormalsOnly;False;True;11;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;switch2;webgpu;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;788;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;MotionVectors;0;10;MotionVectors;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;False;False;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=MotionVectors;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;789;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;XRMotionVectors;0;11;XRMotionVectors;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;True;1;False;;255;False;;1;False;;7;False;;3;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;1;LightMode=XRMotionVectors;False;False;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;790;2944,-752;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;GBuffer;0;12;GBuffer;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;True;1;1;False;;0;False;;1;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;False;True;1;LightMode=UniversalGBuffer;False;True;12;d3d11;gles;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;switch2;webgpu;0;;0;0;Standard;0;False;0
|
|
Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;779;3264,-1120;Float;False;True;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;19;ToonScapes/URP/Background;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;10;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;14;all;0;False;True;1;1;False;;0;False;;1;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;False;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;30;Surface;0;0; Keep Alpha;0;0; Blend;0;0;Two Sided;1;0;Alpha Clipping;0;639066075159519937; Use Shadow Threshold;0;0;Forward Only;0;0;Cast Shadows;1;0;Receive Shadows;2;0;Receive SSAO;0;639066075091621666;Motion Vectors;0;639066075132286499; Add Precomputed Velocity;0;0; XR Motion Vectors;0;0;GPU Instancing;0;639066075014603735;LOD CrossFade;0;639066075003499097;Built-in Fog;0;639066074989340539;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Write Depth;0;0; Early Z;0;0;Vertex Position;1;0;0;13;False;True;True;True;False;False;True;True;True;False;False;False;True;False;;False;0
|
|
WireConnection;132;0;131;0
|
|
WireConnection;51;0;134;0
|
|
WireConnection;51;5;52;0
|
|
WireConnection;6;0;51;0
|
|
WireConnection;90;0;6;0
|
|
WireConnection;91;0;90;0
|
|
WireConnection;666;0;662;0
|
|
WireConnection;665;0;663;0
|
|
WireConnection;221;0;220;0
|
|
WireConnection;221;1;219;0
|
|
WireConnection;222;0;221;0
|
|
WireConnection;222;1;667;0
|
|
WireConnection;222;2;668;0
|
|
WireConnection;223;0;222;0
|
|
WireConnection;124;0;123;0
|
|
WireConnection;122;0;121;0
|
|
WireConnection;165;0;166;0
|
|
WireConnection;165;1;168;0
|
|
WireConnection;272;11;274;0
|
|
WireConnection;224;0;223;0
|
|
WireConnection;164;0;165;0
|
|
WireConnection;164;1;167;0
|
|
WireConnection;318;0;272;0
|
|
WireConnection;711;0;710;2
|
|
WireConnection;14;0;126;0
|
|
WireConnection;14;1;225;0
|
|
WireConnection;18;0;125;0
|
|
WireConnection;664;0;318;0
|
|
WireConnection;664;1;670;0
|
|
WireConnection;664;2;669;0
|
|
WireConnection;96;0;164;0
|
|
WireConnection;713;0;711;0
|
|
WireConnection;713;1;712;0
|
|
WireConnection;170;0;18;0
|
|
WireConnection;170;1;14;0
|
|
WireConnection;281;0;126;0
|
|
WireConnection;281;1;664;0
|
|
WireConnection;716;0;713;0
|
|
WireConnection;715;0;714;0
|
|
WireConnection;169;0;170;0
|
|
WireConnection;169;1;218;0
|
|
WireConnection;278;0;18;0
|
|
WireConnection;278;1;281;0
|
|
WireConnection;717;0;716;0
|
|
WireConnection;717;1;715;0
|
|
WireConnection;279;0;169;0
|
|
WireConnection;279;1;278;0
|
|
WireConnection;213;1;217;0
|
|
WireConnection;213;0;211;0
|
|
WireConnection;719;0;717;0
|
|
WireConnection;761;0;212;0
|
|
WireConnection;761;1;718;0
|
|
WireConnection;761;2;719;0
|
|
WireConnection;212;0;213;0
|
|
WireConnection;212;1;279;0
|
|
WireConnection;147;0;146;0
|
|
WireConnection;721;1;212;0
|
|
WireConnection;721;0;761;0
|
|
WireConnection;779;2;721;0
|
|
ASEEND*/
|
|
//CHKSM=468C50C896E1C5AC29FA31B55CA99CF0DCC9364B |