diff --git a/.vsconfig b/.vsconfig new file mode 100644 index 00000000..f019fd0a --- /dev/null +++ b/.vsconfig @@ -0,0 +1,6 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Workload.ManagedGame" + ] +} diff --git a/Assets/000_assets/Anim.meta b/Assets/000_assets/Anim.meta new file mode 100644 index 00000000..9d8f671c --- /dev/null +++ b/Assets/000_assets/Anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b620e892c4e6cef42b58998db5e25480 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/000_assets/Anim/DTM_Trail.controller b/Assets/000_assets/Anim/DTM_Trail.controller new file mode 100644 index 00000000..e8c3c85f --- /dev/null +++ b/Assets/000_assets/Anim/DTM_Trail.controller @@ -0,0 +1,72 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1102 &-5044118729681229552 +AnimatorState: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HitPoint + m_Speed: 1 + m_CycleOffset: 0 + m_Transitions: [] + m_StateMachineBehaviours: [] + m_Position: {x: 50, y: 50, z: 0} + m_IKOnFeet: 0 + m_WriteDefaultValues: 1 + m_Mirror: 0 + m_SpeedParameterActive: 0 + m_MirrorParameterActive: 0 + m_CycleOffsetParameterActive: 0 + m_TimeParameterActive: 0 + m_Motion: {fileID: 7400000, guid: 96eebd1d5b544e74ca55536541f943f2, type: 2} + m_Tag: + m_SpeedParameter: + m_MirrorParameter: + m_CycleOffsetParameter: + m_TimeParameter: +--- !u!91 &9100000 +AnimatorController: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: DTM_Trail + serializedVersion: 5 + m_AnimatorParameters: [] + m_AnimatorLayers: + - serializedVersion: 5 + m_Name: Base Layer + m_StateMachine: {fileID: 5902170936534288239} + m_Mask: {fileID: 0} + m_Motions: [] + m_Behaviours: [] + m_BlendingMode: 0 + m_SyncedLayerIndex: -1 + m_DefaultWeight: 0 + m_IKPass: 0 + m_SyncedLayerAffectsTiming: 0 + m_Controller: {fileID: 9100000} +--- !u!1107 &5902170936534288239 +AnimatorStateMachine: + serializedVersion: 6 + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: Base Layer + m_ChildStates: + - serializedVersion: 1 + m_State: {fileID: -5044118729681229552} + m_Position: {x: 320, y: 130, z: 0} + m_ChildStateMachines: [] + m_AnyStateTransitions: [] + m_EntryTransitions: [] + m_StateMachineTransitions: {} + m_StateMachineBehaviours: [] + m_AnyStatePosition: {x: 50, y: 20, z: 0} + m_EntryPosition: {x: 50, y: 120, z: 0} + m_ExitPosition: {x: 800, y: 120, z: 0} + m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} + m_DefaultState: {fileID: -5044118729681229552} diff --git a/Assets/000_assets/Anim/DTM_Trail.controller.meta b/Assets/000_assets/Anim/DTM_Trail.controller.meta new file mode 100644 index 00000000..2a58627e --- /dev/null +++ b/Assets/000_assets/Anim/DTM_Trail.controller.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 518b73ce1b7c250478e9e8283dfcbee6 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 9100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/000_assets/Anim/HitPoint_Show01.anim b/Assets/000_assets/Anim/HitPoint_Show01.anim new file mode 100644 index 00000000..f1af7e24 --- /dev/null +++ b/Assets/000_assets/Anim/HitPoint_Show01.anim @@ -0,0 +1,434 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!74 &7400000 +AnimationClip: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: HitPoint_Show01 + serializedVersion: 7 + m_Legacy: 0 + m_Compressed: 0 + m_UseHighQualityCurve: 1 + m_RotationCurves: [] + m_CompressedRotationCurves: [] + m_EulerCurves: [] + m_PositionCurves: [] + m_ScaleCurves: [] + m_FloatCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.033 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._cube_radius + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.05 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._cube_width + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ring_radius + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.28333333 + value: 0.11 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0.01 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ring_width + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.9 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0.9 + inSlope: 0 + outSlope: -0.43721995 + tangentMode: 1 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.09370208 + - serializedVersion: 3 + time: 1 + value: 0.5 + inSlope: -0.03507681 + outSlope: -0.03507681 + tangentMode: 0 + weightedMode: 1 + inWeight: 0.8706604 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._gapsize + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + m_PPtrCurves: [] + m_SampleRate: 60 + m_WrapMode: 0 + m_Bounds: + m_Center: {x: 0, y: 0, z: 0} + m_Extent: {x: 0, y: 0, z: 0} + m_ClipBindingConstant: + genericBindings: + - serializedVersion: 2 + path: 922205677 + attribute: 2312236205 + script: {fileID: 0} + typeID: 199 + customType: 22 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 922205677 + attribute: 2357554547 + script: {fileID: 0} + typeID: 199 + customType: 22 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 922205677 + attribute: 2401919657 + script: {fileID: 0} + typeID: 199 + customType: 22 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 922205677 + attribute: 2385326758 + script: {fileID: 0} + typeID: 199 + customType: 22 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + - serializedVersion: 2 + path: 922205677 + attribute: 2345372462 + script: {fileID: 0} + typeID: 199 + customType: 22 + isPPtrCurve: 0 + isIntCurve: 0 + isSerializeReferenceCurve: 0 + pptrCurveMapping: [] + m_AnimationClipSettings: + serializedVersion: 2 + m_AdditiveReferencePoseClip: {fileID: 0} + m_AdditiveReferencePoseTime: 0 + m_StartTime: 0 + m_StopTime: 1 + m_OrientationOffsetY: 0 + m_Level: 0 + m_CycleOffset: 0 + m_HasAdditiveReferencePose: 0 + m_LoopTime: 0 + m_LoopBlend: 0 + m_LoopBlendOrientation: 0 + m_LoopBlendPositionY: 0 + m_LoopBlendPositionXZ: 0 + m_KeepOriginalOrientation: 0 + m_KeepOriginalPositionY: 1 + m_KeepOriginalPositionXZ: 0 + m_HeightFromFeet: 0 + m_Mirror: 0 + m_EditorCurves: + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.033 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._cube_radius + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.33333334 + value: 0.05 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._cube_width + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0.5 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ring_radius + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0.16666667 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.28333333 + value: 0.11 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0.01 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._ring_width + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + - serializedVersion: 2 + curve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 3 + time: 0 + value: 0.9 + inSlope: 0 + outSlope: 0 + tangentMode: 136 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.33333334 + - serializedVersion: 3 + time: 0.5 + value: 0.9 + inSlope: 0 + outSlope: -0.43721995 + tangentMode: 1 + weightedMode: 0 + inWeight: 0.33333334 + outWeight: 0.09370208 + - serializedVersion: 3 + time: 1 + value: 0.5 + inSlope: -0.03507681 + outSlope: -0.03507681 + tangentMode: 0 + weightedMode: 1 + inWeight: 0.8706604 + outWeight: 0.33333334 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + attribute: material._gapsize + path: Particle System + classID: 199 + script: {fileID: 0} + flags: 0 + m_EulerEditorCurves: [] + m_HasGenericRootTransform: 0 + m_HasMotionFloatCurves: 0 + m_Events: [] diff --git a/Assets/000_assets/Anim/HitPoint_Show01.anim.meta b/Assets/000_assets/Anim/HitPoint_Show01.anim.meta new file mode 100644 index 00000000..fd06f715 --- /dev/null +++ b/Assets/000_assets/Anim/HitPoint_Show01.anim.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 96eebd1d5b544e74ca55536541f943f2 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 7400000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/000_assets/shader/New Material.mat b/Assets/000_assets/shader/New Material.mat index c407fc1a..432ea36f 100644 --- a/Assets/000_assets/shader/New Material.mat +++ b/Assets/000_assets/shader/New Material.mat @@ -18,8 +18,7 @@ Material: m_DoubleSidedGI: 0 m_CustomRenderQueue: -1 stringTagMap: {} - disabledShaderPasses: - - MOTIONVECTORS + disabledShaderPasses: [] m_LockedProperties: m_SavedProperties: serializedVersion: 3 @@ -40,19 +39,23 @@ Material: m_Floats: - _AlphaCutoff: 0.5 - _Opacity: 1 + - _QueueControl: 0 + - _QueueOffset: 0 + - _ReceiveShadows: 1 - _count: 8 - _cube_radius: 0.033 - _cube_softness: 0 - _cube_width: 0.05 - - _gap_softness: 1 + - _gap_softness: 0 - _gapsize: 0.5 - _ring_radius: 0.5 - - _ring_rotation: -1 + - _ring_rotation: 0 + - _ring_rotation_angle: 0 - _ring_softness: 0 - - _ring_width: 0.02 + - _ring_width: 0.01 m_Colors: - _EmissionColor: {r: 1, g: 1, b: 1, a: 1} - - _ImageColor: {r: 1, g: 1, b: 1, a: 0} + - _ImageColor: {r: 2, g: 2, b: 2, a: 1} m_BuildTextureStacks: [] m_AllowLocking: 1 --- !u!114 &2669937578497038573 diff --git a/Assets/000_assets/shader/hit_point.shader b/Assets/000_assets/shader/hit_point.shader index e954916f..12118fb9 100644 --- a/Assets/000_assets/shader/hit_point.shader +++ b/Assets/000_assets/shader/hit_point.shader @@ -6,7 +6,7 @@ Shader "Soullies/hit_point" { [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5 [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1) - [HDR] _ImageColor( "ImageColor", Color ) = ( 1, 1, 1, 0 ) + [HDR] _ImageColor( "ImageColor", Color ) = ( 1, 1, 1, 1 ) _Opacity( "Opacity", Float ) = 1 [Header(cube)] _cube_radius( "cube_radius", Range( 0, 0.5 ) ) = 0.05854658 _cube_width( "cube_width", Range( 0, 0.5 ) ) = 0.01032564 @@ -18,10 +18,27 @@ Shader "Soullies/hit_point" _gap_softness( "gap_softness", Range( 0, 1 ) ) = 0 _count( "count", Float ) = 8 _ring_rotation( "ring_rotation", Float ) = 0 + _ring_rotation_angle( "ring_rotation_angle", Float ) = 0 - [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {} + + //_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][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 1 + + //[HideInInspector] _XRMotionVectorsPass("_XRMotionVectorsPass", Float) = 1 } SubShader @@ -30,639 +47,220 @@ Shader "Soullies/hit_point" - Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Lit" "ShaderGraphShader"="true" } + Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" } - Cull Off + Cull Back + AlphaToMask Off + + HLSLINCLUDE - #pragma target 3.0 + #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 "Sprite Lit" - Tags { "LightMode"="Universal2D" } + + Name "Forward" + Tags { "LightMode"="UniversalForwardOnly" } Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha - ZTest LEqual ZWrite Off + ZTest LEqual Offset 0 , 0 ColorMask RGBA + HLSLPROGRAM - #define ASE_VERSION 19904 - #define ASE_SRP_VERSION -1 - - + #define _ALPHATEST_ON 1 + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION #pragma multi_compile_instancing - - #pragma vertex vert - #pragma fragment frag - - #pragma multi_compile_fragment _ DEBUG_DISPLAY - #pragma multi_compile_vertex _ SKINNED_SPRITE - - #pragma multi_compile _ USE_SHAPE_LIGHT_TYPE_0 - #pragma multi_compile _ USE_SHAPE_LIGHT_TYPE_1 - #pragma multi_compile _ USE_SHAPE_LIGHT_TYPE_2 - #pragma multi_compile _ USE_SHAPE_LIGHT_TYPE_3 - - #define _SURFACE_TYPE_TRANSPARENT 1 - #define ATTRIBUTES_NEED_NORMAL - #define ATTRIBUTES_NEED_TANGENT - #define ATTRIBUTES_NEED_TEXCOORD0 - #define ATTRIBUTES_NEED_COLOR - #define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT - #define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT - #define VARYINGS_NEED_POSITION_WS - #define VARYINGS_NEED_TEXCOORD0 - #define VARYINGS_NEED_COLOR - #define VARYINGS_NEED_SCREENPOSITION - #define FEATURES_GRAPH_VERTEX - - #define SHADERPASS SHADERPASS_SPRITELIT - - #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Fog.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/Shaders/2D/Include/Core2D.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/FoveatedRendering.hlsl" - #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.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/Shaders/2D/Include/LightingUtility.hlsl" - #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" - - #include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/SurfaceData2D.hlsl" - #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.hlsl" - - #if USE_SHAPE_LIGHT_TYPE_0 - SHAPE_LIGHT(0) - #endif - - #if USE_SHAPE_LIGHT_TYPE_1 - SHAPE_LIGHT(1) - #endif - - #if USE_SHAPE_LIGHT_TYPE_2 - SHAPE_LIGHT(2) - #endif - - #if USE_SHAPE_LIGHT_TYPE_3 - SHAPE_LIGHT(3) - #endif - - #include "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/CombinedShapeLightShared.hlsl" - - #define ASE_NEEDS_TEXTURE_COORDINATES0 - #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 - - - CBUFFER_START( UnityPerMaterial ) - float4 _ImageColor; - float _cube_width; - float _cube_softness; - float _cube_radius; - float _ring_width; - float _ring_softness; - float _ring_radius; - float _gapsize; - float _gap_softness; - float _ring_rotation; - float _count; - float _Opacity; - CBUFFER_END - - - struct VertexInput - { - float3 positionOS : POSITION; - float3 normal : NORMAL; - float4 tangent : TANGENT; - float4 uv0 : TEXCOORD0; - float4 color : COLOR; - - UNITY_SKINNED_VERTEX_INPUTS - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct VertexOutput - { - float4 positionCS : SV_POSITION; - float4 texCoord0 : TEXCOORD0; - float4 color : TEXCOORD1; - float4 screenPosition : TEXCOORD2; - float3 positionWS : TEXCOORD3; - float4 ase_color : COLOR; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - #if ETC1_EXTERNAL_ALPHA - TEXTURE2D(_AlphaTex); SAMPLER(sampler_AlphaTex); - float _EnableAlphaTexture; - #endif - - - VertexOutput vert( VertexInput v ) - { - VertexOutput o = (VertexOutput)0; - - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - UNITY_SKINNED_VERTEX_COMPUTE(v); - - v.positionOS = UnityFlipSprite( v.positionOS, unity_SpriteProps.xy ); - - o.ase_color = v.color; - #ifdef ASE_ABSOLUTE_VERTEX_POS - float3 defaultVertexValue = v.positionOS; - #else - float3 defaultVertexValue = float3(0, 0, 0); - #endif - float3 vertexValue = defaultVertexValue; - #ifdef ASE_ABSOLUTE_VERTEX_POS - v.positionOS = vertexValue; - #else - v.positionOS += vertexValue; - #endif - v.normal = v.normal; - v.tangent.xyz = v.tangent.xyz; - - VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS); - - o.positionCS = vertexInput.positionCS; - o.positionWS = vertexInput.positionWS; - o.texCoord0 = v.uv0; - o.color = v.color; - o.screenPosition = vertexInput.positionNDC; - return o; - } - - half4 frag( VertexOutput IN ) : SV_Target - { - UNITY_SETUP_INSTANCE_ID(IN); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); - - float4 positionCS = IN.positionCS; - float3 positionWS = IN.positionWS; - - float2 break104 = ( IN.texCoord0.xy - float2( 0.5,0.5 ) ); - float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); - float2 temp_output_34_0_g1 = ( IN.texCoord0.xy - float2( 0.5,0.5 ) ); - float2 break39_g1 = temp_output_34_0_g1; - float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); - float2 break53_g1 = appendResult50_g1; - float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); - float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) ) * _count ) )); - float4 break89 = _ImageColor; - float4 appendResult90 = (float4(break89.r , break89.g , break89.b , _Opacity)); - - float4 Color = ( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) * IN.ase_color * appendResult90 ); - float4 Mask = float4(1,1,1,1); - float3 Normal = float3( 0, 0, 1 ); - - #if ETC1_EXTERNAL_ALPHA - float4 alpha = SAMPLE_TEXTURE2D(_AlphaTex, sampler_AlphaTex, IN.texCoord0.xy); - Color.a = lerp( Color.a, alpha.r, _EnableAlphaTexture); - #endif - - SurfaceData2D surfaceData; - InitializeSurfaceData(Color.rgb, Color.a, Mask, surfaceData); - InputData2D inputData; - InitializeInputData(IN.texCoord0.xy, half2(IN.screenPosition.xy / IN.screenPosition.w), inputData); - SETUP_DEBUG_DATA_2D(inputData, positionWS, positionCS); - return CombinedShapeLightShared(surfaceData, inputData); - - Color *= IN.color; - } - - ENDHLSL - } - - - Pass - { - - Name "Sprite Normal" - Tags { "LightMode"="NormalsRendering" } - - Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha - ZTest LEqual - ZWrite Off - Offset 0 , 0 - ColorMask RGBA - - - HLSLPROGRAM - - #define ASE_VERSION 19904 - #define ASE_SRP_VERSION -1 - - - #pragma multi_compile_instancing - - #pragma vertex vert - #pragma fragment frag - - #pragma multi_compile _ SKINNED_SPRITE - + #pragma instancing_options renderinglayer + #pragma multi_compile _ LOD_FADE_CROSSFADE + #define ASE_FOG 1 #define _SURFACE_TYPE_TRANSPARENT 1 - #define ATTRIBUTES_NEED_NORMAL - #define ATTRIBUTES_NEED_TANGENT - #define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT - #define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT - #define VARYINGS_NEED_NORMAL_WS - #define VARYINGS_NEED_TANGENT_WS - #define FEATURES_GRAPH_VERTEX - - #define SHADERPASS SHADERPASS_SPRITENORMAL - - #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/Shaders/2D/Include/Core2D.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/FoveatedRendering.hlsl" - #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.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/Shaders/2D/Include/NormalsRenderingShared.hlsl" - #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" - - #define ASE_NEEDS_TEXTURE_COORDINATES0 - #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 - #define ASE_NEEDS_FRAG_COLOR - - - CBUFFER_START( UnityPerMaterial ) - float4 _ImageColor; - float _cube_width; - float _cube_softness; - float _cube_radius; - float _ring_width; - float _ring_softness; - float _ring_radius; - float _gapsize; - float _gap_softness; - float _ring_rotation; - float _count; - float _Opacity; - CBUFFER_END - - - struct VertexInput - { - float3 positionOS : POSITION; - float3 normal : NORMAL; - float4 tangent : TANGENT; - float4 uv0 : TEXCOORD0; - float4 color : COLOR; - - UNITY_SKINNED_VERTEX_INPUTS - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct VertexOutput - { - float4 positionCS : SV_POSITION; - float4 texCoord0 : TEXCOORD0; - float4 color : TEXCOORD1; - float3 normalWS : TEXCOORD2; - float4 tangentWS : TEXCOORD3; - float3 bitangentWS : TEXCOORD4; - - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - - - VertexOutput vert( VertexInput v ) - { - VertexOutput o = (VertexOutput)0; - - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - UNITY_SKINNED_VERTEX_COMPUTE(v); - - v.positionOS = UnityFlipSprite( v.positionOS, unity_SpriteProps.xy ); - - - #ifdef ASE_ABSOLUTE_VERTEX_POS - float3 defaultVertexValue = v.positionOS; - #else - float3 defaultVertexValue = float3(0, 0, 0); - #endif - float3 vertexValue = defaultVertexValue; - #ifdef ASE_ABSOLUTE_VERTEX_POS - v.positionOS = vertexValue; - #else - v.positionOS += vertexValue; - #endif - v.normal = v.normal; - v.tangent.xyz = v.tangent.xyz; - - VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS); - - o.texCoord0 = v.uv0; - o.color = v.color; - o.positionCS = vertexInput.positionCS; - - float3 normalWS = TransformObjectToWorldNormal(v.normal); - o.normalWS = -GetViewForwardDir(); - float4 tangentWS = float4( TransformObjectToWorldDir(v.tangent.xyz), v.tangent.w); - o.tangentWS = normalize(tangentWS); - half crossSign = (tangentWS.w > 0.0 ? 1.0 : -1.0) * GetOddNegativeScale(); - o.bitangentWS = crossSign * cross(normalWS, tangentWS.xyz) * tangentWS.w; - return o; - } - - half4 frag( VertexOutput IN ) : SV_Target - { - UNITY_SETUP_INSTANCE_ID(IN); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); - - float2 break104 = ( IN.texCoord0.xy - float2( 0.5,0.5 ) ); - float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); - float2 temp_output_34_0_g1 = ( IN.texCoord0.xy - float2( 0.5,0.5 ) ); - float2 break39_g1 = temp_output_34_0_g1; - float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); - float2 break53_g1 = appendResult50_g1; - float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); - float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) ) * _count ) )); - float4 break89 = _ImageColor; - float4 appendResult90 = (float4(break89.r , break89.g , break89.b , _Opacity)); - - float4 Color = ( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) * IN.color * appendResult90 ); - float3 Normal = float3( 0, 0, 1 ); - - Color *= IN.color; - - return NormalsRenderingShared(Color, Normal, IN.tangentWS.xyz, IN.bitangentWS, IN.normalWS); - } - - ENDHLSL - } - - - Pass - { - - Name "Sprite Forward" - Tags { "LightMode"="UniversalForward" } - - Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha - ZTest LEqual - ZWrite Off - Offset 0 , 0 - ColorMask RGBA - - - HLSLPROGRAM - #define ASE_VERSION 19904 #define ASE_SRP_VERSION -1 - #pragma multi_compile_instancing + #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3 + + #pragma multi_compile_fragment _ DEBUG_DISPLAY #pragma vertex vert #pragma fragment frag - #pragma multi_compile_fragment _ DEBUG_DISPLAY - #pragma multi_compile_vertex _ SKINNED_SPRITE - - #define _SURFACE_TYPE_TRANSPARENT 1 - #define ATTRIBUTES_NEED_NORMAL - #define ATTRIBUTES_NEED_TANGENT - #define ATTRIBUTES_NEED_TEXCOORD0 - #define ATTRIBUTES_NEED_COLOR - #define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT - #define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT - #define VARYINGS_NEED_POSITION_WS - #define VARYINGS_NEED_TEXCOORD0 - #define VARYINGS_NEED_COLOR - #define FEATURES_GRAPH_VERTEX - - #define SHADERPASS SHADERPASS_SPRITEFORWARD + #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_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Fog.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/Shaders/2D/Include/Core2D.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/FoveatedRendering.hlsl" #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.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/Shaders/2D/Include/SurfaceData2D.hlsl" - #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging2D.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_COLOR - CBUFFER_START( UnityPerMaterial ) - float4 _ImageColor; - float _cube_width; - float _cube_softness; - float _cube_radius; - float _ring_width; - float _ring_softness; - float _ring_radius; - float _gapsize; - float _gap_softness; - float _ring_rotation; - float _count; - float _Opacity; - CBUFFER_END + #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 VertexInput + struct Attributes { - float3 positionOS : POSITION; - float3 normal : NORMAL; - float4 tangent : TANGENT; - float4 uv0 : TEXCOORD0; - float4 color : COLOR; - - UNITY_SKINNED_VERTEX_INPUTS + float4 positionOS : POSITION; + half3 normalOS : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; - struct VertexOutput + struct PackedVaryings { - float4 positionCS : SV_POSITION; - float4 texCoord0 : TEXCOORD0; - float4 color : TEXCOORD1; - float3 positionWS : TEXCOORD2; - + ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; + float4 positionWSAndFogFactor : TEXCOORD0; + half3 normalWS : TEXCOORD1; + float4 ase_color : COLOR; + float4 ase_texcoord2 : TEXCOORD2; UNITY_VERTEX_INPUT_INSTANCE_ID UNITY_VERTEX_OUTPUT_STEREO }; - #if ETC1_EXTERNAL_ALPHA - TEXTURE2D( _AlphaTex ); SAMPLER( sampler_AlphaTex ); - float _EnableAlphaTexture; - #endif - - - VertexOutput vert( VertexInput v ) - { - VertexOutput o = (VertexOutput)0; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - UNITY_SKINNED_VERTEX_COMPUTE( v ); - - v.positionOS = UnityFlipSprite( v.positionOS, unity_SpriteProps.xy ); - - - #ifdef ASE_ABSOLUTE_VERTEX_POS - float3 defaultVertexValue = v.positionOS; - #else - float3 defaultVertexValue = float3( 0, 0, 0 ); - #endif - float3 vertexValue = defaultVertexValue; - #ifdef ASE_ABSOLUTE_VERTEX_POS - v.positionOS = vertexValue; - #else - v.positionOS += vertexValue; - #endif - v.normal = v.normal; - v.tangent.xyz = v.tangent.xyz; - - VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS); - - o.positionCS = vertexInput.positionCS; - o.positionWS = vertexInput.positionWS; - o.texCoord0 = v.uv0; - o.color = v.color; - - return o; - } - - half4 frag( VertexOutput IN ) : SV_Target - { - UNITY_SETUP_INSTANCE_ID(IN); - UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(IN); - - float4 positionCS = IN.positionCS; - float3 positionWS = IN.positionWS; - - float2 break104 = ( IN.texCoord0.xy - float2( 0.5,0.5 ) ); - float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); - float2 temp_output_34_0_g1 = ( IN.texCoord0.xy - float2( 0.5,0.5 ) ); - float2 break39_g1 = temp_output_34_0_g1; - float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); - float2 break53_g1 = appendResult50_g1; - float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); - float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) ) * _count ) )); - float4 break89 = _ImageColor; - float4 appendResult90 = (float4(break89.r , break89.g , break89.b , _Opacity)); - - float4 Color = ( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) * IN.color * appendResult90 ); - - #if defined(DEBUG_DISPLAY) - SurfaceData2D surfaceData; - InitializeSurfaceData(Color.rgb, Color.a, surfaceData); - InputData2D inputData; - InitializeInputData(positionWS.xy, half2(IN.texCoord0.xy), inputData); - half4 debugColor = 0; - - SETUP_DEBUG_DATA_2D(inputData, positionWS, positionCS); - - if (CanDebugOverrideOutputColor(surfaceData, inputData, debugColor)) - { - return debugColor; - } - #endif - - #if ETC1_EXTERNAL_ALPHA - float4 alpha = SAMPLE_TEXTURE2D( _AlphaTex, sampler_AlphaTex, IN.texCoord0.xy ); - Color.a = lerp( Color.a, alpha.r, _EnableAlphaTexture ); - #endif - - Color *= IN.color; - return Color; - } - - ENDHLSL - } - - Pass - { - - Name "SceneSelectionPass" - Tags { "LightMode"="SceneSelectionPass" } - - Cull Off - - HLSLPROGRAM - - #define ASE_VERSION 19904 - #define ASE_SRP_VERSION -1 - - - #pragma multi_compile_instancing - - #pragma vertex vert - #pragma fragment frag - - #pragma multi_compile _ DEBUG_DISPLAY SKINNED_SPRITE - - #define _SURFACE_TYPE_TRANSPARENT 1 - #define ATTRIBUTES_NEED_NORMAL - #define ATTRIBUTES_NEED_TANGENT - #define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT - #define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT - #define FEATURES_GRAPH_VERTEX - - #define SHADERPASS SHADERPASS_DEPTHONLY - #define SCENESELECTIONPASS 1 - - #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/Shaders/2D/Include/Core2D.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/FoveatedRendering.hlsl" - #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" - #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" - #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" - #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" - - #define ASE_NEEDS_TEXTURE_COORDINATES0 - #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 - - - CBUFFER_START( UnityPerMaterial ) + CBUFFER_START(UnityPerMaterial) float4 _ImageColor; float _cube_width; float _cube_softness; @@ -673,142 +271,1088 @@ Shader "Soullies/hit_point" float _gapsize; float _gap_softness; float _ring_rotation; + float _ring_rotation_angle; float _count; float _Opacity; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif CBUFFER_END - - struct VertexInput - { - float3 positionOS : POSITION; - float3 normal : NORMAL; - float4 tangent : TANGENT; - float4 ase_texcoord : TEXCOORD0; - float4 ase_color : COLOR; - UNITY_SKINNED_VERTEX_INPUTS - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct VertexOutput - { - float4 positionCS : SV_POSITION; - float4 ase_texcoord : TEXCOORD0; - float4 ase_color : COLOR; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - int _ObjectId; - int _PassValue; + - VertexOutput vert(VertexInput v ) + PackedVaryings VertexFunction( Attributes input ) { - VertexOutput o = (VertexOutput)0; + PackedVaryings output = (PackedVaryings)0; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - UNITY_SKINNED_VERTEX_COMPUTE(v); - - v.positionOS = UnityFlipSprite( v.positionOS, unity_SpriteProps.xy ); - - o.ase_texcoord.xy = v.ase_texcoord.xy; - o.ase_color = v.ase_color; + output.ase_color = input.ase_color; + output.ase_texcoord2.xy = input.ase_texcoord.xy; //setting value to unused interpolator channels and avoid initialization warnings - o.ase_texcoord.zw = 0; + output.ase_texcoord2.zw = 0; + #ifdef ASE_ABSOLUTE_VERTEX_POS - float3 defaultVertexValue = v.positionOS; + float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif + float3 vertexValue = defaultVertexValue; + #ifdef ASE_ABSOLUTE_VERTEX_POS - v.positionOS = vertexValue; + input.positionOS.xyz = vertexValue; #else - v.positionOS += vertexValue; + input.positionOS.xyz += vertexValue; #endif - VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS); - float3 positionWS = TransformObjectToWorld(v.positionOS); - o.positionCS = TransformWorldToHClip(positionWS); + input.normalOS = input.normalOS; - return o; + VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); + VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS ); + + 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; + return output; } - half4 frag(VertexOutput IN) : SV_TARGET + #if defined(ASE_TESSELLATION) + struct VertexControl { - float2 break104 = ( IN.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float4 positionOS : INTERNALTESSPOS; + half3 normalOS : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + output.ase_color = input.ase_color; + output.ase_texcoord = input.ase_texcoord; + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS)); + float phongStrength = _TessPhongStrength; + output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz; + #endif + UNITY_TRANSFER_INSTANCE_ID(patch[0], output); + return VertexFunction(output); + } + #else + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + #endif + + half4 frag ( PackedVaryings input + #if defined( ASE_DEPTH_WRITE_ON ) + ,out float outputDepth : ASE_SV_DEPTH + #endif + #ifdef _WRITE_RENDERING_LAYERS + , out uint outRenderingLayers : SV_Target1 + #endif + ) : SV_Target + { + UNITY_SETUP_INSTANCE_ID(input); + UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input); + + #if defined( _SURFACE_TYPE_TRANSPARENT ) + const bool isTransparent = true; + #else + const bool isTransparent = false; + #endif + + #if defined(LOD_FADE_CROSSFADE) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined(MAIN_LIGHT_CALCULATE_SHADOWS) + float4 shadowCoord = TransformWorldToShadowCoord( input.positionWSAndFogFactor.xyz ); + #else + float4 shadowCoord = float4(0, 0, 0, 0); + #endif + + 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 ); + half3 NormalWS = normalize( input.normalWS ); + + float2 break104 = ( input.ase_texcoord2.xy - float2( 0.5,0.5 ) ); float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); - float2 temp_output_34_0_g1 = ( IN.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float2 temp_output_34_0_g1 = ( input.ase_texcoord2.xy - float2( 0.5,0.5 ) ); float2 break39_g1 = temp_output_34_0_g1; float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); float2 break53_g1 = appendResult50_g1; float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); - float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) ) * _count ) )); - float4 break89 = _ImageColor; - float4 appendResult90 = (float4(break89.r , break89.g , break89.b , _Opacity)); + float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) + _ring_rotation_angle ) * _count ) )); - float4 Color = ( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) * IN.ase_color * appendResult90 ); + float3 BakedAlbedo = 0; + float3 BakedEmission = 0; + float3 Color = ( input.ase_color * _ImageColor ).rgb; + float Alpha = ( saturate( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) ) * _Opacity ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #if defined( ASE_DEPTH_WRITE_ON ) + float DeviceDepth = 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 = float4( input.positionCS.xy, ClipPos.zw / ClipPos.w ); + 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 = DeviceDepth; + #endif + + #ifdef _WRITE_RENDERING_LAYERS + outRenderingLayers = EncodeMeshRenderingLayer(); + #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 _ALPHATEST_ON 1 + #pragma multi_compile_instancing + #pragma multi_compile _ LOD_FADE_CROSSFADE + #define ASE_FOG 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION -1 + + + #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 "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + #define ASE_NEEDS_TEXTURE_COORDINATES0 + #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 + + + #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #define ASE_SV_DEPTH SV_DepthLessEqual + #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid + #else + #define ASE_SV_DEPTH SV_Depth + #define ASE_SV_POSITION_QUALIFIERS + #endif + + struct Attributes + { + float4 positionOS : POSITION; + half3 normalOS : NORMAL; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _ImageColor; + float _cube_width; + float _cube_softness; + float _cube_radius; + float _ring_width; + float _ring_softness; + float _ring_radius; + float _gapsize; + float _gap_softness; + float _ring_rotation; + float _ring_rotation_angle; + float _count; + float _Opacity; + #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 ); + + output.ase_texcoord.xy = input.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + output.ase_texcoord.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; + + 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; + float4 ase_texcoord : TEXCOORD0; + + 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.ase_texcoord = input.ase_texcoord; + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = 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 ); + + float2 break104 = ( input.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); + float2 temp_output_34_0_g1 = ( input.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float2 break39_g1 = temp_output_34_0_g1; + float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); + float2 break53_g1 = appendResult50_g1; + float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); + float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) + _ring_rotation_angle ) * _count ) )); + + + float Alpha = ( saturate( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) ) * _Opacity ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #if defined( ASE_DEPTH_WRITE_ON ) + float DeviceDepth = 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 = DeviceDepth; + #endif + + return 0; + } + ENDHLSL + } + + + Pass + { + + Name "DepthOnly" + Tags { "LightMode"="DepthOnly" } + + ZWrite On + ColorMask 0 + AlphaToMask Off + + HLSLPROGRAM + + #define _ALPHATEST_ON 1 + #pragma multi_compile_instancing + #pragma multi_compile _ LOD_FADE_CROSSFADE + #define ASE_FOG 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION -1 + + + #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.universal/ShaderLibrary/Core.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + #define ASE_NEEDS_TEXTURE_COORDINATES0 + #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 + + + #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #define ASE_SV_DEPTH SV_DepthLessEqual + #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid + #else + #define ASE_SV_DEPTH SV_Depth + #define ASE_SV_POSITION_QUALIFIERS + #endif + + struct Attributes + { + float4 positionOS : POSITION; + half3 normalOS : NORMAL; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _ImageColor; + float _cube_width; + float _cube_softness; + float _cube_radius; + float _ring_width; + float _ring_softness; + float _ring_radius; + float _gapsize; + float _gap_softness; + float _ring_rotation; + float _ring_rotation_angle; + float _count; + float _Opacity; + #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); + + output.ase_texcoord.xy = input.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + output.ase_texcoord.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 + + VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); + + output.positionCS = vertexInput.positionCS; + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + half3 normalOS : NORMAL; + float4 ase_texcoord : TEXCOORD0; + + 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.ase_texcoord = input.ase_texcoord; + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = 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 ); + + float2 break104 = ( input.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); + float2 temp_output_34_0_g1 = ( input.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float2 break39_g1 = temp_output_34_0_g1; + float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); + float2 break53_g1 = appendResult50_g1; + float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); + float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) + _ring_rotation_angle ) * _count ) )); + + + float Alpha = ( saturate( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) ) * _Opacity ); + float AlphaClipThreshold = 0.5; + + #if defined( ASE_DEPTH_WRITE_ON ) + float DeviceDepth = 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 = DeviceDepth; + #endif + + return 0; + } + ENDHLSL + } + + + Pass + { + + Name "SceneSelectionPass" + Tags { "LightMode"="SceneSelectionPass" } + + Cull Off + AlphaToMask Off + + HLSLPROGRAM + + #define _ALPHATEST_ON 1 + #define ASE_FOG 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION -1 + + + #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 "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #define ASE_NEEDS_TEXTURE_COORDINATES0 + #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 + + + struct Attributes + { + float4 positionOS : POSITION; + half3 normalOS : NORMAL; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _ImageColor; + float _cube_width; + float _cube_softness; + float _cube_radius; + float _ring_width; + float _ring_softness; + float _ring_radius; + float _gapsize; + float _gap_softness; + float _ring_rotation; + float _ring_rotation_angle; + float _count; + float _Opacity; + #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); + + output.ase_texcoord.xy = input.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + output.ase_texcoord.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 + + VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); + + output.positionCS = vertexInput.positionCS; + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + half3 normalOS : NORMAL; + float4 ase_texcoord : TEXCOORD0; + + 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.ase_texcoord = input.ase_texcoord; + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = 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; + + float2 break104 = ( input.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); + float2 temp_output_34_0_g1 = ( input.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float2 break39_g1 = temp_output_34_0_g1; + float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); + float2 break53_g1 = appendResult50_g1; + float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); + float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) + _ring_rotation_angle ) * _count ) )); + + + surfaceDescription.Alpha = ( saturate( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) ) * _Opacity ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + float alphaClipThreshold = 0.01f; + #if ALPHA_CLIP_THRESHOLD + alphaClipThreshold = surfaceDescription.AlphaClipThreshold; + #endif + clip(surfaceDescription.Alpha - alphaClipThreshold); + #endif half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0); return outColor; } - - ENDHLSL - } + ENDHLSL + } - Pass - { + Pass + { - Name "ScenePickingPass" - Tags { "LightMode"="Picking" } + Name "ScenePickingPass" + Tags { "LightMode"="Picking" } - Cull Off + AlphaToMask Off - HLSLPROGRAM + HLSLPROGRAM + #define _ALPHATEST_ON 1 + #define ASE_FOG 1 + #define _SURFACE_TYPE_TRANSPARENT 1 #define ASE_VERSION 19904 #define ASE_SRP_VERSION -1 - #pragma multi_compile_instancing - #pragma vertex vert #pragma fragment frag - #pragma multi_compile _ DEBUG_DISPLAY SKINNED_SPRITE + #define ATTRIBUTES_NEED_NORMAL + #define ATTRIBUTES_NEED_TANGENT - #define _SURFACE_TYPE_TRANSPARENT 1 - #define ATTRIBUTES_NEED_NORMAL - #define ATTRIBUTES_NEED_TANGENT - #define FEATURES_GRAPH_VERTEX_NORMAL_OUTPUT - #define FEATURES_GRAPH_VERTEX_TANGENT_OUTPUT - #define FEATURES_GRAPH_VERTEX - - #define SHADERPASS SHADERPASS_DEPTHONLY - #define SCENEPICKINGPASS 1 + #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 "Packages/com.unity.render-pipelines.universal/Shaders/2D/Include/Core2D.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/FoveatedRendering.hlsl" #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" - #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/DebugMipmapStreamingMacros.hlsl" + #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" - #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl" #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" - #define ASE_NEEDS_TEXTURE_COORDINATES0 - #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 + #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 - CBUFFER_START( UnityPerMaterial ) + struct Attributes + { + float4 positionOS : POSITION; + half3 normalOS : NORMAL; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) float4 _ImageColor; float _cube_width; float _cube_softness; @@ -819,147 +1363,1124 @@ Shader "Soullies/hit_point" float _gapsize; float _gap_softness; float _ring_rotation; + float _ring_rotation_angle; float _count; float _Opacity; + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif CBUFFER_END - - struct VertexInput - { - float3 positionOS : POSITION; - float3 normal : NORMAL; - float4 tangent : TANGENT; - float4 ase_texcoord : TEXCOORD0; - float4 ase_color : COLOR; - UNITY_SKINNED_VERTEX_INPUTS - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - struct VertexOutput - { - float4 positionCS : SV_POSITION; - float4 ase_texcoord : TEXCOORD0; - float4 ase_color : COLOR; - UNITY_VERTEX_INPUT_INSTANCE_ID - }; - - float4 _SelectionID; + - VertexOutput vert(VertexInput v ) + float4 _SelectionID; + + struct SurfaceDescription { - VertexOutput o = (VertexOutput)0; + float Alpha; + float AlphaClipThreshold; + }; - UNITY_SETUP_INSTANCE_ID(v); - UNITY_TRANSFER_INSTANCE_ID(v, o); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o); - UNITY_SKINNED_VERTEX_COMPUTE(v); + PackedVaryings VertexFunction(Attributes input ) + { + PackedVaryings output; + ZERO_INITIALIZE(PackedVaryings, output); - v.positionOS = UnityFlipSprite( v.positionOS, unity_SpriteProps.xy ); + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); - o.ase_texcoord.xy = v.ase_texcoord.xy; - o.ase_color = v.ase_color; + output.ase_texcoord.xy = input.ase_texcoord.xy; //setting value to unused interpolator channels and avoid initialization warnings - o.ase_texcoord.zw = 0; + output.ase_texcoord.zw = 0; + #ifdef ASE_ABSOLUTE_VERTEX_POS - float3 defaultVertexValue = v.positionOS; + float3 defaultVertexValue = input.positionOS.xyz; #else float3 defaultVertexValue = float3(0, 0, 0); #endif + float3 vertexValue = defaultVertexValue; + #ifdef ASE_ABSOLUTE_VERTEX_POS - v.positionOS = vertexValue; + input.positionOS.xyz = vertexValue; #else - v.positionOS += vertexValue; + input.positionOS.xyz += vertexValue; #endif - VertexPositionInputs vertexInput = GetVertexPositionInputs(v.positionOS); - float3 positionWS = TransformObjectToWorld(v.positionOS); - o.positionCS = TransformWorldToHClip(positionWS); + VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); - return o; + output.positionCS = vertexInput.positionCS; + return output; } - half4 frag(VertexOutput IN ) : SV_TARGET + #if defined(ASE_TESSELLATION) + struct VertexControl { - float2 break104 = ( IN.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float4 positionOS : INTERNALTESSPOS; + half3 normalOS : NORMAL; + float4 ase_texcoord : TEXCOORD0; + + 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.ase_texcoord = input.ase_texcoord; + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = 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; + + float2 break104 = ( input.ase_texcoord.xy - float2( 0.5,0.5 ) ); float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); - float2 temp_output_34_0_g1 = ( IN.ase_texcoord.xy - float2( 0.5,0.5 ) ); + float2 temp_output_34_0_g1 = ( input.ase_texcoord.xy - float2( 0.5,0.5 ) ); float2 break39_g1 = temp_output_34_0_g1; float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); float2 break53_g1 = appendResult50_g1; float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); - float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) ) * _count ) )); - float4 break89 = _ImageColor; - float4 appendResult90 = (float4(break89.r , break89.g , break89.b , _Opacity)); + float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) + _ring_rotation_angle ) * _count ) )); - float4 Color = ( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) * IN.ase_color * appendResult90 ); - half4 outColor = unity_SelectionID; + + surfaceDescription.Alpha = ( saturate( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) ) * _Opacity ); + surfaceDescription.AlphaClipThreshold = 0.5; + + #if _ALPHATEST_ON + float alphaClipThreshold = 0.01f; + #if ALPHA_CLIP_THRESHOLD + alphaClipThreshold = surfaceDescription.AlphaClipThreshold; + #endif + clip(surfaceDescription.Alpha - alphaClipThreshold); + #endif + + half4 outColor = 0; + outColor = unity_SelectionID; + return outColor; } - ENDHLSL - } + ENDHLSL + } + + + Pass + { + + Name "DepthNormals" + Tags { "LightMode"="DepthNormalsOnly" } + + ZTest LEqual + ZWrite On + + HLSLPROGRAM + + #define _ALPHATEST_ON 1 + #pragma multi_compile_instancing + #pragma multi_compile _ LOD_FADE_CROSSFADE + #define ASE_FOG 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION -1 + + + #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 "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.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.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #if defined(LOD_FADE_CROSSFADE) + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl" + #endif + + #define ASE_NEEDS_TEXTURE_COORDINATES0 + #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 + + + #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #define ASE_SV_DEPTH SV_DepthLessEqual + #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid + #else + #define ASE_SV_DEPTH SV_Depth + #define ASE_SV_POSITION_QUALIFIERS + #endif + + struct Attributes + { + float4 positionOS : POSITION; + half3 normalOS : NORMAL; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; + half3 normalWS : TEXCOORD0; + float4 ase_texcoord1 : TEXCOORD1; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _ImageColor; + float _cube_width; + float _cube_softness; + float _cube_radius; + float _ring_width; + float _ring_softness; + float _ring_radius; + float _gapsize; + float _gap_softness; + float _ring_rotation; + float _ring_rotation_angle; + float _count; + float _Opacity; + #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); + + output.ase_texcoord1.xy = input.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + output.ase_texcoord1.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; + + 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; + float4 ase_texcoord : TEXCOORD0; + + 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.ase_texcoord = input.ase_texcoord; + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = 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 uint 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 ); + + float2 break104 = ( input.ase_texcoord1.xy - float2( 0.5,0.5 ) ); + float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); + float2 temp_output_34_0_g1 = ( input.ase_texcoord1.xy - float2( 0.5,0.5 ) ); + float2 break39_g1 = temp_output_34_0_g1; + float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); + float2 break53_g1 = appendResult50_g1; + float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); + float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) + _ring_rotation_angle ) * _count ) )); + + + float Alpha = ( saturate( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) ) * _Opacity ); + float AlphaClipThreshold = 0.5; + + #if defined( ASE_DEPTH_WRITE_ON ) + float DeviceDepth = 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 = DeviceDepth; + #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 + outRenderingLayers = EncodeMeshRenderingLayer(); + #endif + } + ENDHLSL + } + + + Pass + { + + Name "MotionVectors" + Tags { "LightMode"="MotionVectors" } + + ColorMask RG + + HLSLPROGRAM + + #define _ALPHATEST_ON 1 + #pragma multi_compile _ LOD_FADE_CROSSFADE + #define ASE_FOG 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION -1 + + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_MOTION_VECTORS + + #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.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 + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MotionVectorsCommon.hlsl" + + #define ASE_NEEDS_TEXTURE_COORDINATES0 + #define ASE_NEEDS_FRAG_TEXTURE_COORDINATES0 + + + #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45) + #define ASE_SV_DEPTH SV_DepthLessEqual + #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid + #else + #define ASE_SV_DEPTH SV_Depth + #define ASE_SV_POSITION_QUALIFIERS + #endif + + struct Attributes + { + float4 positionOS : POSITION; + float3 positionOld : TEXCOORD4; + #if _ADD_PRECOMPUTED_VELOCITY + float3 alembicMotionVector : TEXCOORD5; + #endif + half3 normalOS : NORMAL; + half4 tangentOS : TANGENT; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + float4 positionCS : SV_POSITION; + float4 positionCSNoJitter : TEXCOORD0; + float4 previousPositionCSNoJitter : TEXCOORD1; + float3 positionWS : TEXCOORD2; + float4 ase_texcoord3 : TEXCOORD3; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _ImageColor; + float _cube_width; + float _cube_softness; + float _cube_radius; + float _ring_width; + float _ring_softness; + float _ring_radius; + float _gapsize; + float _gap_softness; + float _ring_rotation; + float _ring_rotation_angle; + float _count; + float _Opacity; + #ifdef ASE_TRANSMISSION + float _TransmissionShadow; + #endif + #ifdef ASE_TRANSLUCENCY + float _TransStrength; + float _TransNormal; + float _TransScattering; + float _TransDirect; + float _TransAmbient; + float _TransShadow; + #endif + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + #ifdef SCENEPICKINGPASS + float4 _SelectionID; + #endif + + #ifdef SCENESELECTIONPASS + int _ObjectId; + int _PassValue; + #endif + + + + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output = (PackedVaryings)0; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + output.ase_texcoord3.xy = input.ase_texcoord.xy; + + //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 + + VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); + + #if defined(APPLICATION_SPACE_WARP_MOTION) + output.positionCSNoJitter = mul(_NonJitteredViewProjMatrix, mul(UNITY_MATRIX_M, input.positionOS)); + output.positionCS = output.positionCSNoJitter; + #else + output.positionCS = vertexInput.positionCS; + output.positionCSNoJitter = mul(_NonJitteredViewProjMatrix, mul(UNITY_MATRIX_M, input.positionOS)); + #endif + + float4 prevPos = ( unity_MotionVectorsParams.x == 1 ) ? float4( input.positionOld, 1 ) : input.positionOS; + + #if _ADD_PRECOMPUTED_VELOCITY + prevPos = prevPos - float4(input.alembicMotionVector, 0); + #endif + + output.previousPositionCSNoJitter = mul( _PrevViewProjMatrix, mul( UNITY_PREV_MATRIX_M, prevPos ) ); + output.positionWS = vertexInput.positionWS; + return output; + } + + PackedVaryings vert ( Attributes input ) + { + return VertexFunction( input ); + } + + 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 ); + + float3 PositionWS = input.positionWS; + float3 PositionRWS = GetCameraRelativePositionWS( PositionWS ); + float4 ScreenPosNorm = float4( GetNormalizedScreenSpaceUV( input.positionCS ), input.positionCS.zw ); + float4 ClipPos = ComputeClipSpacePosition( ScreenPosNorm.xy, input.positionCS.z ) * input.positionCS.w; + + float2 break104 = ( input.ase_texcoord3.xy - float2( 0.5,0.5 ) ); + float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); + float2 temp_output_34_0_g1 = ( input.ase_texcoord3.xy - float2( 0.5,0.5 ) ); + float2 break39_g1 = temp_output_34_0_g1; + float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); + float2 break53_g1 = appendResult50_g1; + float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); + float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) + _ring_rotation_angle ) * _count ) )); + + + float Alpha = ( saturate( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) ) * _Opacity ); + float AlphaClipThreshold = 0.5; + + #if defined( ASE_DEPTH_WRITE_ON ) + float DeviceDepth = input.positionCS.z; + #endif + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + #if defined( ASE_CHANGES_WORLD_POS ) + float3 positionOS = mul( GetWorldToObjectMatrix(), float4( PositionWS, 1.0 ) ).xyz; + float3 previousPositionWS = mul( GetPrevObjectToWorldMatrix(), float4( positionOS, 1.0 ) ).xyz; + input.positionCSNoJitter = mul( _NonJitteredViewProjMatrix, float4( PositionWS, 1.0 ) ); + input.previousPositionCSNoJitter = mul( _PrevViewProjMatrix, float4( previousPositionWS, 1.0 ) ); + #endif + + #if defined( LOD_FADE_CROSSFADE ) + LODFadeCrossFade( input.positionCS ); + #endif + + #if defined( ASE_DEPTH_WRITE_ON ) + outputDepth = DeviceDepth; + #endif + + #if defined(APPLICATION_SPACE_WARP_MOTION) + return float4( CalcAswNdcMotionVectorFromCsPositions( input.positionCSNoJitter, input.previousPositionCSNoJitter ), 1 ); + #else + return float4( CalcNdcMotionVectorFromCsPositions( input.positionCSNoJitter, input.previousPositionCSNoJitter ), 0, 0 ); + #endif + } + ENDHLSL + } + + + Pass + { + + Name "GBuffer" + Tags { "LightMode"="UniversalGBuffer" } + + Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha + ZWrite Off + ZTest LEqual + Offset 0 , 0 + ColorMask RGBA + + + + HLSLPROGRAM + + + #define _ALPHATEST_ON 1 + #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION + #define ASE_FOG 1 + #define _SURFACE_TYPE_TRANSPARENT 1 + #define ASE_VERSION 19904 + #define ASE_SRP_VERSION -1 + + + + #pragma multi_compile _ DOTS_INSTANCING_ON + + + #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 multi_compile_fragment _ _WRITE_RENDERING_LAYERS + + + #pragma vertex vert + #pragma fragment frag + + #define SHADERPASS SHADERPASS_GBUFFER + + + + + + #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 "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl" + + + + #if ASE_SRP_VERSION >=140009 + #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl" + #endif + + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl" + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl" + #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl" + + #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 + + + #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; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct PackedVaryings + { + ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION; + float3 positionWS : TEXCOORD0; + half3 normalWS : TEXCOORD1; + float4 ase_color : COLOR; + float4 ase_texcoord2 : TEXCOORD2; + UNITY_VERTEX_INPUT_INSTANCE_ID + UNITY_VERTEX_OUTPUT_STEREO + }; + + CBUFFER_START(UnityPerMaterial) + float4 _ImageColor; + float _cube_width; + float _cube_softness; + float _cube_radius; + float _ring_width; + float _ring_softness; + float _ring_radius; + float _gapsize; + float _gap_softness; + float _ring_rotation; + float _ring_rotation_angle; + float _count; + float _Opacity; + #ifdef ASE_TRANSMISSION + float _TransmissionShadow; + #endif + #ifdef ASE_TRANSLUCENCY + float _TransStrength; + float _TransNormal; + float _TransScattering; + float _TransDirect; + float _TransAmbient; + float _TransShadow; + #endif + #ifdef ASE_TESSELLATION + float _TessPhongStrength; + float _TessValue; + float _TessMin; + float _TessMax; + float _TessEdgeLength; + float _TessMaxDisp; + #endif + CBUFFER_END + + #ifdef SCENEPICKINGPASS + float4 _SelectionID; + #endif + + #ifdef SCENESELECTIONPASS + int _ObjectId; + int _PassValue; + #endif + + + + #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/GBufferOutput.hlsl" + + + PackedVaryings VertexFunction( Attributes input ) + { + PackedVaryings output = (PackedVaryings)0; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); + + output.ase_color = input.ase_color; + output.ase_texcoord2.xy = input.ase_texcoord.xy; + + //setting value to unused interpolator channels and avoid initialization warnings + output.ase_texcoord2.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 + + VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz ); + VertexNormalInputs normalInput = GetVertexNormalInputs( input.normalOS ); + + output.positionCS = vertexInput.positionCS; + output.positionWS = vertexInput.positionWS; + output.normalWS = normalInput.normalWS; + return output; + } + + #if defined(ASE_TESSELLATION) + struct VertexControl + { + float4 positionOS : INTERNALTESSPOS; + half3 normalOS : NORMAL; + float4 ase_color : COLOR; + float4 ase_texcoord : TEXCOORD0; + + UNITY_VERTEX_INPUT_INSTANCE_ID + }; + + struct TessellationFactors + { + float edge[3] : SV_TessFactor; + float inside : SV_InsideTessFactor; + }; + + VertexControl vert ( Attributes input ) + { + VertexControl output; + UNITY_SETUP_INSTANCE_ID(input); + UNITY_TRANSFER_INSTANCE_ID(input, output); + output.positionOS = input.positionOS; + output.normalOS = input.normalOS; + output.ase_color = input.ase_color; + output.ase_texcoord = input.ase_texcoord; + return output; + } + + TessellationFactors TessellationFunction (InputPatch input) + { + TessellationFactors output; + float4 tf = 1; + float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax; + float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp; + #if defined(ASE_FIXED_TESSELLATION) + tf = FixedTess( tessValue ); + #elif defined(ASE_DISTANCE_TESSELLATION) + tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos ); + #elif defined(ASE_LENGTH_TESSELLATION) + tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams ); + #elif defined(ASE_LENGTH_CULL_TESSELLATION) + tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes ); + #endif + output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w; + return output; + } + + [domain("tri")] + [partitioning("fractional_odd")] + [outputtopology("triangle_cw")] + [patchconstantfunc("TessellationFunction")] + [outputcontrolpoints(3)] + VertexControl HullFunction(InputPatch patch, uint id : SV_OutputControlPointID) + { + return patch[id]; + } + + [domain("tri")] + PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch patch, float3 bary : SV_DomainLocation) + { + Attributes output = (Attributes) 0; + output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z; + output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z; + output.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z; + output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z; + #if defined(ASE_PHONG_TESSELLATION) + float3 pp[3]; + for (int i = 0; i < 3; ++i) + pp[i] = 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 + + 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 ); + half3 NormalWS = normalize( input.normalWS ); + + float2 break104 = ( input.ase_texcoord2.xy - float2( 0.5,0.5 ) ); + float smoothstepResult130 = smoothstep( _cube_width , ( _cube_width + _cube_softness ) , abs( ( ( abs( break104.x ) + abs( break104.y ) ) - _cube_radius ) )); + float2 temp_output_34_0_g1 = ( input.ase_texcoord2.xy - float2( 0.5,0.5 ) ); + float2 break39_g1 = temp_output_34_0_g1; + float2 appendResult50_g1 = (float2(( 1.0 * ( length( temp_output_34_0_g1 ) * 2.0 ) ) , ( ( atan2( break39_g1.x , break39_g1.y ) * ( 1.0 / TWO_PI ) ) * 1.0 ))); + float2 break53_g1 = appendResult50_g1; + float smoothstepResult106 = smoothstep( _ring_width , ( _ring_width + _ring_softness ) , abs( ( break53_g1.x - _ring_radius ) )); + float smoothstepResult120 = smoothstep( _gapsize , ( _gapsize + _gap_softness ) , frac( ( ( break53_g1.y + ( _TimeParameters.x * ( _ring_rotation / 10.0 ) ) + _ring_rotation_angle ) * _count ) )); + + + float3 Color = ( input.ase_color * _ImageColor ).rgb; + float Alpha = ( saturate( ( ( 1.0 - smoothstepResult130 ) + saturate( ( ( 1.0 - smoothstepResult106 ) * smoothstepResult120 ) ) ) ) * _Opacity ); + float AlphaClipThreshold = 0.5; + float AlphaClipThresholdShadow = 0.5; + + #if defined( ASE_DEPTH_WRITE_ON ) + float DeviceDepth = input.positionCS.z; + #endif + + #ifdef _ALPHATEST_ON + clip(Alpha - AlphaClipThreshold); + #endif + + InputData inputData = (InputData)0; + inputData.positionWS = PositionWS; + inputData.positionCS = float4( input.positionCS.xy, ClipPos.zw / ClipPos.w ); + 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 = DeviceDepth; + #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 "AmplifyShaderEditor.MaterialInspector" + + CustomEditor "UnityEditor.ShaderGraphUnlitGUI" FallBack "Hidden/Shader Graph/FallbackError" - Fallback "Hidden/InternalErrorShader" + Fallback Off } /*ASEBEGIN Version=19904 Node;AmplifyShaderEditor.TexCoordVertexDataNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;52;-3328,464;Inherit;True;0;2;0;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 Node;AmplifyShaderEditor.Vector2Node, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;50;-3328,688;Inherit;False;Constant;_Vector2;Vector 0;0;0;Create;True;0;0;0;False;0;False;0.5,0.5;0,0;0;3;FLOAT2;0;FLOAT;1;FLOAT;2 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;135;-3744,1136;Inherit;False;Property;_ring_rotation;ring_rotation;11;0;Create;True;0;0;0;False;0;False;0;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;135;-3824,1056;Inherit;False;Property;_ring_rotation;ring_rotation;11;0;Create;True;0;0;0;False;0;False;0;-1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;51;-3088,576;Inherit;True;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0 -Node;AmplifyShaderEditor.SimpleTimeNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;134;-3728,944;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 -Node;AmplifyShaderEditor.SimpleDivideOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;138;-3424,1152;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;10;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleTimeNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;134;-3808,864;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleDivideOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;138;-3568,1056;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;10;False;1;FLOAT;0 Node;AmplifyShaderEditor.BreakToComponentsNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;104;-2768,608;Inherit;True;FLOAT2;1;0;FLOAT2;0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15 Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;107;-2944,1200;Inherit;False;Property;_ring_radius;ring_radius;5;1;[Header];Create;True;1;ring;0;0;False;0;False;0.5802088;0.5;0;1;0;1;FLOAT;0 -Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;136;-3248,992;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 -Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;105;-2864,896;Inherit;True;Polar Coordinates;-1;;1;7dab8e02884cf104ebefaa2e788e4162;0;4;1;FLOAT2;0,0;False;2;FLOAT2;0.5,0.5;False;3;FLOAT;1;False;4;FLOAT;1;False;3;FLOAT2;0;FLOAT;55;FLOAT;56 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;136;-3328,912;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.FunctionNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;105;-2880,896;Inherit;True;Polar Coordinates;-1;;1;7dab8e02884cf104ebefaa2e788e4162;0;4;1;FLOAT2;0,0;False;2;FLOAT2;0.5,0.5;False;3;FLOAT;1;False;4;FLOAT;1;False;3;FLOAT2;0;FLOAT;55;FLOAT;56 +Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;157;-3296,1328;Inherit;False;Property;_ring_rotation_angle;ring_rotation_angle;12;0;Create;True;0;0;0;False;0;False;0;-1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;110;-2480,928;Inherit;True;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;114;-2784,1392;Inherit;False;Property;_count;count;10;0;Create;True;0;0;0;False;0;False;8;16;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.AbsOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;60;-2464,608;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.AbsOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;67;-2464,704;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;112;-2480,1264;Inherit;False;Property;_ring_softness;ring_softness;7;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 -Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;137;-2608,1296;Inherit;True;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;114;-2832,1472;Inherit;False;Property;_count;count;10;0;Create;True;0;0;0;False;0;False;8;8;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;137;-2624,1344;Inherit;True;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;111;-2112,1200;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;61;-2272,576;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.AbsOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;108;-2240,928;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;133;-2048,672;Inherit;False;Property;_cube_radius;cube_radius;2;1;[Header];Create;True;1;cube;0;0;False;0;False;0.05854658;0.033;0;0.5;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;117;-2400,1376;Inherit;True;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;116;-2432,1712;Inherit;False;Property;_gap_softness;gap_softness;9;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;109;-2464,1168;Inherit;False;Property;_ring_width;ring_width;6;0;Create;True;0;0;0;False;0;False;0.05130975;0.01;0;0.5;0;1;FLOAT;0 -Node;AmplifyShaderEditor.AbsOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;108;-2240,928;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;133;-2048,672;Inherit;False;Property;_cube_radius;cube_radius;2;1;[Header];Create;True;1;cube;0;0;False;0;False;0.05854658;0.05;0;0.5;0;1;FLOAT;0 -Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;117;-2400,1376;Inherit;True;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;121;-2080,1632;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleSubtractOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;126;-1872,400;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SmoothstepOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;106;-1968,960;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;131;-1936,848;Inherit;False;Property;_cube_softness;cube_softness;4;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;115;-2448,1616;Inherit;False;Property;_gapsize;gap size;8;0;Create;True;0;0;0;False;0;False;0.8467217;0.75;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.FractNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;119;-2160,1424;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;115;-2448,1616;Inherit;False;Property;_gapsize;gap size;8;0;Create;True;0;0;0;False;0;False;0.8467217;0.5;0;1;0;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;113;-1696,976;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.AbsOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;127;-1632,400;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;128;-1456,752;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SmoothstepOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;120;-1840,1344;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;132;-1760,656;Inherit;False;Property;_cube_width;cube_width;3;0;Create;True;0;0;0;False;0;False;0.01032564;0.01;0;0.5;0;1;FLOAT;0 -Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;86;-976,1376;Inherit;False;Property;_ImageColor;ImageColor;0;1;[HDR];Create;True;0;0;0;False;0;False;1,1,1,0;1,1,1,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5 +Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;132;-1760,656;Inherit;False;Property;_cube_width;cube_width;3;0;Create;True;0;0;0;False;0;False;0.01032564;0.05;0;0.5;0;1;FLOAT;0 Node;AmplifyShaderEditor.SmoothstepOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;130;-1360,432;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;122;-1408,1136;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 -Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;124;-1104,1168;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 -Node;AmplifyShaderEditor.BreakToComponentsNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;89;-688,1344;Inherit;False;COLOR;1;0;COLOR;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15 -Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;88;-896,1584;Inherit;False;Property;_Opacity;Opacity;1;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 Node;AmplifyShaderEditor.OneMinusNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;129;-1088,448;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 -Node;AmplifyShaderEditor.DynamicAppendNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;90;-544,1344;Inherit;False;FLOAT4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT4;0 -Node;AmplifyShaderEditor.VertexColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;81;-880,1216;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;124;-1104,1168;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0 Node;AmplifyShaderEditor.SimpleAddOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;125;-848,864;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 -Node;AmplifyShaderEditor.SimpleMultiplyOpNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;82;-384,912;Inherit;True;3;3;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;2;FLOAT4;0,0,0,0;False;1;COLOR;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;94;480,640;Float;False;False;-1;2;AmplifyShaderEditor.MaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;Sprite Normal;0;1;Sprite Normal;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;True;2;5;False;;10;False;;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=NormalsRendering;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;95;480,640;Float;False;False;-1;2;AmplifyShaderEditor.MaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;Sprite Forward;0;2;Sprite Forward;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;True;2;5;False;;10;False;;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForward;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;96;480,640;Float;False;False;-1;2;AmplifyShaderEditor.MaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;SceneSelectionPass;0;3;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;97;480,640;Float;False;False;-1;2;AmplifyShaderEditor.MaterialInspector;0;1;New Amplify Shader;199187dac283dbe4a8cb1ea611d70c58;True;ScenePickingPass;0;4;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;0;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0 -Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;93;48,880;Float;False;True;-1;2;AmplifyShaderEditor.MaterialInspector;0;16;Soullies/hit_point;199187dac283dbe4a8cb1ea611d70c58;True;Sprite Lit;0;0;Sprite Lit;6;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;5;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Lit;ShaderGraphShader=true;True;2;True;12;all;0;False;True;2;5;False;;10;False;;3;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;Hidden/InternalErrorShader;0;0;Standard;3;Vertex Position;1;0;Debug Display;0;0;External Alpha;0;0;0;5;True;True;True;True;True;False;;False;0 +Node;AmplifyShaderEditor.VertexColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;81;-880,1168;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4 +Node;AmplifyShaderEditor.RangedFloatNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;88;-592,1424;Inherit;False;Property;_Opacity;Opacity;1;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0 +Node;AmplifyShaderEditor.SaturateNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;155;-528,1136;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.ColorNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;86;-976,1376;Inherit;False;Property;_ImageColor;ImageColor;0;1;[HDR];Create;True;0;0;0;False;0;False;1,1,1,1;2,2,2,1;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;82;-384,896;Inherit;True;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;153;-240,1200;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;140;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;142;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=ShadowCaster;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;143;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;True;False;False;False;False;0;False;;False;False;False;False;False;False;False;False;False;True;1;False;;False;False;True;1;LightMode=DepthOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;144;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;145;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;True;1;1;False;;0;False;;0;1;False;;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=Universal2D;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;146;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;2;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;147;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;148;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;149;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;;True;3;False;;False;True;1;LightMode=DepthNormalsOnly;False;True;9;d3d11;metal;vulkan;xboxone;xboxseries;playstation;ps4;ps5;switch;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;150;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;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;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;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;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;151;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;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;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;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;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;152;48,880;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;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;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalGBuffer;False;False;0;;0;0;Standard;0;False;0 +Node;AmplifyShaderEditor.TemplateMultiPassMasterNode, AmplifyShaderEditor, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null;141;128,896;Float;False;True;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;Soullies/hit_point;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;9;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Transparent=RenderType;Queue=Transparent=Queue=0;UniversalMaterialType=Unlit;True;5;True;12;all;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;30;Surface;1;639170540006787254; Keep Alpha;0;0; Blend;0;0;Two Sided;1;0;Alpha Clipping;1;0; Use Shadow Threshold;0;0;Forward Only;0;0;Cast Shadows;1;0;Receive Shadows;1;0;Receive SSAO;1;0;Motion Vectors;1;0; Add Precomputed Velocity;0;0; XR Motion Vectors;0;0;GPU Instancing;1;0;LOD CrossFade;1;0;Built-in Fog;1;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Write Depth;0;0; Early Z;0;0;Vertex Position;1;0;0;13;False;True;True;True;False;False;True;True;True;False;True;False;True;False;;False;0 WireConnection;51;0;52;0 WireConnection;51;1;50;0 WireConnection;138;0;135;0 @@ -972,6 +2493,7 @@ WireConnection;60;0;104;0 WireConnection;67;0;104;1 WireConnection;137;0;105;56 WireConnection;137;1;136;0 +WireConnection;137;2;157;0 WireConnection;111;0;109;0 WireConnection;111;1;112;0 WireConnection;61;0;60;0 @@ -999,18 +2521,16 @@ WireConnection;130;1;132;0 WireConnection;130;2;128;0 WireConnection;122;0;113;0 WireConnection;122;1;120;0 -WireConnection;124;0;122;0 -WireConnection;89;0;86;0 WireConnection;129;0;130;0 -WireConnection;90;0;89;0 -WireConnection;90;1;89;1 -WireConnection;90;2;89;2 -WireConnection;90;3;88;0 +WireConnection;124;0;122;0 WireConnection;125;0;129;0 WireConnection;125;1;124;0 -WireConnection;82;0;125;0 -WireConnection;82;1;81;0 -WireConnection;82;2;90;0 -WireConnection;93;1;82;0 +WireConnection;155;0;125;0 +WireConnection;82;0;81;0 +WireConnection;82;1;86;0 +WireConnection;153;0;155;0 +WireConnection;153;1;88;0 +WireConnection;141;2;82;0 +WireConnection;141;3;153;0 ASEEND*/ -//CHKSM=699DC0E0B724C3A08B90C09E42F1CD1C15033B93 \ No newline at end of file +//CHKSM=9C4243C0C8B4CC83FEDBA9606402FBC2E687345F \ No newline at end of file