Alpha3.shader 60 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604
  1. // Made with Amplify Shader Editor v1.9.8.1
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "LT/Alpha3"
  4. {
  5. Properties
  6. {
  7. [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
  8. [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
  9. _fx_glow01("fx_glow01", 2D) = "white" {}
  10. _Float0("Float 0", Float) = 1
  11. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  12. //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
  13. //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
  14. //_TessMin( "Tess Min Distance", Float ) = 10
  15. //_TessMax( "Tess Max Distance", Float ) = 25
  16. //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
  17. //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
  18. [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0
  19. [HideInInspector] _QueueControl("_QueueControl", Float) = -1
  20. [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  21. [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  22. [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  23. [HideInInspector][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 1.0
  24. }
  25. SubShader
  26. {
  27. LOD 0
  28. Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" }
  29. Cull Off
  30. AlphaToMask Off
  31. HLSLINCLUDE
  32. #pragma target 4.5
  33. #pragma prefer_hlslcc gles
  34. #pragma exclude_renderers xboxone xboxseries playstation ps4 ps5 switch // ensure rendering platforms toggle list is visible
  35. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
  36. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
  37. #ifndef ASE_TESS_FUNCS
  38. #define ASE_TESS_FUNCS
  39. float4 FixedTess( float tessValue )
  40. {
  41. return tessValue;
  42. }
  43. float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
  44. {
  45. float3 wpos = mul(o2w,vertex).xyz;
  46. float dist = distance (wpos, cameraPos);
  47. float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
  48. return f;
  49. }
  50. float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
  51. {
  52. float4 tess;
  53. tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
  54. tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
  55. tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
  56. tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
  57. return tess;
  58. }
  59. float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
  60. {
  61. float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
  62. float len = distance(wpos0, wpos1);
  63. float f = max(len * scParams.y / (edgeLen * dist), 1.0);
  64. return f;
  65. }
  66. float DistanceFromPlane (float3 pos, float4 plane)
  67. {
  68. float d = dot (float4(pos,1.0f), plane);
  69. return d;
  70. }
  71. bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
  72. {
  73. float4 planeTest;
  74. planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  75. (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  76. (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
  77. planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  78. (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  79. (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
  80. planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  81. (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  82. (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
  83. planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  84. (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  85. (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
  86. return !all (planeTest);
  87. }
  88. float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
  89. {
  90. float3 f;
  91. f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
  92. f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
  93. f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
  94. return CalcTriEdgeTessFactors (f);
  95. }
  96. float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
  97. {
  98. float3 pos0 = mul(o2w,v0).xyz;
  99. float3 pos1 = mul(o2w,v1).xyz;
  100. float3 pos2 = mul(o2w,v2).xyz;
  101. float4 tess;
  102. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  103. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  104. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  105. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  106. return tess;
  107. }
  108. float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
  109. {
  110. float3 pos0 = mul(o2w,v0).xyz;
  111. float3 pos1 = mul(o2w,v1).xyz;
  112. float3 pos2 = mul(o2w,v2).xyz;
  113. float4 tess;
  114. if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
  115. {
  116. tess = 0.0f;
  117. }
  118. else
  119. {
  120. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  121. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  122. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  123. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  124. }
  125. return tess;
  126. }
  127. #endif //ASE_TESS_FUNCS
  128. ENDHLSL
  129. Pass
  130. {
  131. Name "Forward"
  132. Tags { "LightMode"="UniversalForwardOnly" }
  133. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  134. ZWrite Off
  135. ZTest LEqual
  136. Offset 0 , 0
  137. ColorMask RGBA
  138. HLSLPROGRAM
  139. #define _SURFACE_TYPE_TRANSPARENT 1
  140. #pragma multi_compile_instancing
  141. #pragma instancing_options renderinglayer
  142. #define ASE_VERSION 19801
  143. #define ASE_SRP_VERSION 140011
  144. #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
  145. #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  146. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  147. #pragma multi_compile _ LIGHTMAP_ON
  148. #pragma multi_compile _ DYNAMICLIGHTMAP_ON
  149. #pragma multi_compile_fragment _ DEBUG_DISPLAY
  150. #pragma vertex vert
  151. #pragma fragment frag
  152. #define SHADERPASS SHADERPASS_UNLIT
  153. #if ASE_SRP_VERSION >=140007
  154. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  155. #endif
  156. #if ASE_SRP_VERSION >=140007
  157. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  158. #endif
  159. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  160. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  161. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  162. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  163. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  164. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  165. #if ASE_SRP_VERSION >=140010
  166. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  167. #endif
  168. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  169. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  170. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  171. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  172. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  173. #if defined(LOD_FADE_CROSSFADE)
  174. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  175. #endif
  176. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
  177. #define ASE_SV_DEPTH SV_DepthLessEqual
  178. #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
  179. #else
  180. #define ASE_SV_DEPTH SV_Depth
  181. #define ASE_SV_POSITION_QUALIFIERS
  182. #endif
  183. struct Attributes
  184. {
  185. float4 positionOS : POSITION;
  186. float3 normalOS : NORMAL;
  187. float4 texcoord : TEXCOORD0;
  188. float4 texcoord1 : TEXCOORD1;
  189. float4 texcoord2 : TEXCOORD2;
  190. UNITY_VERTEX_INPUT_INSTANCE_ID
  191. };
  192. struct PackedVaryings
  193. {
  194. ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
  195. float4 clipPosV : TEXCOORD0;
  196. float3 positionWS : TEXCOORD1;
  197. #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX)
  198. half4 fogFactorAndVertexLight : TEXCOORD2;
  199. #endif
  200. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  201. float4 shadowCoord : TEXCOORD3;
  202. #endif
  203. #if defined(LIGHTMAP_ON)
  204. float4 lightmapUVOrVertexSH : TEXCOORD4;
  205. #endif
  206. #if defined(DYNAMICLIGHTMAP_ON)
  207. float2 dynamicLightmapUV : TEXCOORD5;
  208. #endif
  209. float4 ase_texcoord6 : TEXCOORD6;
  210. UNITY_VERTEX_INPUT_INSTANCE_ID
  211. UNITY_VERTEX_OUTPUT_STEREO
  212. };
  213. CBUFFER_START(UnityPerMaterial)
  214. float4 _fx_glow01_ST;
  215. float _Float0;
  216. #ifdef ASE_TESSELLATION
  217. float _TessPhongStrength;
  218. float _TessValue;
  219. float _TessMin;
  220. float _TessMax;
  221. float _TessEdgeLength;
  222. float _TessMaxDisp;
  223. #endif
  224. CBUFFER_END
  225. sampler2D _fx_glow01;
  226. PackedVaryings VertexFunction( Attributes input )
  227. {
  228. PackedVaryings output = (PackedVaryings)0;
  229. UNITY_SETUP_INSTANCE_ID(input);
  230. UNITY_TRANSFER_INSTANCE_ID(input, output);
  231. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  232. output.ase_texcoord6.xy = input.texcoord.xy;
  233. //setting value to unused interpolator channels and avoid initialization warnings
  234. output.ase_texcoord6.zw = 0;
  235. #ifdef ASE_ABSOLUTE_VERTEX_POS
  236. float3 defaultVertexValue = input.positionOS.xyz;
  237. #else
  238. float3 defaultVertexValue = float3(0, 0, 0);
  239. #endif
  240. float3 vertexValue = defaultVertexValue;
  241. #ifdef ASE_ABSOLUTE_VERTEX_POS
  242. input.positionOS.xyz = vertexValue;
  243. #else
  244. input.positionOS.xyz += vertexValue;
  245. #endif
  246. input.normalOS = input.normalOS;
  247. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  248. #if defined(LIGHTMAP_ON)
  249. OUTPUT_LIGHTMAP_UV(input.texcoord1, unity_LightmapST, output.lightmapUVOrVertexSH.xy);
  250. #endif
  251. #if defined(DYNAMICLIGHTMAP_ON)
  252. output.dynamicLightmapUV.xy = input.texcoord2.xy * unity_DynamicLightmapST.xy + unity_DynamicLightmapST.zw;
  253. #endif
  254. #if defined(ASE_FOG) || defined(_ADDITIONAL_LIGHTS_VERTEX)
  255. output.fogFactorAndVertexLight = 0;
  256. #if defined(ASE_FOG) && !defined(_FOG_FRAGMENT)
  257. output.fogFactorAndVertexLight.x = ComputeFogFactor(vertexInput.positionCS.z);
  258. #endif
  259. #ifdef _ADDITIONAL_LIGHTS_VERTEX
  260. half3 vertexLight = VertexLighting( vertexInput.positionWS, normalInput.normalWS );
  261. output.fogFactorAndVertexLight.yzw = vertexLight;
  262. #endif
  263. #endif
  264. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  265. output.shadowCoord = GetShadowCoord( vertexInput );
  266. #endif
  267. output.positionCS = vertexInput.positionCS;
  268. output.clipPosV = vertexInput.positionCS;
  269. output.positionWS = vertexInput.positionWS;
  270. return output;
  271. }
  272. #if defined(ASE_TESSELLATION)
  273. struct VertexControl
  274. {
  275. float4 positionOS : INTERNALTESSPOS;
  276. float3 normalOS : NORMAL;
  277. UNITY_VERTEX_INPUT_INSTANCE_ID
  278. };
  279. struct TessellationFactors
  280. {
  281. float edge[3] : SV_TessFactor;
  282. float inside : SV_InsideTessFactor;
  283. };
  284. VertexControl vert ( Attributes input )
  285. {
  286. VertexControl output;
  287. UNITY_SETUP_INSTANCE_ID(input);
  288. UNITY_TRANSFER_INSTANCE_ID(input, output);
  289. output.positionOS = input.positionOS;
  290. output.normalOS = input.normalOS;
  291. return output;
  292. }
  293. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  294. {
  295. TessellationFactors output;
  296. float4 tf = 1;
  297. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  298. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  299. #if defined(ASE_FIXED_TESSELLATION)
  300. tf = FixedTess( tessValue );
  301. #elif defined(ASE_DISTANCE_TESSELLATION)
  302. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  303. #elif defined(ASE_LENGTH_TESSELLATION)
  304. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  305. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  306. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  307. #endif
  308. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  309. return output;
  310. }
  311. [domain("tri")]
  312. [partitioning("fractional_odd")]
  313. [outputtopology("triangle_cw")]
  314. [patchconstantfunc("TessellationFunction")]
  315. [outputcontrolpoints(3)]
  316. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  317. {
  318. return patch[id];
  319. }
  320. [domain("tri")]
  321. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  322. {
  323. Attributes output = (Attributes) 0;
  324. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  325. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  326. #if defined(ASE_PHONG_TESSELLATION)
  327. float3 pp[3];
  328. for (int i = 0; i < 3; ++i)
  329. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  330. float phongStrength = _TessPhongStrength;
  331. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  332. #endif
  333. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  334. return VertexFunction(output);
  335. }
  336. #else
  337. PackedVaryings vert ( Attributes input )
  338. {
  339. return VertexFunction( input );
  340. }
  341. #endif
  342. half4 frag ( PackedVaryings input
  343. #ifdef ASE_DEPTH_WRITE_ON
  344. ,out float outputDepth : ASE_SV_DEPTH
  345. #endif
  346. #ifdef _WRITE_RENDERING_LAYERS
  347. , out float4 outRenderingLayers : SV_Target1
  348. #endif
  349. ) : SV_Target
  350. {
  351. UNITY_SETUP_INSTANCE_ID(input);
  352. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(input);
  353. #if defined(LOD_FADE_CROSSFADE)
  354. LODFadeCrossFade( input.positionCS );
  355. #endif
  356. float3 WorldPosition = input.positionWS;
  357. float3 WorldViewDirection = GetWorldSpaceNormalizeViewDir( WorldPosition );
  358. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  359. float4 ClipPos = input.clipPosV;
  360. float4 ScreenPos = ComputeScreenPos( input.clipPosV );
  361. float2 NormalizedScreenSpaceUV = GetNormalizedScreenSpaceUV(input.positionCS);
  362. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  363. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  364. ShadowCoords = input.shadowCoord;
  365. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  366. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  367. #endif
  368. #endif
  369. float2 uv_fx_glow01 = input.ase_texcoord6.xy * _fx_glow01_ST.xy + _fx_glow01_ST.zw;
  370. float4 tex2DNode10 = tex2D( _fx_glow01, uv_fx_glow01 );
  371. float3 BakedAlbedo = 0;
  372. float3 BakedEmission = 0;
  373. float3 Color = tex2DNode10.rgb;
  374. float Alpha = ( tex2DNode10.a * _Float0 );
  375. float AlphaClipThreshold = 0.5;
  376. float AlphaClipThresholdShadow = 0.5;
  377. #ifdef ASE_DEPTH_WRITE_ON
  378. float DepthValue = input.positionCS.z;
  379. #endif
  380. #ifdef _ALPHATEST_ON
  381. clip(Alpha - AlphaClipThreshold);
  382. #endif
  383. InputData inputData = (InputData)0;
  384. inputData.positionWS = WorldPosition;
  385. inputData.viewDirectionWS = WorldViewDirection;
  386. #ifdef ASE_FOG
  387. inputData.fogCoord = InitializeInputDataFog(float4(inputData.positionWS, 1.0), input.fogFactorAndVertexLight.x);
  388. #endif
  389. #ifdef _ADDITIONAL_LIGHTS_VERTEX
  390. inputData.vertexLighting = input.fogFactorAndVertexLight.yzw;
  391. #endif
  392. inputData.normalizedScreenSpaceUV = NormalizedScreenSpaceUV;
  393. #if defined(_DBUFFER)
  394. ApplyDecalToBaseColor(input.positionCS, Color);
  395. #endif
  396. #ifdef ASE_FOG
  397. #ifdef TERRAIN_SPLAT_ADDPASS
  398. Color.rgb = MixFogColor(Color.rgb, half3(0,0,0), inputData.fogCoord);
  399. #else
  400. Color.rgb = MixFog(Color.rgb, inputData.fogCoord);
  401. #endif
  402. #endif
  403. #ifdef ASE_DEPTH_WRITE_ON
  404. outputDepth = DepthValue;
  405. #endif
  406. #ifdef _WRITE_RENDERING_LAYERS
  407. uint renderingLayers = GetMeshRenderingLayer();
  408. outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 );
  409. #endif
  410. return half4( Color, Alpha );
  411. }
  412. ENDHLSL
  413. }
  414. Pass
  415. {
  416. Name "DepthOnly"
  417. Tags { "LightMode"="DepthOnly" }
  418. ZWrite On
  419. ColorMask R
  420. AlphaToMask Off
  421. HLSLPROGRAM
  422. #define _SURFACE_TYPE_TRANSPARENT 1
  423. #pragma multi_compile_instancing
  424. #define ASE_VERSION 19801
  425. #define ASE_SRP_VERSION 140011
  426. #pragma vertex vert
  427. #pragma fragment frag
  428. #if ASE_SRP_VERSION >=140007
  429. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  430. #endif
  431. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  432. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  433. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  434. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  435. #if defined(LOD_FADE_CROSSFADE)
  436. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  437. #endif
  438. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
  439. #define ASE_SV_DEPTH SV_DepthLessEqual
  440. #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
  441. #else
  442. #define ASE_SV_DEPTH SV_Depth
  443. #define ASE_SV_POSITION_QUALIFIERS
  444. #endif
  445. struct Attributes
  446. {
  447. float4 positionOS : POSITION;
  448. float3 normalOS : NORMAL;
  449. float4 ase_texcoord : TEXCOORD0;
  450. UNITY_VERTEX_INPUT_INSTANCE_ID
  451. };
  452. struct PackedVaryings
  453. {
  454. ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
  455. float4 clipPosV : TEXCOORD0;
  456. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  457. float3 positionWS : TEXCOORD1;
  458. #endif
  459. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  460. float4 shadowCoord : TEXCOORD2;
  461. #endif
  462. float4 ase_texcoord3 : TEXCOORD3;
  463. UNITY_VERTEX_INPUT_INSTANCE_ID
  464. UNITY_VERTEX_OUTPUT_STEREO
  465. };
  466. CBUFFER_START(UnityPerMaterial)
  467. float4 _fx_glow01_ST;
  468. float _Float0;
  469. #ifdef ASE_TESSELLATION
  470. float _TessPhongStrength;
  471. float _TessValue;
  472. float _TessMin;
  473. float _TessMax;
  474. float _TessEdgeLength;
  475. float _TessMaxDisp;
  476. #endif
  477. CBUFFER_END
  478. sampler2D _fx_glow01;
  479. PackedVaryings VertexFunction( Attributes input )
  480. {
  481. PackedVaryings output = (PackedVaryings)0;
  482. UNITY_SETUP_INSTANCE_ID(input);
  483. UNITY_TRANSFER_INSTANCE_ID(input, output);
  484. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  485. output.ase_texcoord3.xy = input.ase_texcoord.xy;
  486. //setting value to unused interpolator channels and avoid initialization warnings
  487. output.ase_texcoord3.zw = 0;
  488. #ifdef ASE_ABSOLUTE_VERTEX_POS
  489. float3 defaultVertexValue = input.positionOS.xyz;
  490. #else
  491. float3 defaultVertexValue = float3(0, 0, 0);
  492. #endif
  493. float3 vertexValue = defaultVertexValue;
  494. #ifdef ASE_ABSOLUTE_VERTEX_POS
  495. input.positionOS.xyz = vertexValue;
  496. #else
  497. input.positionOS.xyz += vertexValue;
  498. #endif
  499. input.normalOS = input.normalOS;
  500. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  501. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  502. output.positionWS = vertexInput.positionWS;
  503. #endif
  504. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  505. output.shadowCoord = GetShadowCoord( vertexInput );
  506. #endif
  507. output.positionCS = vertexInput.positionCS;
  508. output.clipPosV = vertexInput.positionCS;
  509. return output;
  510. }
  511. #if defined(ASE_TESSELLATION)
  512. struct VertexControl
  513. {
  514. float4 positionOS : INTERNALTESSPOS;
  515. float3 normalOS : NORMAL;
  516. float4 ase_texcoord : TEXCOORD0;
  517. UNITY_VERTEX_INPUT_INSTANCE_ID
  518. };
  519. struct TessellationFactors
  520. {
  521. float edge[3] : SV_TessFactor;
  522. float inside : SV_InsideTessFactor;
  523. };
  524. VertexControl vert ( Attributes input )
  525. {
  526. VertexControl output;
  527. UNITY_SETUP_INSTANCE_ID(input);
  528. UNITY_TRANSFER_INSTANCE_ID(input, output);
  529. output.positionOS = input.positionOS;
  530. output.normalOS = input.normalOS;
  531. output.ase_texcoord = input.ase_texcoord;
  532. return output;
  533. }
  534. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  535. {
  536. TessellationFactors output;
  537. float4 tf = 1;
  538. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  539. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  540. #if defined(ASE_FIXED_TESSELLATION)
  541. tf = FixedTess( tessValue );
  542. #elif defined(ASE_DISTANCE_TESSELLATION)
  543. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  544. #elif defined(ASE_LENGTH_TESSELLATION)
  545. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  546. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  547. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  548. #endif
  549. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  550. return output;
  551. }
  552. [domain("tri")]
  553. [partitioning("fractional_odd")]
  554. [outputtopology("triangle_cw")]
  555. [patchconstantfunc("TessellationFunction")]
  556. [outputcontrolpoints(3)]
  557. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  558. {
  559. return patch[id];
  560. }
  561. [domain("tri")]
  562. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  563. {
  564. Attributes output = (Attributes) 0;
  565. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  566. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  567. output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  568. #if defined(ASE_PHONG_TESSELLATION)
  569. float3 pp[3];
  570. for (int i = 0; i < 3; ++i)
  571. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  572. float phongStrength = _TessPhongStrength;
  573. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  574. #endif
  575. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  576. return VertexFunction(output);
  577. }
  578. #else
  579. PackedVaryings vert ( Attributes input )
  580. {
  581. return VertexFunction( input );
  582. }
  583. #endif
  584. half4 frag(PackedVaryings input
  585. #ifdef ASE_DEPTH_WRITE_ON
  586. ,out float outputDepth : ASE_SV_DEPTH
  587. #endif
  588. ) : SV_Target
  589. {
  590. UNITY_SETUP_INSTANCE_ID(input);
  591. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
  592. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  593. float3 WorldPosition = input.positionWS;
  594. #endif
  595. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  596. float4 ClipPos = input.clipPosV;
  597. float4 ScreenPos = ComputeScreenPos( input.clipPosV );
  598. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  599. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  600. ShadowCoords = input.shadowCoord;
  601. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  602. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  603. #endif
  604. #endif
  605. float2 uv_fx_glow01 = input.ase_texcoord3.xy * _fx_glow01_ST.xy + _fx_glow01_ST.zw;
  606. float4 tex2DNode10 = tex2D( _fx_glow01, uv_fx_glow01 );
  607. float Alpha = ( tex2DNode10.a * _Float0 );
  608. float AlphaClipThreshold = 0.5;
  609. #ifdef ASE_DEPTH_WRITE_ON
  610. float DepthValue = input.positionCS.z;
  611. #endif
  612. #ifdef _ALPHATEST_ON
  613. clip(Alpha - AlphaClipThreshold);
  614. #endif
  615. #if defined(LOD_FADE_CROSSFADE)
  616. LODFadeCrossFade( input.positionCS );
  617. #endif
  618. #ifdef ASE_DEPTH_WRITE_ON
  619. outputDepth = DepthValue;
  620. #endif
  621. return 0;
  622. }
  623. ENDHLSL
  624. }
  625. Pass
  626. {
  627. Name "SceneSelectionPass"
  628. Tags { "LightMode"="SceneSelectionPass" }
  629. Cull Off
  630. AlphaToMask Off
  631. HLSLPROGRAM
  632. #define _SURFACE_TYPE_TRANSPARENT 1
  633. #define ASE_VERSION 19801
  634. #define ASE_SRP_VERSION 140011
  635. #pragma vertex vert
  636. #pragma fragment frag
  637. #define ATTRIBUTES_NEED_NORMAL
  638. #define ATTRIBUTES_NEED_TANGENT
  639. #define SHADERPASS SHADERPASS_DEPTHONLY
  640. #if ASE_SRP_VERSION >=140007
  641. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  642. #endif
  643. #if ASE_SRP_VERSION >=140007
  644. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  645. #endif
  646. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  647. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  648. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  649. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  650. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  651. #if ASE_SRP_VERSION >=140010
  652. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  653. #endif
  654. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  655. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  656. struct Attributes
  657. {
  658. float4 positionOS : POSITION;
  659. float3 normalOS : NORMAL;
  660. float4 ase_texcoord : TEXCOORD0;
  661. UNITY_VERTEX_INPUT_INSTANCE_ID
  662. };
  663. struct PackedVaryings
  664. {
  665. float4 positionCS : SV_POSITION;
  666. float4 ase_texcoord : TEXCOORD0;
  667. UNITY_VERTEX_INPUT_INSTANCE_ID
  668. UNITY_VERTEX_OUTPUT_STEREO
  669. };
  670. CBUFFER_START(UnityPerMaterial)
  671. float4 _fx_glow01_ST;
  672. float _Float0;
  673. #ifdef ASE_TESSELLATION
  674. float _TessPhongStrength;
  675. float _TessValue;
  676. float _TessMin;
  677. float _TessMax;
  678. float _TessEdgeLength;
  679. float _TessMaxDisp;
  680. #endif
  681. CBUFFER_END
  682. sampler2D _fx_glow01;
  683. int _ObjectId;
  684. int _PassValue;
  685. struct SurfaceDescription
  686. {
  687. float Alpha;
  688. float AlphaClipThreshold;
  689. };
  690. PackedVaryings VertexFunction(Attributes input )
  691. {
  692. PackedVaryings output;
  693. ZERO_INITIALIZE(PackedVaryings, output);
  694. UNITY_SETUP_INSTANCE_ID(input);
  695. UNITY_TRANSFER_INSTANCE_ID(input, output);
  696. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  697. output.ase_texcoord.xy = input.ase_texcoord.xy;
  698. //setting value to unused interpolator channels and avoid initialization warnings
  699. output.ase_texcoord.zw = 0;
  700. #ifdef ASE_ABSOLUTE_VERTEX_POS
  701. float3 defaultVertexValue = input.positionOS.xyz;
  702. #else
  703. float3 defaultVertexValue = float3(0, 0, 0);
  704. #endif
  705. float3 vertexValue = defaultVertexValue;
  706. #ifdef ASE_ABSOLUTE_VERTEX_POS
  707. input.positionOS.xyz = vertexValue;
  708. #else
  709. input.positionOS.xyz += vertexValue;
  710. #endif
  711. input.normalOS = input.normalOS;
  712. float3 positionWS = TransformObjectToWorld( input.positionOS.xyz );
  713. output.positionCS = TransformWorldToHClip(positionWS);
  714. return output;
  715. }
  716. #if defined(ASE_TESSELLATION)
  717. struct VertexControl
  718. {
  719. float4 positionOS : INTERNALTESSPOS;
  720. float3 normalOS : NORMAL;
  721. float4 ase_texcoord : TEXCOORD0;
  722. UNITY_VERTEX_INPUT_INSTANCE_ID
  723. };
  724. struct TessellationFactors
  725. {
  726. float edge[3] : SV_TessFactor;
  727. float inside : SV_InsideTessFactor;
  728. };
  729. VertexControl vert ( Attributes input )
  730. {
  731. VertexControl output;
  732. UNITY_SETUP_INSTANCE_ID(input);
  733. UNITY_TRANSFER_INSTANCE_ID(input, output);
  734. output.positionOS = input.positionOS;
  735. output.normalOS = input.normalOS;
  736. output.ase_texcoord = input.ase_texcoord;
  737. return output;
  738. }
  739. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  740. {
  741. TessellationFactors output;
  742. float4 tf = 1;
  743. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  744. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  745. #if defined(ASE_FIXED_TESSELLATION)
  746. tf = FixedTess( tessValue );
  747. #elif defined(ASE_DISTANCE_TESSELLATION)
  748. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  749. #elif defined(ASE_LENGTH_TESSELLATION)
  750. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  751. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  752. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  753. #endif
  754. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  755. return output;
  756. }
  757. [domain("tri")]
  758. [partitioning("fractional_odd")]
  759. [outputtopology("triangle_cw")]
  760. [patchconstantfunc("TessellationFunction")]
  761. [outputcontrolpoints(3)]
  762. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  763. {
  764. return patch[id];
  765. }
  766. [domain("tri")]
  767. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  768. {
  769. Attributes output = (Attributes) 0;
  770. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  771. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  772. output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  773. #if defined(ASE_PHONG_TESSELLATION)
  774. float3 pp[3];
  775. for (int i = 0; i < 3; ++i)
  776. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  777. float phongStrength = _TessPhongStrength;
  778. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  779. #endif
  780. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  781. return VertexFunction(output);
  782. }
  783. #else
  784. PackedVaryings vert ( Attributes input )
  785. {
  786. return VertexFunction( input );
  787. }
  788. #endif
  789. half4 frag(PackedVaryings input ) : SV_Target
  790. {
  791. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  792. float2 uv_fx_glow01 = input.ase_texcoord.xy * _fx_glow01_ST.xy + _fx_glow01_ST.zw;
  793. float4 tex2DNode10 = tex2D( _fx_glow01, uv_fx_glow01 );
  794. surfaceDescription.Alpha = ( tex2DNode10.a * _Float0 );
  795. surfaceDescription.AlphaClipThreshold = 0.5;
  796. #if _ALPHATEST_ON
  797. float alphaClipThreshold = 0.01f;
  798. #if ALPHA_CLIP_THRESHOLD
  799. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  800. #endif
  801. clip(surfaceDescription.Alpha - alphaClipThreshold);
  802. #endif
  803. half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  804. return outColor;
  805. }
  806. ENDHLSL
  807. }
  808. Pass
  809. {
  810. Name "ScenePickingPass"
  811. Tags { "LightMode"="Picking" }
  812. AlphaToMask Off
  813. HLSLPROGRAM
  814. #define _SURFACE_TYPE_TRANSPARENT 1
  815. #define ASE_VERSION 19801
  816. #define ASE_SRP_VERSION 140011
  817. #pragma vertex vert
  818. #pragma fragment frag
  819. #define ATTRIBUTES_NEED_NORMAL
  820. #define ATTRIBUTES_NEED_TANGENT
  821. #define SHADERPASS SHADERPASS_DEPTHONLY
  822. #if ASE_SRP_VERSION >=140007
  823. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  824. #endif
  825. #if ASE_SRP_VERSION >=140007
  826. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  827. #endif
  828. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  829. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  830. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  831. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  832. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  833. #if ASE_SRP_VERSION >=140010
  834. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  835. #endif
  836. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  837. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  838. #if defined(LOD_FADE_CROSSFADE)
  839. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  840. #endif
  841. struct Attributes
  842. {
  843. float4 positionOS : POSITION;
  844. float3 normalOS : NORMAL;
  845. float4 ase_texcoord : TEXCOORD0;
  846. UNITY_VERTEX_INPUT_INSTANCE_ID
  847. };
  848. struct PackedVaryings
  849. {
  850. float4 positionCS : SV_POSITION;
  851. float4 ase_texcoord : TEXCOORD0;
  852. UNITY_VERTEX_INPUT_INSTANCE_ID
  853. UNITY_VERTEX_OUTPUT_STEREO
  854. };
  855. CBUFFER_START(UnityPerMaterial)
  856. float4 _fx_glow01_ST;
  857. float _Float0;
  858. #ifdef ASE_TESSELLATION
  859. float _TessPhongStrength;
  860. float _TessValue;
  861. float _TessMin;
  862. float _TessMax;
  863. float _TessEdgeLength;
  864. float _TessMaxDisp;
  865. #endif
  866. CBUFFER_END
  867. sampler2D _fx_glow01;
  868. float4 _SelectionID;
  869. struct SurfaceDescription
  870. {
  871. float Alpha;
  872. float AlphaClipThreshold;
  873. };
  874. PackedVaryings VertexFunction(Attributes input )
  875. {
  876. PackedVaryings output;
  877. ZERO_INITIALIZE(PackedVaryings, output);
  878. UNITY_SETUP_INSTANCE_ID(input);
  879. UNITY_TRANSFER_INSTANCE_ID(input, output);
  880. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  881. output.ase_texcoord.xy = input.ase_texcoord.xy;
  882. //setting value to unused interpolator channels and avoid initialization warnings
  883. output.ase_texcoord.zw = 0;
  884. #ifdef ASE_ABSOLUTE_VERTEX_POS
  885. float3 defaultVertexValue = input.positionOS.xyz;
  886. #else
  887. float3 defaultVertexValue = float3(0, 0, 0);
  888. #endif
  889. float3 vertexValue = defaultVertexValue;
  890. #ifdef ASE_ABSOLUTE_VERTEX_POS
  891. input.positionOS.xyz = vertexValue;
  892. #else
  893. input.positionOS.xyz += vertexValue;
  894. #endif
  895. input.normalOS = input.normalOS;
  896. float3 positionWS = TransformObjectToWorld( input.positionOS.xyz );
  897. output.positionCS = TransformWorldToHClip(positionWS);
  898. return output;
  899. }
  900. #if defined(ASE_TESSELLATION)
  901. struct VertexControl
  902. {
  903. float4 positionOS : INTERNALTESSPOS;
  904. float3 normalOS : NORMAL;
  905. float4 ase_texcoord : TEXCOORD0;
  906. UNITY_VERTEX_INPUT_INSTANCE_ID
  907. };
  908. struct TessellationFactors
  909. {
  910. float edge[3] : SV_TessFactor;
  911. float inside : SV_InsideTessFactor;
  912. };
  913. VertexControl vert ( Attributes input )
  914. {
  915. VertexControl output;
  916. UNITY_SETUP_INSTANCE_ID(input);
  917. UNITY_TRANSFER_INSTANCE_ID(input, output);
  918. output.positionOS = input.positionOS;
  919. output.normalOS = input.normalOS;
  920. output.ase_texcoord = input.ase_texcoord;
  921. return output;
  922. }
  923. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  924. {
  925. TessellationFactors output;
  926. float4 tf = 1;
  927. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  928. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  929. #if defined(ASE_FIXED_TESSELLATION)
  930. tf = FixedTess( tessValue );
  931. #elif defined(ASE_DISTANCE_TESSELLATION)
  932. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  933. #elif defined(ASE_LENGTH_TESSELLATION)
  934. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  935. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  936. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  937. #endif
  938. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  939. return output;
  940. }
  941. [domain("tri")]
  942. [partitioning("fractional_odd")]
  943. [outputtopology("triangle_cw")]
  944. [patchconstantfunc("TessellationFunction")]
  945. [outputcontrolpoints(3)]
  946. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  947. {
  948. return patch[id];
  949. }
  950. [domain("tri")]
  951. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  952. {
  953. Attributes output = (Attributes) 0;
  954. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  955. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  956. output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  957. #if defined(ASE_PHONG_TESSELLATION)
  958. float3 pp[3];
  959. for (int i = 0; i < 3; ++i)
  960. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  961. float phongStrength = _TessPhongStrength;
  962. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  963. #endif
  964. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  965. return VertexFunction(output);
  966. }
  967. #else
  968. PackedVaryings vert ( Attributes input )
  969. {
  970. return VertexFunction( input );
  971. }
  972. #endif
  973. half4 frag(PackedVaryings input ) : SV_Target
  974. {
  975. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  976. float2 uv_fx_glow01 = input.ase_texcoord.xy * _fx_glow01_ST.xy + _fx_glow01_ST.zw;
  977. float4 tex2DNode10 = tex2D( _fx_glow01, uv_fx_glow01 );
  978. surfaceDescription.Alpha = ( tex2DNode10.a * _Float0 );
  979. surfaceDescription.AlphaClipThreshold = 0.5;
  980. #if _ALPHATEST_ON
  981. float alphaClipThreshold = 0.01f;
  982. #if ALPHA_CLIP_THRESHOLD
  983. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  984. #endif
  985. clip(surfaceDescription.Alpha - alphaClipThreshold);
  986. #endif
  987. half4 outColor = 0;
  988. outColor = _SelectionID;
  989. return outColor;
  990. }
  991. ENDHLSL
  992. }
  993. Pass
  994. {
  995. Name "DepthNormals"
  996. Tags { "LightMode"="DepthNormalsOnly" }
  997. ZTest LEqual
  998. ZWrite On
  999. HLSLPROGRAM
  1000. #define _SURFACE_TYPE_TRANSPARENT 1
  1001. #pragma multi_compile_instancing
  1002. #define ASE_VERSION 19801
  1003. #define ASE_SRP_VERSION 140011
  1004. #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
  1005. #pragma vertex vert
  1006. #pragma fragment frag
  1007. #define ATTRIBUTES_NEED_NORMAL
  1008. #define ATTRIBUTES_NEED_TANGENT
  1009. #define VARYINGS_NEED_NORMAL_WS
  1010. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1011. #if ASE_SRP_VERSION >=140007
  1012. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  1013. #endif
  1014. #if ASE_SRP_VERSION >=140007
  1015. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  1016. #endif
  1017. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1018. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1019. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1020. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1021. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1022. #if ASE_SRP_VERSION >=140010
  1023. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  1024. #endif
  1025. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1026. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1027. #if defined(LOD_FADE_CROSSFADE)
  1028. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  1029. #endif
  1030. #if defined(ASE_EARLY_Z_DEPTH_OPTIMIZE) && (SHADER_TARGET >= 45)
  1031. #define ASE_SV_DEPTH SV_DepthLessEqual
  1032. #define ASE_SV_POSITION_QUALIFIERS linear noperspective centroid
  1033. #else
  1034. #define ASE_SV_DEPTH SV_Depth
  1035. #define ASE_SV_POSITION_QUALIFIERS
  1036. #endif
  1037. struct Attributes
  1038. {
  1039. float4 positionOS : POSITION;
  1040. float3 normalOS : NORMAL;
  1041. float4 ase_texcoord : TEXCOORD0;
  1042. UNITY_VERTEX_INPUT_INSTANCE_ID
  1043. };
  1044. struct PackedVaryings
  1045. {
  1046. ASE_SV_POSITION_QUALIFIERS float4 positionCS : SV_POSITION;
  1047. float4 clipPosV : TEXCOORD0;
  1048. float3 positionWS : TEXCOORD1;
  1049. float3 normalWS : TEXCOORD2;
  1050. float4 ase_texcoord3 : TEXCOORD3;
  1051. UNITY_VERTEX_INPUT_INSTANCE_ID
  1052. UNITY_VERTEX_OUTPUT_STEREO
  1053. };
  1054. CBUFFER_START(UnityPerMaterial)
  1055. float4 _fx_glow01_ST;
  1056. float _Float0;
  1057. #ifdef ASE_TESSELLATION
  1058. float _TessPhongStrength;
  1059. float _TessValue;
  1060. float _TessMin;
  1061. float _TessMax;
  1062. float _TessEdgeLength;
  1063. float _TessMaxDisp;
  1064. #endif
  1065. CBUFFER_END
  1066. sampler2D _fx_glow01;
  1067. struct SurfaceDescription
  1068. {
  1069. float Alpha;
  1070. float AlphaClipThreshold;
  1071. };
  1072. PackedVaryings VertexFunction( Attributes input )
  1073. {
  1074. PackedVaryings output;
  1075. ZERO_INITIALIZE(PackedVaryings, output);
  1076. UNITY_SETUP_INSTANCE_ID(input);
  1077. UNITY_TRANSFER_INSTANCE_ID(input, output);
  1078. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  1079. output.ase_texcoord3.xy = input.ase_texcoord.xy;
  1080. //setting value to unused interpolator channels and avoid initialization warnings
  1081. output.ase_texcoord3.zw = 0;
  1082. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1083. float3 defaultVertexValue = input.positionOS.xyz;
  1084. #else
  1085. float3 defaultVertexValue = float3(0, 0, 0);
  1086. #endif
  1087. float3 vertexValue = defaultVertexValue;
  1088. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1089. input.positionOS.xyz = vertexValue;
  1090. #else
  1091. input.positionOS.xyz += vertexValue;
  1092. #endif
  1093. input.normalOS = input.normalOS;
  1094. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  1095. output.positionCS = vertexInput.positionCS;
  1096. output.clipPosV = vertexInput.positionCS;
  1097. output.positionWS = vertexInput.positionWS;
  1098. output.normalWS = TransformObjectToWorldNormal( input.normalOS );
  1099. return output;
  1100. }
  1101. #if defined(ASE_TESSELLATION)
  1102. struct VertexControl
  1103. {
  1104. float4 positionOS : INTERNALTESSPOS;
  1105. float3 normalOS : NORMAL;
  1106. float4 ase_texcoord : TEXCOORD0;
  1107. UNITY_VERTEX_INPUT_INSTANCE_ID
  1108. };
  1109. struct TessellationFactors
  1110. {
  1111. float edge[3] : SV_TessFactor;
  1112. float inside : SV_InsideTessFactor;
  1113. };
  1114. VertexControl vert ( Attributes input )
  1115. {
  1116. VertexControl output;
  1117. UNITY_SETUP_INSTANCE_ID(input);
  1118. UNITY_TRANSFER_INSTANCE_ID(input, output);
  1119. output.positionOS = input.positionOS;
  1120. output.normalOS = input.normalOS;
  1121. output.ase_texcoord = input.ase_texcoord;
  1122. return output;
  1123. }
  1124. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  1125. {
  1126. TessellationFactors output;
  1127. float4 tf = 1;
  1128. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1129. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1130. #if defined(ASE_FIXED_TESSELLATION)
  1131. tf = FixedTess( tessValue );
  1132. #elif defined(ASE_DISTANCE_TESSELLATION)
  1133. tf = DistanceBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1134. #elif defined(ASE_LENGTH_TESSELLATION)
  1135. tf = EdgeLengthBasedTess(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1136. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1137. tf = EdgeLengthBasedTessCull(input[0].positionOS, input[1].positionOS, input[2].positionOS, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1138. #endif
  1139. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  1140. return output;
  1141. }
  1142. [domain("tri")]
  1143. [partitioning("fractional_odd")]
  1144. [outputtopology("triangle_cw")]
  1145. [patchconstantfunc("TessellationFunction")]
  1146. [outputcontrolpoints(3)]
  1147. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1148. {
  1149. return patch[id];
  1150. }
  1151. [domain("tri")]
  1152. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1153. {
  1154. Attributes output = (Attributes) 0;
  1155. output.positionOS = patch[0].positionOS * bary.x + patch[1].positionOS * bary.y + patch[2].positionOS * bary.z;
  1156. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  1157. output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1158. #if defined(ASE_PHONG_TESSELLATION)
  1159. float3 pp[3];
  1160. for (int i = 0; i < 3; ++i)
  1161. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].positionOS.xyz, patch[i].normalOS));
  1162. float phongStrength = _TessPhongStrength;
  1163. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  1164. #endif
  1165. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  1166. return VertexFunction(output);
  1167. }
  1168. #else
  1169. PackedVaryings vert ( Attributes input )
  1170. {
  1171. return VertexFunction( input );
  1172. }
  1173. #endif
  1174. void frag(PackedVaryings input
  1175. , out half4 outNormalWS : SV_Target0
  1176. #ifdef ASE_DEPTH_WRITE_ON
  1177. ,out float outputDepth : ASE_SV_DEPTH
  1178. #endif
  1179. #ifdef _WRITE_RENDERING_LAYERS
  1180. , out float4 outRenderingLayers : SV_Target1
  1181. #endif
  1182. )
  1183. {
  1184. UNITY_SETUP_INSTANCE_ID(input);
  1185. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
  1186. float3 WorldPosition = input.positionWS;
  1187. float3 WorldNormal = input.normalWS;
  1188. float4 ClipPos = input.clipPosV;
  1189. float4 ScreenPos = ComputeScreenPos( input.clipPosV );
  1190. float2 uv_fx_glow01 = input.ase_texcoord3.xy * _fx_glow01_ST.xy + _fx_glow01_ST.zw;
  1191. float4 tex2DNode10 = tex2D( _fx_glow01, uv_fx_glow01 );
  1192. float Alpha = ( tex2DNode10.a * _Float0 );
  1193. float AlphaClipThreshold = 0.5;
  1194. #ifdef ASE_DEPTH_WRITE_ON
  1195. float DepthValue = input.positionCS.z;
  1196. #endif
  1197. #ifdef _ALPHATEST_ON
  1198. clip(Alpha - AlphaClipThreshold);
  1199. #endif
  1200. #if defined(LOD_FADE_CROSSFADE)
  1201. LODFadeCrossFade( input.positionCS );
  1202. #endif
  1203. #ifdef ASE_DEPTH_WRITE_ON
  1204. outputDepth = DepthValue;
  1205. #endif
  1206. #if defined(_GBUFFER_NORMALS_OCT)
  1207. float3 normalWS = normalize(input.normalWS);
  1208. float2 octNormalWS = PackNormalOctQuadEncode(normalWS);
  1209. float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5);
  1210. half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS);
  1211. outNormalWS = half4(packedNormalWS, 0.0);
  1212. #else
  1213. float3 normalWS = input.normalWS;
  1214. outNormalWS = half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1215. #endif
  1216. #ifdef _WRITE_RENDERING_LAYERS
  1217. uint renderingLayers = GetMeshRenderingLayer();
  1218. outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0);
  1219. #endif
  1220. }
  1221. ENDHLSL
  1222. }
  1223. }
  1224. CustomEditor "UnityEditor.ShaderGraphUnlitGUI"
  1225. FallBack "Hidden/Shader Graph/FallbackError"
  1226. Fallback Off
  1227. }
  1228. /*ASEBEGIN
  1229. Version=19801
  1230. Node;AmplifyShaderEditor.SamplerNode;10;-335.5001,-57.5;Inherit;True;Property;_fx_glow01;fx_glow01;0;0;Create;True;0;0;0;False;0;False;-1;2d8225aaacb3aba44aa7e4166ccb0718;2d8225aaacb3aba44aa7e4166ccb0718;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1231. Node;AmplifyShaderEditor.RangedFloatNode;12;-192,272;Inherit;False;Property;_Float0;Float 0;1;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0
  1232. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;11;-48,224;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1233. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;0,0;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;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
  1234. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;2;0,0;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;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
  1235. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;3;0,0;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;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;True;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
  1236. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;4;0,0;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;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
  1237. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;5;0,0;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;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
  1238. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;6;0,0;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;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
  1239. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;7;0,0;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;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
  1240. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;8;0,0;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;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
  1241. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;9;0,0;Float;False;False;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;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
  1242. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;0,0;Float;False;True;-1;3;UnityEditor.ShaderGraphUnlitGUI;0;13;LT/Alpha3;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;9;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;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;6;d3d11;glcore;gles;gles3;metal;vulkan;0;False;True;1;5;False;;10;False;;1;1;False;;10;False;;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForwardOnly;False;False;0;;0;0;Standard;25;Surface;1;638816005326400315; Blend;0;0;Two Sided;0;638816005350604561;Alpha Clipping;0;638816008977896135; Use Shadow Threshold;0;0;Forward Only;0;0;Cast Shadows;0;638816005379783701;Receive Shadows;0;638816005573879803;GPU Instancing;1;638816005569162559;LOD CrossFade;0;638816005420893267;Built-in Fog;0;638816005419099286;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Write Depth;0;0; Early Z;0;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;False;True;True;True;False;False;;False;0
  1243. WireConnection;11;0;10;4
  1244. WireConnection;11;1;12;0
  1245. WireConnection;1;2;10;0
  1246. WireConnection;1;3;11;0
  1247. ASEEND*/
  1248. //CHKSM=2E1B1B6E3F77939D3472A43CE13A3E4B9FDD8EF0