Torch Flame.shader 94 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019
  1. // Made with Amplify Shader Editor v1.9.7.1
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "Tobyfredson/Torch Flame (URP)"
  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. [NoScaleOffset]_BaseFlame("Base Flame", 2D) = "white" {}
  10. _Brightnessmultiply("Brightness multiply", Range( 0 , 10)) = 0
  11. [NoScaleOffset]_NoiseTexture("Noise Texture", 2D) = "white" {}
  12. _Color0("Color 0", Color) = (1,0.4313726,0,1)
  13. _Color1("Color 1", Color) = (1,0.1058824,0,1)
  14. _Color2("Color 2", Color) = (0,1,0.145098,1)
  15. _Color3("Color 3", Color) = (0.7450981,0,0.4313726,1)
  16. _Flamespeed("Flame speed", Float) = 0
  17. _NoiseScale("Noise Scale", Float) = 1
  18. [NoScaleOffset]_AlphaMask("Alpha Mask", 2D) = "white" {}
  19. [NoScaleOffset]_FastFlame("Fast Flame", 2D) = "white" {}
  20. [NoScaleOffset]_BlazeParticles("Blaze Particles", 2D) = "white" {}
  21. _DepthFadeAmount("Depth Fade Amount", Float) = 0
  22. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  23. //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
  24. //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
  25. //_TessMin( "Tess Min Distance", Float ) = 10
  26. //_TessMax( "Tess Max Distance", Float ) = 25
  27. //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
  28. //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
  29. [HideInInspector] _QueueOffset("_QueueOffset", Float) = 0
  30. [HideInInspector] _QueueControl("_QueueControl", Float) = -1
  31. [HideInInspector][NoScaleOffset] unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  32. [HideInInspector][NoScaleOffset] unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  33. [HideInInspector][NoScaleOffset] unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  34. //[HideInInspector][ToggleUI] _AddPrecomputedVelocity("Add Precomputed Velocity", Float) = 1
  35. [HideInInspector][ToggleOff] _ReceiveShadows("Receive Shadows", Float) = 1.0
  36. }
  37. SubShader
  38. {
  39. LOD 0
  40. Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" "UniversalMaterialType"="Unlit" }
  41. Cull Back
  42. AlphaToMask Off
  43. HLSLINCLUDE
  44. #pragma target 4.5
  45. #pragma prefer_hlslcc gles
  46. // ensure rendering platforms toggle list is visible
  47. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
  48. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Filtering.hlsl"
  49. #ifndef ASE_TESS_FUNCS
  50. #define ASE_TESS_FUNCS
  51. float4 FixedTess( float tessValue )
  52. {
  53. return tessValue;
  54. }
  55. float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
  56. {
  57. float3 wpos = mul(o2w,vertex).xyz;
  58. float dist = distance (wpos, cameraPos);
  59. float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
  60. return f;
  61. }
  62. float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
  63. {
  64. float4 tess;
  65. tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
  66. tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
  67. tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
  68. tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
  69. return tess;
  70. }
  71. float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
  72. {
  73. float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
  74. float len = distance(wpos0, wpos1);
  75. float f = max(len * scParams.y / (edgeLen * dist), 1.0);
  76. return f;
  77. }
  78. float DistanceFromPlane (float3 pos, float4 plane)
  79. {
  80. float d = dot (float4(pos,1.0f), plane);
  81. return d;
  82. }
  83. bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
  84. {
  85. float4 planeTest;
  86. planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  87. (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  88. (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
  89. planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  90. (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  91. (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
  92. planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  93. (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  94. (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
  95. planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  96. (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  97. (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
  98. return !all (planeTest);
  99. }
  100. float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
  101. {
  102. float3 f;
  103. f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
  104. f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
  105. f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
  106. return CalcTriEdgeTessFactors (f);
  107. }
  108. float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
  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. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  115. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  116. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  117. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  118. return tess;
  119. }
  120. float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
  121. {
  122. float3 pos0 = mul(o2w,v0).xyz;
  123. float3 pos1 = mul(o2w,v1).xyz;
  124. float3 pos2 = mul(o2w,v2).xyz;
  125. float4 tess;
  126. if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
  127. {
  128. tess = 0.0f;
  129. }
  130. else
  131. {
  132. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  133. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  134. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  135. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  136. }
  137. return tess;
  138. }
  139. #endif //ASE_TESS_FUNCS
  140. ENDHLSL
  141. Pass
  142. {
  143. Name "Forward"
  144. Tags { "LightMode"="UniversalForward" }
  145. Blend One One, One OneMinusSrcAlpha
  146. ZWrite Off
  147. ZTest LEqual
  148. Offset 0 , 0
  149. ColorMask RGBA
  150. HLSLPROGRAM
  151. #pragma multi_compile_local _ALPHATEST_ON
  152. #pragma shader_feature_local _RECEIVE_SHADOWS_OFF
  153. #define _SURFACE_TYPE_TRANSPARENT 1
  154. #define ASE_VERSION 19701
  155. #define ASE_SRP_VERSION 170003
  156. #define REQUIRE_DEPTH_TEXTURE 1
  157. #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
  158. #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  159. #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
  160. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  161. #pragma multi_compile _ LIGHTMAP_ON
  162. #pragma multi_compile _ DYNAMICLIGHTMAP_ON
  163. #pragma multi_compile_fragment _ DEBUG_DISPLAY
  164. #pragma vertex vert
  165. #pragma fragment frag
  166. #define SHADERPASS SHADERPASS_UNLIT
  167. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  168. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  169. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  170. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  171. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  172. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  173. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  174. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  175. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  176. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
  177. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  178. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  179. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  180. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  181. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  182. #if defined(LOD_FADE_CROSSFADE)
  183. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  184. #endif
  185. #include "Packages/com.unity.shadergraph/ShaderGraphLibrary/Functions.hlsl"
  186. #define ASE_NEEDS_VERT_POSITION
  187. #define ASE_NEEDS_VERT_NORMAL
  188. #define ASE_NEEDS_FRAG_SCREEN_POSITION
  189. #define ASE_NEEDS_FRAG_WORLD_POSITION
  190. struct Attributes
  191. {
  192. float4 positionOS : POSITION;
  193. float3 normalOS : NORMAL;
  194. float4 ase_tangent : TANGENT;
  195. float4 ase_texcoord : TEXCOORD0;
  196. UNITY_VERTEX_INPUT_INSTANCE_ID
  197. };
  198. struct PackedVaryings
  199. {
  200. float4 positionCS : SV_POSITION;
  201. float4 clipPosV : TEXCOORD0;
  202. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  203. float3 positionWS : TEXCOORD1;
  204. #endif
  205. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  206. float4 shadowCoord : TEXCOORD2;
  207. #endif
  208. #ifdef ASE_FOG
  209. float fogFactor : TEXCOORD3;
  210. #endif
  211. float4 ase_texcoord4 : TEXCOORD4;
  212. UNITY_VERTEX_INPUT_INSTANCE_ID
  213. UNITY_VERTEX_OUTPUT_STEREO
  214. };
  215. CBUFFER_START(UnityPerMaterial)
  216. float4 _Color0;
  217. float4 _Color1;
  218. float4 _Color2;
  219. float4 _Color3;
  220. float _DepthFadeAmount;
  221. float _Brightnessmultiply;
  222. float _Flamespeed;
  223. float _NoiseScale;
  224. #ifdef ASE_TESSELLATION
  225. float _TessPhongStrength;
  226. float _TessValue;
  227. float _TessMin;
  228. float _TessMax;
  229. float _TessEdgeLength;
  230. float _TessMaxDisp;
  231. #endif
  232. CBUFFER_END
  233. sampler2D _BlazeParticles;
  234. sampler2D _FastFlame;
  235. sampler2D _BaseFlame;
  236. sampler2D _NoiseTexture;
  237. sampler2D _AlphaMask;
  238. float4 SampleGradient( Gradient gradient, float time )
  239. {
  240. float3 color = gradient.colors[0].rgb;
  241. UNITY_UNROLL
  242. for (int c = 1; c < 8; c++)
  243. {
  244. float colorPos = saturate((time - gradient.colors[c-1].w) / ( 0.00001 + (gradient.colors[c].w - gradient.colors[c-1].w)) * step(c, gradient.colorsLength-1));
  245. color = lerp(color, gradient.colors[c].rgb, lerp(colorPos, step(0.01, colorPos), gradient.type));
  246. }
  247. #ifndef UNITY_COLORSPACE_GAMMA
  248. color = SRGBToLinear(color);
  249. #endif
  250. float alpha = gradient.alphas[0].x;
  251. UNITY_UNROLL
  252. for (int a = 1; a < 8; a++)
  253. {
  254. float alphaPos = saturate((time - gradient.alphas[a-1].y) / ( 0.00001 + (gradient.alphas[a].y - gradient.alphas[a-1].y)) * step(a, gradient.alphasLength-1));
  255. alpha = lerp(alpha, gradient.alphas[a].x, lerp(alphaPos, step(0.01, alphaPos), gradient.type));
  256. }
  257. return float4(color, alpha);
  258. }
  259. float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
  260. float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
  261. float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
  262. float snoise( float2 v )
  263. {
  264. const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
  265. float2 i = floor( v + dot( v, C.yy ) );
  266. float2 x0 = v - i + dot( i, C.xx );
  267. float2 i1;
  268. i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
  269. float4 x12 = x0.xyxy + C.xxzz;
  270. x12.xy -= i1;
  271. i = mod2D289( i );
  272. float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
  273. float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
  274. m = m * m;
  275. m = m * m;
  276. float3 x = 2.0 * frac( p * C.www ) - 1.0;
  277. float3 h = abs( x ) - 0.5;
  278. float3 ox = floor( x + 0.5 );
  279. float3 a0 = x - ox;
  280. m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
  281. float3 g;
  282. g.x = a0.x * x0.x + h.x * x0.y;
  283. g.yz = a0.yz * x12.xz + h.yz * x12.yw;
  284. return 130.0 * dot( m, g );
  285. }
  286. float2 voronoihash140( float2 p )
  287. {
  288. p = float2( dot( p, float2( 127.1, 311.7 ) ), dot( p, float2( 269.5, 183.3 ) ) );
  289. return frac( sin( p ) *43758.5453);
  290. }
  291. float voronoi140( float2 v, float time, inout float2 id, inout float2 mr, float smoothness, inout float2 smoothId )
  292. {
  293. float2 n = floor( v );
  294. float2 f = frac( v );
  295. float F1 = 8.0;
  296. float F2 = 8.0; float2 mg = 0;
  297. for ( int j = -1; j <= 1; j++ )
  298. {
  299. for ( int i = -1; i <= 1; i++ )
  300. {
  301. float2 g = float2( i, j );
  302. float2 o = voronoihash140( n + g );
  303. o = ( sin( time + o * 6.2831 ) * 0.5 + 0.5 ); float2 r = f - g - o;
  304. float d = 0.5 * dot( r, r );
  305. if( d<F1 ) {
  306. F2 = F1;
  307. F1 = d; mg = g; mr = r; id = o;
  308. } else if( d<F2 ) {
  309. F2 = d;
  310. }
  311. }
  312. }
  313. return F1;
  314. }
  315. PackedVaryings VertexFunction( Attributes input )
  316. {
  317. PackedVaryings output = (PackedVaryings)0;
  318. UNITY_SETUP_INSTANCE_ID(input);
  319. UNITY_TRANSFER_INSTANCE_ID(input, output);
  320. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  321. //Calculate new billboard vertex position and normal;
  322. float3 upCamVec = normalize ( UNITY_MATRIX_V._m10_m11_m12 );
  323. float3 forwardCamVec = -normalize ( UNITY_MATRIX_V._m20_m21_m22 );
  324. float3 rightCamVec = normalize( UNITY_MATRIX_V._m00_m01_m02 );
  325. float4x4 rotationCamMatrix = float4x4( rightCamVec, 0, upCamVec, 0, forwardCamVec, 0, 0, 0, 0, 1 );
  326. input.normalOS = normalize( mul( float4( input.normalOS , 0 ), rotationCamMatrix )).xyz;
  327. input.ase_tangent.xyz = normalize( mul( float4( input.ase_tangent.xyz , 0 ), rotationCamMatrix )).xyz;
  328. input.positionOS.x *= length( GetObjectToWorldMatrix()._m00_m10_m20 );
  329. input.positionOS.y *= length( GetObjectToWorldMatrix()._m01_m11_m21 );
  330. input.positionOS.z *= length( GetObjectToWorldMatrix()._m02_m12_m22 );
  331. input.positionOS = mul( input.positionOS, rotationCamMatrix );
  332. input.positionOS = mul( GetWorldToObjectMatrix(), float4( input.positionOS.xyz, 0 ) );
  333. output.ase_texcoord4.xy = input.ase_texcoord.xy;
  334. //setting value to unused interpolator channels and avoid initialization warnings
  335. output.ase_texcoord4.zw = 0;
  336. #ifdef ASE_ABSOLUTE_VERTEX_POS
  337. float3 defaultVertexValue = input.positionOS.xyz;
  338. #else
  339. float3 defaultVertexValue = float3(0, 0, 0);
  340. #endif
  341. float3 vertexValue = 0;
  342. #ifdef ASE_ABSOLUTE_VERTEX_POS
  343. input.positionOS.xyz = vertexValue;
  344. #else
  345. input.positionOS.xyz += vertexValue;
  346. #endif
  347. input.normalOS = input.normalOS;
  348. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  349. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  350. output.positionWS = vertexInput.positionWS;
  351. #endif
  352. #ifdef ASE_FOG
  353. output.fogFactor = ComputeFogFactor( vertexInput.positionCS.z );
  354. #endif
  355. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  356. output.shadowCoord = GetShadowCoord( vertexInput );
  357. #endif
  358. output.positionCS = vertexInput.positionCS;
  359. output.clipPosV = vertexInput.positionCS;
  360. return output;
  361. }
  362. #if defined(ASE_TESSELLATION)
  363. struct VertexControl
  364. {
  365. float4 vertex : INTERNALTESSPOS;
  366. float3 normalOS : NORMAL;
  367. float4 ase_tangent : TANGENT;
  368. float4 ase_texcoord : TEXCOORD0;
  369. UNITY_VERTEX_INPUT_INSTANCE_ID
  370. };
  371. struct TessellationFactors
  372. {
  373. float edge[3] : SV_TessFactor;
  374. float inside : SV_InsideTessFactor;
  375. };
  376. VertexControl vert ( Attributes input )
  377. {
  378. VertexControl output;
  379. UNITY_SETUP_INSTANCE_ID(input);
  380. UNITY_TRANSFER_INSTANCE_ID(input, output);
  381. output.vertex = input.positionOS;
  382. output.normalOS = input.normalOS;
  383. output.ase_tangent = input.ase_tangent;
  384. output.ase_texcoord = input.ase_texcoord;
  385. return output;
  386. }
  387. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  388. {
  389. TessellationFactors output;
  390. float4 tf = 1;
  391. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  392. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  393. #if defined(ASE_FIXED_TESSELLATION)
  394. tf = FixedTess( tessValue );
  395. #elif defined(ASE_DISTANCE_TESSELLATION)
  396. tf = DistanceBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  397. #elif defined(ASE_LENGTH_TESSELLATION)
  398. tf = EdgeLengthBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  399. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  400. tf = EdgeLengthBasedTessCull(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  401. #endif
  402. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  403. return output;
  404. }
  405. [domain("tri")]
  406. [partitioning("fractional_odd")]
  407. [outputtopology("triangle_cw")]
  408. [patchconstantfunc("TessellationFunction")]
  409. [outputcontrolpoints(3)]
  410. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  411. {
  412. return patch[id];
  413. }
  414. [domain("tri")]
  415. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  416. {
  417. Attributes output = (Attributes) 0;
  418. output.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  419. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  420. output.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z;
  421. output.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  422. #if defined(ASE_PHONG_TESSELLATION)
  423. float3 pp[3];
  424. for (int i = 0; i < 3; ++i)
  425. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  426. float phongStrength = _TessPhongStrength;
  427. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  428. #endif
  429. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  430. return VertexFunction(output);
  431. }
  432. #else
  433. PackedVaryings vert ( Attributes input )
  434. {
  435. return VertexFunction( input );
  436. }
  437. #endif
  438. half4 frag ( PackedVaryings input
  439. #ifdef _WRITE_RENDERING_LAYERS
  440. , out float4 outRenderingLayers : SV_Target1
  441. #endif
  442. ) : SV_Target
  443. {
  444. UNITY_SETUP_INSTANCE_ID( input );
  445. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
  446. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  447. float3 WorldPosition = input.positionWS;
  448. #endif
  449. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  450. float4 ClipPos = input.clipPosV;
  451. float4 ScreenPos = ComputeScreenPos( input.clipPosV );
  452. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  453. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  454. ShadowCoords = input.shadowCoord;
  455. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  456. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  457. #endif
  458. #endif
  459. float4 ase_screenPosNorm = ScreenPos / ScreenPos.w;
  460. ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
  461. float screenDepth155 = LinearEyeDepth(SHADERGRAPH_SAMPLE_SCENE_DEPTH( ase_screenPosNorm.xy ),_ZBufferParams);
  462. float distanceDepth155 = saturate( abs( ( screenDepth155 - LinearEyeDepth( ase_screenPosNorm.z,_ZBufferParams ) ) / ( _DepthFadeAmount ) ) );
  463. Gradient gradient131 = NewGradient( 0, 5, 3, float4( 0, 0, 0, 0 ), float4( 1, 0.5159165, 0.3254902, 0.2 ), float4( 1, 0.9251295, 0.5417691, 0.6529488 ), float4( 1, 0.9982066, 0.5803922, 0.9029374 ), float4( 1, 1, 1, 1 ), 0, 0, 0, float2( 1, 0 ), float2( 1, 0.282353 ), float2( 1, 1 ), 0, 0, 0, 0, 0 );
  464. float2 appendResult47 = (float2(WorldPosition.x , WorldPosition.y));
  465. float2 temp_output_54_0 = ( appendResult47 * 0.1 );
  466. float2 texCoord124 = input.ase_texcoord4.xy * float2( 0.6,0.6 ) + float2( 0,0 );
  467. float2 panner127 = ( 0.3 * _Time.y * float2( 0.5,-2 ) + ( temp_output_54_0 + texCoord124 ));
  468. float4 tex2DNode128 = tex2D( _BlazeParticles, panner127 );
  469. float2 texCoord125 = input.ase_texcoord4.xy * float2( 0.5,0.5 ) + float2( 0.35,0.4 );
  470. float2 panner126 = ( 0.8 * _Time.y * float2( 0,-1 ) + ( temp_output_54_0 + texCoord125 ));
  471. float4 tex2DNode129 = tex2D( _BlazeParticles, panner126 );
  472. Gradient gradient109 = NewGradient( 0, 4, 3, float4( 0.1415094, 0.02096804, 0, 0 ), float4( 1, 0.5159165, 0.3254902, 0.3353018 ), float4( 1, 0.9982066, 0.5803922, 0.5882353 ), float4( 1, 1, 1, 1 ), 0, 0, 0, 0, float2( 1, 0 ), float2( 1, 0.282353 ), float2( 1, 1 ), 0, 0, 0, 0, 0 );
  473. float2 texCoord112 = input.ase_texcoord4.xy * float2( 0.6,0.6 ) + float2( 0,0 );
  474. float2 panner110 = ( 0.3 * _Time.y * float2( 0.5,-2 ) + ( temp_output_54_0 + texCoord112 ));
  475. float4 tex2DNode105 = tex2D( _FastFlame, panner110 );
  476. float2 texCoord116 = input.ase_texcoord4.xy * float2( 0.5,0.5 ) + float2( 0.35,0.4 );
  477. float2 panner114 = ( 0.8 * _Time.y * float2( 0,-1 ) + ( temp_output_54_0 + texCoord116 ));
  478. float4 tex2DNode106 = tex2D( _FastFlame, panner114 );
  479. Gradient gradient1 = NewGradient( 0, 4, 3, float4( 0.1415094, 0.02096804, 0, 0 ), float4( 1, 0.5159165, 0.3254902, 0.3353018 ), float4( 1, 0.9982066, 0.5803922, 0.5882353 ), float4( 1, 1, 1, 1 ), 0, 0, 0, 0, float2( 1, 0 ), float2( 1, 0.282353 ), float2( 1, 1 ), 0, 0, 0, 0, 0 );
  480. float2 appendResult5 = (float2(0.0 , -1.5));
  481. float2 texCoord7 = input.ase_texcoord4.xy * float2( 3,2 ) + float2( 0,0 );
  482. float2 panner13 = ( 1.0 * _Time.y * appendResult5 + ( temp_output_54_0 + ( 1.22 * texCoord7 ) ));
  483. float simplePerlin2D20 = snoise( panner13 );
  484. simplePerlin2D20 = simplePerlin2D20*0.5 + 0.5;
  485. float2 appendResult12 = (float2(0.0 , -1.0));
  486. float2 panner14 = ( 1.0 * _Time.y * appendResult12 + ( temp_output_54_0 + ( texCoord7 * 0.5 ) ));
  487. float simplePerlin2D21 = snoise( panner14 );
  488. simplePerlin2D21 = simplePerlin2D21*0.5 + 0.5;
  489. float2 texCoord61 = input.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  490. float2 appendResult56 = (float2(-_Flamespeed , -_Flamespeed));
  491. float2 texCoord49 = input.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  492. float2 panner57 = ( 1.0 * _Time.y * appendResult56 + ( temp_output_54_0 + ( texCoord49 * _NoiseScale ) ));
  493. float4 tex2DNode73 = tex2D( _BaseFlame, ( texCoord61 + ( texCoord61.y * ( (tex2D( _NoiseTexture, panner57 )).g - 0.2 ) * texCoord61.y ) ) );
  494. float4 blendOpSrc92 = saturate( ( SampleGradient( gradient109, ( tex2DNode105 + tex2DNode106 ).r ) + SampleGradient( gradient1, ( simplePerlin2D20 * simplePerlin2D21 ) ) ) );
  495. float4 blendOpDest92 = ( _Brightnessmultiply * ( ( _Color0 * tex2DNode73.r ) + ( _Color1 * tex2DNode73.g ) + ( tex2DNode73.b * _Color2 ) + ( tex2DNode73.a * _Color3 ) ) );
  496. float2 uv_AlphaMask90 = input.ase_texcoord4.xy;
  497. float4 tex2DNode90 = tex2D( _AlphaMask, uv_AlphaMask90 );
  498. float4 lerpBlendMode92 = lerp(blendOpDest92,(( blendOpDest92 > 0.5 ) ? ( 1.0 - 2.0 * ( 1.0 - blendOpDest92 ) * ( 1.0 - blendOpSrc92 ) ) : ( 2.0 * blendOpDest92 * blendOpSrc92 ) ),( 1.0 - tex2DNode90 ).r);
  499. float4 blendOpSrc139 = SampleGradient( gradient131, ( tex2DNode128 + tex2DNode129 ).r );
  500. float4 blendOpDest139 = ( saturate( lerpBlendMode92 ));
  501. float time140 = 0.0;
  502. float2 voronoiSmoothId140 = 0;
  503. float2 coords140 = input.ase_texcoord4.xy * 1.0;
  504. float2 id140 = 0;
  505. float2 uv140 = 0;
  506. float voroi140 = voronoi140( coords140, time140, id140, uv140, 0, voronoiSmoothId140 );
  507. float4 lerpBlendMode139 = lerp(blendOpDest139,( blendOpSrc139 + blendOpDest139 ),( tex2DNode90 + ( 6.2 * ( -0.88 + ( 1.0 - voroi140 ) ) ) ).r);
  508. float3 BakedAlbedo = 0;
  509. float3 BakedEmission = 0;
  510. float3 Color = ( distanceDepth155 * ( saturate( lerpBlendMode139 )) ).rgb;
  511. float Alpha = 1;
  512. float AlphaClipThreshold = 0.5;
  513. float AlphaClipThresholdShadow = 0.5;
  514. #ifdef _ALPHATEST_ON
  515. clip( Alpha - AlphaClipThreshold );
  516. #endif
  517. #if defined(_DBUFFER)
  518. ApplyDecalToBaseColor(input.positionCS, Color);
  519. #endif
  520. #ifdef LOD_FADE_CROSSFADE
  521. LODFadeCrossFade( input.positionCS );
  522. #endif
  523. #ifdef ASE_FOG
  524. Color = MixFog( Color, input.fogFactor );
  525. #endif
  526. #ifdef _WRITE_RENDERING_LAYERS
  527. uint renderingLayers = GetMeshRenderingLayer();
  528. outRenderingLayers = float4( EncodeMeshRenderingLayer( renderingLayers ), 0, 0, 0 );
  529. #endif
  530. return half4( Color, Alpha );
  531. }
  532. ENDHLSL
  533. }
  534. Pass
  535. {
  536. Name "DepthOnly"
  537. Tags { "LightMode"="DepthOnly" }
  538. ZWrite On
  539. ColorMask 0
  540. AlphaToMask Off
  541. HLSLPROGRAM
  542. #pragma multi_compile_local _ALPHATEST_ON
  543. #define _SURFACE_TYPE_TRANSPARENT 1
  544. #define ASE_VERSION 19701
  545. #define ASE_SRP_VERSION 170003
  546. #pragma vertex vert
  547. #pragma fragment frag
  548. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  549. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  550. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  551. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  552. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  553. #if defined(LOD_FADE_CROSSFADE)
  554. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  555. #endif
  556. #define ASE_NEEDS_VERT_POSITION
  557. #define ASE_NEEDS_VERT_NORMAL
  558. struct Attributes
  559. {
  560. float4 positionOS : POSITION;
  561. float3 normalOS : NORMAL;
  562. float4 ase_tangent : TANGENT;
  563. UNITY_VERTEX_INPUT_INSTANCE_ID
  564. };
  565. struct PackedVaryings
  566. {
  567. float4 positionCS : SV_POSITION;
  568. float4 clipPosV : TEXCOORD0;
  569. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  570. float3 positionWS : TEXCOORD1;
  571. #endif
  572. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  573. float4 shadowCoord : TEXCOORD2;
  574. #endif
  575. UNITY_VERTEX_INPUT_INSTANCE_ID
  576. UNITY_VERTEX_OUTPUT_STEREO
  577. };
  578. CBUFFER_START(UnityPerMaterial)
  579. float4 _Color0;
  580. float4 _Color1;
  581. float4 _Color2;
  582. float4 _Color3;
  583. float _DepthFadeAmount;
  584. float _Brightnessmultiply;
  585. float _Flamespeed;
  586. float _NoiseScale;
  587. #ifdef ASE_TESSELLATION
  588. float _TessPhongStrength;
  589. float _TessValue;
  590. float _TessMin;
  591. float _TessMax;
  592. float _TessEdgeLength;
  593. float _TessMaxDisp;
  594. #endif
  595. CBUFFER_END
  596. PackedVaryings VertexFunction( Attributes input )
  597. {
  598. PackedVaryings output = (PackedVaryings)0;
  599. UNITY_SETUP_INSTANCE_ID(input);
  600. UNITY_TRANSFER_INSTANCE_ID(input, output);
  601. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  602. //Calculate new billboard vertex position and normal;
  603. float3 upCamVec = normalize ( UNITY_MATRIX_V._m10_m11_m12 );
  604. float3 forwardCamVec = -normalize ( UNITY_MATRIX_V._m20_m21_m22 );
  605. float3 rightCamVec = normalize( UNITY_MATRIX_V._m00_m01_m02 );
  606. float4x4 rotationCamMatrix = float4x4( rightCamVec, 0, upCamVec, 0, forwardCamVec, 0, 0, 0, 0, 1 );
  607. input.normalOS = normalize( mul( float4( input.normalOS , 0 ), rotationCamMatrix )).xyz;
  608. input.ase_tangent.xyz = normalize( mul( float4( input.ase_tangent.xyz , 0 ), rotationCamMatrix )).xyz;
  609. input.positionOS.x *= length( GetObjectToWorldMatrix()._m00_m10_m20 );
  610. input.positionOS.y *= length( GetObjectToWorldMatrix()._m01_m11_m21 );
  611. input.positionOS.z *= length( GetObjectToWorldMatrix()._m02_m12_m22 );
  612. input.positionOS = mul( input.positionOS, rotationCamMatrix );
  613. input.positionOS = mul( GetWorldToObjectMatrix(), float4( input.positionOS.xyz, 0 ) );
  614. #ifdef ASE_ABSOLUTE_VERTEX_POS
  615. float3 defaultVertexValue = input.positionOS.xyz;
  616. #else
  617. float3 defaultVertexValue = float3(0, 0, 0);
  618. #endif
  619. float3 vertexValue = 0;
  620. #ifdef ASE_ABSOLUTE_VERTEX_POS
  621. input.positionOS.xyz = vertexValue;
  622. #else
  623. input.positionOS.xyz += vertexValue;
  624. #endif
  625. input.normalOS = input.normalOS;
  626. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  627. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  628. output.positionWS = vertexInput.positionWS;
  629. #endif
  630. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  631. output.shadowCoord = GetShadowCoord( vertexInput );
  632. #endif
  633. output.positionCS = vertexInput.positionCS;
  634. output.clipPosV = vertexInput.positionCS;
  635. return output;
  636. }
  637. #if defined(ASE_TESSELLATION)
  638. struct VertexControl
  639. {
  640. float4 vertex : INTERNALTESSPOS;
  641. float3 normalOS : NORMAL;
  642. float4 ase_tangent : TANGENT;
  643. UNITY_VERTEX_INPUT_INSTANCE_ID
  644. };
  645. struct TessellationFactors
  646. {
  647. float edge[3] : SV_TessFactor;
  648. float inside : SV_InsideTessFactor;
  649. };
  650. VertexControl vert ( Attributes input )
  651. {
  652. VertexControl output;
  653. UNITY_SETUP_INSTANCE_ID(input);
  654. UNITY_TRANSFER_INSTANCE_ID(input, output);
  655. output.vertex = input.positionOS;
  656. output.normalOS = input.normalOS;
  657. output.ase_tangent = input.ase_tangent;
  658. return output;
  659. }
  660. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  661. {
  662. TessellationFactors output;
  663. float4 tf = 1;
  664. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  665. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  666. #if defined(ASE_FIXED_TESSELLATION)
  667. tf = FixedTess( tessValue );
  668. #elif defined(ASE_DISTANCE_TESSELLATION)
  669. tf = DistanceBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  670. #elif defined(ASE_LENGTH_TESSELLATION)
  671. tf = EdgeLengthBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  672. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  673. tf = EdgeLengthBasedTessCull(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  674. #endif
  675. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  676. return output;
  677. }
  678. [domain("tri")]
  679. [partitioning("fractional_odd")]
  680. [outputtopology("triangle_cw")]
  681. [patchconstantfunc("TessellationFunction")]
  682. [outputcontrolpoints(3)]
  683. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  684. {
  685. return patch[id];
  686. }
  687. [domain("tri")]
  688. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  689. {
  690. Attributes output = (Attributes) 0;
  691. output.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  692. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  693. output.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z;
  694. #if defined(ASE_PHONG_TESSELLATION)
  695. float3 pp[3];
  696. for (int i = 0; i < 3; ++i)
  697. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  698. float phongStrength = _TessPhongStrength;
  699. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  700. #endif
  701. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  702. return VertexFunction(output);
  703. }
  704. #else
  705. PackedVaryings vert ( Attributes input )
  706. {
  707. return VertexFunction( input );
  708. }
  709. #endif
  710. half4 frag(PackedVaryings input ) : SV_TARGET
  711. {
  712. UNITY_SETUP_INSTANCE_ID(input);
  713. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
  714. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  715. float3 WorldPosition = input.positionWS;
  716. #endif
  717. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  718. float4 ClipPos = input.clipPosV;
  719. float4 ScreenPos = ComputeScreenPos( input.clipPosV );
  720. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  721. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  722. ShadowCoords = input.shadowCoord;
  723. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  724. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  725. #endif
  726. #endif
  727. float Alpha = 1;
  728. float AlphaClipThreshold = 0.5;
  729. #ifdef _ALPHATEST_ON
  730. clip(Alpha - AlphaClipThreshold);
  731. #endif
  732. #ifdef LOD_FADE_CROSSFADE
  733. LODFadeCrossFade( input.positionCS );
  734. #endif
  735. return 0;
  736. }
  737. ENDHLSL
  738. }
  739. Pass
  740. {
  741. Name "SceneSelectionPass"
  742. Tags { "LightMode"="SceneSelectionPass" }
  743. Cull Off
  744. AlphaToMask Off
  745. HLSLPROGRAM
  746. #pragma multi_compile_local _ALPHATEST_ON
  747. #define _SURFACE_TYPE_TRANSPARENT 1
  748. #define ASE_VERSION 19701
  749. #define ASE_SRP_VERSION 170003
  750. #pragma vertex vert
  751. #pragma fragment frag
  752. #define ATTRIBUTES_NEED_NORMAL
  753. #define ATTRIBUTES_NEED_TANGENT
  754. #define SHADERPASS SHADERPASS_DEPTHONLY
  755. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  756. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  757. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  758. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  759. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  760. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  761. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  762. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  763. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
  764. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  765. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  766. #define ASE_NEEDS_VERT_POSITION
  767. #define ASE_NEEDS_VERT_NORMAL
  768. struct Attributes
  769. {
  770. float4 positionOS : POSITION;
  771. float3 normalOS : NORMAL;
  772. float4 ase_tangent : TANGENT;
  773. UNITY_VERTEX_INPUT_INSTANCE_ID
  774. };
  775. struct PackedVaryings
  776. {
  777. float4 positionCS : SV_POSITION;
  778. UNITY_VERTEX_INPUT_INSTANCE_ID
  779. UNITY_VERTEX_OUTPUT_STEREO
  780. };
  781. CBUFFER_START(UnityPerMaterial)
  782. float4 _Color0;
  783. float4 _Color1;
  784. float4 _Color2;
  785. float4 _Color3;
  786. float _DepthFadeAmount;
  787. float _Brightnessmultiply;
  788. float _Flamespeed;
  789. float _NoiseScale;
  790. #ifdef ASE_TESSELLATION
  791. float _TessPhongStrength;
  792. float _TessValue;
  793. float _TessMin;
  794. float _TessMax;
  795. float _TessEdgeLength;
  796. float _TessMaxDisp;
  797. #endif
  798. CBUFFER_END
  799. int _ObjectId;
  800. int _PassValue;
  801. struct SurfaceDescription
  802. {
  803. float Alpha;
  804. float AlphaClipThreshold;
  805. };
  806. PackedVaryings VertexFunction(Attributes input )
  807. {
  808. PackedVaryings output;
  809. ZERO_INITIALIZE(PackedVaryings, output);
  810. UNITY_SETUP_INSTANCE_ID(input);
  811. UNITY_TRANSFER_INSTANCE_ID(input, output);
  812. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  813. //Calculate new billboard vertex position and normal;
  814. float3 upCamVec = normalize ( UNITY_MATRIX_V._m10_m11_m12 );
  815. float3 forwardCamVec = -normalize ( UNITY_MATRIX_V._m20_m21_m22 );
  816. float3 rightCamVec = normalize( UNITY_MATRIX_V._m00_m01_m02 );
  817. float4x4 rotationCamMatrix = float4x4( rightCamVec, 0, upCamVec, 0, forwardCamVec, 0, 0, 0, 0, 1 );
  818. input.normalOS = normalize( mul( float4( input.normalOS , 0 ), rotationCamMatrix )).xyz;
  819. input.ase_tangent.xyz = normalize( mul( float4( input.ase_tangent.xyz , 0 ), rotationCamMatrix )).xyz;
  820. input.positionOS.x *= length( GetObjectToWorldMatrix()._m00_m10_m20 );
  821. input.positionOS.y *= length( GetObjectToWorldMatrix()._m01_m11_m21 );
  822. input.positionOS.z *= length( GetObjectToWorldMatrix()._m02_m12_m22 );
  823. input.positionOS = mul( input.positionOS, rotationCamMatrix );
  824. input.positionOS = mul( GetWorldToObjectMatrix(), float4( input.positionOS.xyz, 0 ) );
  825. #ifdef ASE_ABSOLUTE_VERTEX_POS
  826. float3 defaultVertexValue = input.positionOS.xyz;
  827. #else
  828. float3 defaultVertexValue = float3(0, 0, 0);
  829. #endif
  830. float3 vertexValue = 0;
  831. #ifdef ASE_ABSOLUTE_VERTEX_POS
  832. input.positionOS.xyz = vertexValue;
  833. #else
  834. input.positionOS.xyz += vertexValue;
  835. #endif
  836. input.normalOS = input.normalOS;
  837. float3 positionWS = TransformObjectToWorld( input.positionOS.xyz );
  838. output.positionCS = TransformWorldToHClip(positionWS);
  839. return output;
  840. }
  841. #if defined(ASE_TESSELLATION)
  842. struct VertexControl
  843. {
  844. float4 vertex : INTERNALTESSPOS;
  845. float3 normalOS : NORMAL;
  846. float4 ase_tangent : TANGENT;
  847. UNITY_VERTEX_INPUT_INSTANCE_ID
  848. };
  849. struct TessellationFactors
  850. {
  851. float edge[3] : SV_TessFactor;
  852. float inside : SV_InsideTessFactor;
  853. };
  854. VertexControl vert ( Attributes input )
  855. {
  856. VertexControl output;
  857. UNITY_SETUP_INSTANCE_ID(input);
  858. UNITY_TRANSFER_INSTANCE_ID(input, output);
  859. output.vertex = input.positionOS;
  860. output.normalOS = input.normalOS;
  861. output.ase_tangent = input.ase_tangent;
  862. return output;
  863. }
  864. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  865. {
  866. TessellationFactors output;
  867. float4 tf = 1;
  868. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  869. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  870. #if defined(ASE_FIXED_TESSELLATION)
  871. tf = FixedTess( tessValue );
  872. #elif defined(ASE_DISTANCE_TESSELLATION)
  873. tf = DistanceBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  874. #elif defined(ASE_LENGTH_TESSELLATION)
  875. tf = EdgeLengthBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  876. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  877. tf = EdgeLengthBasedTessCull(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  878. #endif
  879. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  880. return output;
  881. }
  882. [domain("tri")]
  883. [partitioning("fractional_odd")]
  884. [outputtopology("triangle_cw")]
  885. [patchconstantfunc("TessellationFunction")]
  886. [outputcontrolpoints(3)]
  887. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  888. {
  889. return patch[id];
  890. }
  891. [domain("tri")]
  892. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  893. {
  894. Attributes output = (Attributes) 0;
  895. output.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  896. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  897. output.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z;
  898. #if defined(ASE_PHONG_TESSELLATION)
  899. float3 pp[3];
  900. for (int i = 0; i < 3; ++i)
  901. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  902. float phongStrength = _TessPhongStrength;
  903. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  904. #endif
  905. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  906. return VertexFunction(output);
  907. }
  908. #else
  909. PackedVaryings vert ( Attributes input )
  910. {
  911. return VertexFunction( input );
  912. }
  913. #endif
  914. half4 frag(PackedVaryings input ) : SV_TARGET
  915. {
  916. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  917. surfaceDescription.Alpha = 1;
  918. surfaceDescription.AlphaClipThreshold = 0.5;
  919. #if _ALPHATEST_ON
  920. float alphaClipThreshold = 0.01f;
  921. #if ALPHA_CLIP_THRESHOLD
  922. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  923. #endif
  924. clip(surfaceDescription.Alpha - alphaClipThreshold);
  925. #endif
  926. half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  927. return outColor;
  928. }
  929. ENDHLSL
  930. }
  931. Pass
  932. {
  933. Name "ScenePickingPass"
  934. Tags { "LightMode"="Picking" }
  935. AlphaToMask Off
  936. HLSLPROGRAM
  937. #pragma multi_compile_local _ALPHATEST_ON
  938. #define _SURFACE_TYPE_TRANSPARENT 1
  939. #define ASE_VERSION 19701
  940. #define ASE_SRP_VERSION 170003
  941. #pragma vertex vert
  942. #pragma fragment frag
  943. #define ATTRIBUTES_NEED_NORMAL
  944. #define ATTRIBUTES_NEED_TANGENT
  945. #define SHADERPASS SHADERPASS_DEPTHONLY
  946. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  947. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  948. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  949. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  950. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  951. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  952. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  953. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  954. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
  955. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  956. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  957. #if defined(LOD_FADE_CROSSFADE)
  958. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  959. #endif
  960. #define ASE_NEEDS_VERT_POSITION
  961. #define ASE_NEEDS_VERT_NORMAL
  962. struct Attributes
  963. {
  964. float4 positionOS : POSITION;
  965. float3 normalOS : NORMAL;
  966. float4 ase_tangent : TANGENT;
  967. UNITY_VERTEX_INPUT_INSTANCE_ID
  968. };
  969. struct PackedVaryings
  970. {
  971. float4 positionCS : SV_POSITION;
  972. UNITY_VERTEX_INPUT_INSTANCE_ID
  973. UNITY_VERTEX_OUTPUT_STEREO
  974. };
  975. CBUFFER_START(UnityPerMaterial)
  976. float4 _Color0;
  977. float4 _Color1;
  978. float4 _Color2;
  979. float4 _Color3;
  980. float _DepthFadeAmount;
  981. float _Brightnessmultiply;
  982. float _Flamespeed;
  983. float _NoiseScale;
  984. #ifdef ASE_TESSELLATION
  985. float _TessPhongStrength;
  986. float _TessValue;
  987. float _TessMin;
  988. float _TessMax;
  989. float _TessEdgeLength;
  990. float _TessMaxDisp;
  991. #endif
  992. CBUFFER_END
  993. float4 _SelectionID;
  994. struct SurfaceDescription
  995. {
  996. float Alpha;
  997. float AlphaClipThreshold;
  998. };
  999. PackedVaryings VertexFunction(Attributes input )
  1000. {
  1001. PackedVaryings output;
  1002. ZERO_INITIALIZE(PackedVaryings, output);
  1003. UNITY_SETUP_INSTANCE_ID(input);
  1004. UNITY_TRANSFER_INSTANCE_ID(input, output);
  1005. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  1006. //Calculate new billboard vertex position and normal;
  1007. float3 upCamVec = normalize ( UNITY_MATRIX_V._m10_m11_m12 );
  1008. float3 forwardCamVec = -normalize ( UNITY_MATRIX_V._m20_m21_m22 );
  1009. float3 rightCamVec = normalize( UNITY_MATRIX_V._m00_m01_m02 );
  1010. float4x4 rotationCamMatrix = float4x4( rightCamVec, 0, upCamVec, 0, forwardCamVec, 0, 0, 0, 0, 1 );
  1011. input.normalOS = normalize( mul( float4( input.normalOS , 0 ), rotationCamMatrix )).xyz;
  1012. input.ase_tangent.xyz = normalize( mul( float4( input.ase_tangent.xyz , 0 ), rotationCamMatrix )).xyz;
  1013. input.positionOS.x *= length( GetObjectToWorldMatrix()._m00_m10_m20 );
  1014. input.positionOS.y *= length( GetObjectToWorldMatrix()._m01_m11_m21 );
  1015. input.positionOS.z *= length( GetObjectToWorldMatrix()._m02_m12_m22 );
  1016. input.positionOS = mul( input.positionOS, rotationCamMatrix );
  1017. input.positionOS = mul( GetWorldToObjectMatrix(), float4( input.positionOS.xyz, 0 ) );
  1018. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1019. float3 defaultVertexValue = input.positionOS.xyz;
  1020. #else
  1021. float3 defaultVertexValue = float3(0, 0, 0);
  1022. #endif
  1023. float3 vertexValue = 0;
  1024. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1025. input.positionOS.xyz = vertexValue;
  1026. #else
  1027. input.positionOS.xyz += vertexValue;
  1028. #endif
  1029. input.normalOS = input.normalOS;
  1030. float3 positionWS = TransformObjectToWorld( input.positionOS.xyz );
  1031. output.positionCS = TransformWorldToHClip(positionWS);
  1032. return output;
  1033. }
  1034. #if defined(ASE_TESSELLATION)
  1035. struct VertexControl
  1036. {
  1037. float4 vertex : INTERNALTESSPOS;
  1038. float3 normalOS : NORMAL;
  1039. float4 ase_tangent : TANGENT;
  1040. UNITY_VERTEX_INPUT_INSTANCE_ID
  1041. };
  1042. struct TessellationFactors
  1043. {
  1044. float edge[3] : SV_TessFactor;
  1045. float inside : SV_InsideTessFactor;
  1046. };
  1047. VertexControl vert ( Attributes input )
  1048. {
  1049. VertexControl output;
  1050. UNITY_SETUP_INSTANCE_ID(input);
  1051. UNITY_TRANSFER_INSTANCE_ID(input, output);
  1052. output.vertex = input.positionOS;
  1053. output.normalOS = input.normalOS;
  1054. output.ase_tangent = input.ase_tangent;
  1055. return output;
  1056. }
  1057. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  1058. {
  1059. TessellationFactors output;
  1060. float4 tf = 1;
  1061. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1062. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1063. #if defined(ASE_FIXED_TESSELLATION)
  1064. tf = FixedTess( tessValue );
  1065. #elif defined(ASE_DISTANCE_TESSELLATION)
  1066. tf = DistanceBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1067. #elif defined(ASE_LENGTH_TESSELLATION)
  1068. tf = EdgeLengthBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1069. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1070. tf = EdgeLengthBasedTessCull(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1071. #endif
  1072. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  1073. return output;
  1074. }
  1075. [domain("tri")]
  1076. [partitioning("fractional_odd")]
  1077. [outputtopology("triangle_cw")]
  1078. [patchconstantfunc("TessellationFunction")]
  1079. [outputcontrolpoints(3)]
  1080. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1081. {
  1082. return patch[id];
  1083. }
  1084. [domain("tri")]
  1085. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1086. {
  1087. Attributes output = (Attributes) 0;
  1088. output.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1089. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  1090. output.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z;
  1091. #if defined(ASE_PHONG_TESSELLATION)
  1092. float3 pp[3];
  1093. for (int i = 0; i < 3; ++i)
  1094. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  1095. float phongStrength = _TessPhongStrength;
  1096. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  1097. #endif
  1098. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  1099. return VertexFunction(output);
  1100. }
  1101. #else
  1102. PackedVaryings vert ( Attributes input )
  1103. {
  1104. return VertexFunction( input );
  1105. }
  1106. #endif
  1107. half4 frag(PackedVaryings input ) : SV_TARGET
  1108. {
  1109. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1110. surfaceDescription.Alpha = 1;
  1111. surfaceDescription.AlphaClipThreshold = 0.5;
  1112. #if _ALPHATEST_ON
  1113. float alphaClipThreshold = 0.01f;
  1114. #if ALPHA_CLIP_THRESHOLD
  1115. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1116. #endif
  1117. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1118. #endif
  1119. half4 outColor = 0;
  1120. outColor = _SelectionID;
  1121. return outColor;
  1122. }
  1123. ENDHLSL
  1124. }
  1125. Pass
  1126. {
  1127. Name "DepthNormals"
  1128. Tags { "LightMode"="DepthNormalsOnly" }
  1129. ZTest LEqual
  1130. ZWrite On
  1131. HLSLPROGRAM
  1132. #pragma multi_compile_local _ALPHATEST_ON
  1133. #define _SURFACE_TYPE_TRANSPARENT 1
  1134. #define ASE_VERSION 19701
  1135. #define ASE_SRP_VERSION 170003
  1136. #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT
  1137. #pragma vertex vert
  1138. #pragma fragment frag
  1139. #define ATTRIBUTES_NEED_NORMAL
  1140. #define ATTRIBUTES_NEED_TANGENT
  1141. #define VARYINGS_NEED_NORMAL_WS
  1142. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1143. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  1144. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  1145. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1146. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1147. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1148. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1149. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1150. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  1151. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
  1152. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1153. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1154. #if defined(LOD_FADE_CROSSFADE)
  1155. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  1156. #endif
  1157. #define ASE_NEEDS_VERT_POSITION
  1158. #define ASE_NEEDS_VERT_NORMAL
  1159. struct Attributes
  1160. {
  1161. float4 positionOS : POSITION;
  1162. float3 normalOS : NORMAL;
  1163. float4 ase_tangent : TANGENT;
  1164. UNITY_VERTEX_INPUT_INSTANCE_ID
  1165. };
  1166. struct PackedVaryings
  1167. {
  1168. float4 positionCS : SV_POSITION;
  1169. float4 clipPosV : TEXCOORD0;
  1170. float3 normalWS : TEXCOORD1;
  1171. UNITY_VERTEX_INPUT_INSTANCE_ID
  1172. UNITY_VERTEX_OUTPUT_STEREO
  1173. };
  1174. CBUFFER_START(UnityPerMaterial)
  1175. float4 _Color0;
  1176. float4 _Color1;
  1177. float4 _Color2;
  1178. float4 _Color3;
  1179. float _DepthFadeAmount;
  1180. float _Brightnessmultiply;
  1181. float _Flamespeed;
  1182. float _NoiseScale;
  1183. #ifdef ASE_TESSELLATION
  1184. float _TessPhongStrength;
  1185. float _TessValue;
  1186. float _TessMin;
  1187. float _TessMax;
  1188. float _TessEdgeLength;
  1189. float _TessMaxDisp;
  1190. #endif
  1191. CBUFFER_END
  1192. struct SurfaceDescription
  1193. {
  1194. float Alpha;
  1195. float AlphaClipThreshold;
  1196. };
  1197. PackedVaryings VertexFunction(Attributes input )
  1198. {
  1199. PackedVaryings output;
  1200. ZERO_INITIALIZE(PackedVaryings, output);
  1201. UNITY_SETUP_INSTANCE_ID(input);
  1202. UNITY_TRANSFER_INSTANCE_ID(input, output);
  1203. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  1204. //Calculate new billboard vertex position and normal;
  1205. float3 upCamVec = normalize ( UNITY_MATRIX_V._m10_m11_m12 );
  1206. float3 forwardCamVec = -normalize ( UNITY_MATRIX_V._m20_m21_m22 );
  1207. float3 rightCamVec = normalize( UNITY_MATRIX_V._m00_m01_m02 );
  1208. float4x4 rotationCamMatrix = float4x4( rightCamVec, 0, upCamVec, 0, forwardCamVec, 0, 0, 0, 0, 1 );
  1209. input.normalOS = normalize( mul( float4( input.normalOS , 0 ), rotationCamMatrix )).xyz;
  1210. input.ase_tangent.xyz = normalize( mul( float4( input.ase_tangent.xyz , 0 ), rotationCamMatrix )).xyz;
  1211. input.positionOS.x *= length( GetObjectToWorldMatrix()._m00_m10_m20 );
  1212. input.positionOS.y *= length( GetObjectToWorldMatrix()._m01_m11_m21 );
  1213. input.positionOS.z *= length( GetObjectToWorldMatrix()._m02_m12_m22 );
  1214. input.positionOS = mul( input.positionOS, rotationCamMatrix );
  1215. input.positionOS = mul( GetWorldToObjectMatrix(), float4( input.positionOS.xyz, 0 ) );
  1216. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1217. float3 defaultVertexValue = input.positionOS.xyz;
  1218. #else
  1219. float3 defaultVertexValue = float3(0, 0, 0);
  1220. #endif
  1221. float3 vertexValue = 0;
  1222. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1223. input.positionOS.xyz = vertexValue;
  1224. #else
  1225. input.positionOS.xyz += vertexValue;
  1226. #endif
  1227. input.normalOS = input.normalOS;
  1228. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  1229. output.positionCS = vertexInput.positionCS;
  1230. output.clipPosV = vertexInput.positionCS;
  1231. output.normalWS = TransformObjectToWorldNormal( input.normalOS );
  1232. return output;
  1233. }
  1234. #if defined(ASE_TESSELLATION)
  1235. struct VertexControl
  1236. {
  1237. float4 vertex : INTERNALTESSPOS;
  1238. float3 normalOS : NORMAL;
  1239. float4 ase_tangent : TANGENT;
  1240. UNITY_VERTEX_INPUT_INSTANCE_ID
  1241. };
  1242. struct TessellationFactors
  1243. {
  1244. float edge[3] : SV_TessFactor;
  1245. float inside : SV_InsideTessFactor;
  1246. };
  1247. VertexControl vert ( Attributes input )
  1248. {
  1249. VertexControl output;
  1250. UNITY_SETUP_INSTANCE_ID(input);
  1251. UNITY_TRANSFER_INSTANCE_ID(input, output);
  1252. output.vertex = input.positionOS;
  1253. output.normalOS = input.normalOS;
  1254. output.ase_tangent = input.ase_tangent;
  1255. return output;
  1256. }
  1257. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> input)
  1258. {
  1259. TessellationFactors output;
  1260. float4 tf = 1;
  1261. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1262. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1263. #if defined(ASE_FIXED_TESSELLATION)
  1264. tf = FixedTess( tessValue );
  1265. #elif defined(ASE_DISTANCE_TESSELLATION)
  1266. tf = DistanceBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1267. #elif defined(ASE_LENGTH_TESSELLATION)
  1268. tf = EdgeLengthBasedTess(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1269. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1270. tf = EdgeLengthBasedTessCull(input[0].vertex, input[1].vertex, input[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1271. #endif
  1272. output.edge[0] = tf.x; output.edge[1] = tf.y; output.edge[2] = tf.z; output.inside = tf.w;
  1273. return output;
  1274. }
  1275. [domain("tri")]
  1276. [partitioning("fractional_odd")]
  1277. [outputtopology("triangle_cw")]
  1278. [patchconstantfunc("TessellationFunction")]
  1279. [outputcontrolpoints(3)]
  1280. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1281. {
  1282. return patch[id];
  1283. }
  1284. [domain("tri")]
  1285. PackedVaryings DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1286. {
  1287. Attributes output = (Attributes) 0;
  1288. output.positionOS = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1289. output.normalOS = patch[0].normalOS * bary.x + patch[1].normalOS * bary.y + patch[2].normalOS * bary.z;
  1290. output.ase_tangent = patch[0].ase_tangent * bary.x + patch[1].ase_tangent * bary.y + patch[2].ase_tangent * bary.z;
  1291. #if defined(ASE_PHONG_TESSELLATION)
  1292. float3 pp[3];
  1293. for (int i = 0; i < 3; ++i)
  1294. pp[i] = output.positionOS.xyz - patch[i].normalOS * (dot(output.positionOS.xyz, patch[i].normalOS) - dot(patch[i].vertex.xyz, patch[i].normalOS));
  1295. float phongStrength = _TessPhongStrength;
  1296. output.positionOS.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * output.positionOS.xyz;
  1297. #endif
  1298. UNITY_TRANSFER_INSTANCE_ID(patch[0], output);
  1299. return VertexFunction(output);
  1300. }
  1301. #else
  1302. PackedVaryings vert ( Attributes input )
  1303. {
  1304. return VertexFunction( input );
  1305. }
  1306. #endif
  1307. void frag( PackedVaryings input
  1308. , out half4 outNormalWS : SV_Target0
  1309. #ifdef _WRITE_RENDERING_LAYERS
  1310. , out float4 outRenderingLayers : SV_Target1
  1311. #endif
  1312. )
  1313. {
  1314. float4 ClipPos = input.clipPosV;
  1315. float4 ScreenPos = ComputeScreenPos( input.clipPosV );
  1316. float Alpha = 1;
  1317. float AlphaClipThreshold = 0.5;
  1318. #if _ALPHATEST_ON
  1319. clip( Alpha - AlphaClipThreshold );
  1320. #endif
  1321. #ifdef LOD_FADE_CROSSFADE
  1322. LODFadeCrossFade( input.positionCS );
  1323. #endif
  1324. #if defined(_GBUFFER_NORMALS_OCT)
  1325. float3 normalWS = normalize(input.normalWS);
  1326. float2 octNormalWS = PackNormalOctQuadEncode(normalWS); // values between [-1, +1], must use fp32 on some platforms
  1327. float2 remappedOctNormalWS = saturate(octNormalWS * 0.5 + 0.5); // values between [ 0, 1]
  1328. half3 packedNormalWS = PackFloat2To888(remappedOctNormalWS); // values between [ 0, 1]
  1329. outNormalWS = half4(packedNormalWS, 0.0);
  1330. #else
  1331. float3 normalWS = input.normalWS;
  1332. outNormalWS = half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1333. #endif
  1334. #ifdef _WRITE_RENDERING_LAYERS
  1335. uint renderingLayers = GetMeshRenderingLayer();
  1336. outRenderingLayers = float4(EncodeMeshRenderingLayer(renderingLayers), 0, 0, 0);
  1337. #endif
  1338. }
  1339. ENDHLSL
  1340. }
  1341. Pass
  1342. {
  1343. Name "MotionVectors"
  1344. Tags { "LightMode"="MotionVectors" }
  1345. ColorMask RG
  1346. HLSLPROGRAM
  1347. #pragma multi_compile_local _ALPHATEST_ON
  1348. #define _SURFACE_TYPE_TRANSPARENT 1
  1349. #define ASE_VERSION 19701
  1350. #define ASE_SRP_VERSION 170003
  1351. #pragma vertex vert
  1352. #pragma fragment frag
  1353. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DOTS.hlsl"
  1354. #include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/RenderingLayers.hlsl"
  1355. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1356. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1357. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1358. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1359. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  1360. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1361. #include_with_pragmas "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRenderingKeywords.hlsl"
  1362. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/FoveatedRendering.hlsl"
  1363. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1364. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1365. #if defined(LOD_FADE_CROSSFADE)
  1366. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/LODCrossFade.hlsl"
  1367. #endif
  1368. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/MotionVectorsCommon.hlsl"
  1369. struct Attributes
  1370. {
  1371. float4 positionOS : POSITION;
  1372. float3 positionOld : TEXCOORD4;
  1373. #if _ADD_PRECOMPUTED_VELOCITY
  1374. float3 alembicMotionVector : TEXCOORD5;
  1375. #endif
  1376. UNITY_VERTEX_INPUT_INSTANCE_ID
  1377. };
  1378. struct PackedVaryings
  1379. {
  1380. float4 positionCS : SV_POSITION;
  1381. float4 positionCSNoJitter : TEXCOORD0;
  1382. float4 previousPositionCSNoJitter : TEXCOORD1;
  1383. UNITY_VERTEX_INPUT_INSTANCE_ID
  1384. UNITY_VERTEX_OUTPUT_STEREO
  1385. };
  1386. CBUFFER_START(UnityPerMaterial)
  1387. float4 _Color0;
  1388. float4 _Color1;
  1389. float4 _Color2;
  1390. float4 _Color3;
  1391. float _DepthFadeAmount;
  1392. float _Brightnessmultiply;
  1393. float _Flamespeed;
  1394. float _NoiseScale;
  1395. #ifdef ASE_TRANSMISSION
  1396. float _TransmissionShadow;
  1397. #endif
  1398. #ifdef ASE_TRANSLUCENCY
  1399. float _TransStrength;
  1400. float _TransNormal;
  1401. float _TransScattering;
  1402. float _TransDirect;
  1403. float _TransAmbient;
  1404. float _TransShadow;
  1405. #endif
  1406. #ifdef ASE_TESSELLATION
  1407. float _TessPhongStrength;
  1408. float _TessValue;
  1409. float _TessMin;
  1410. float _TessMax;
  1411. float _TessEdgeLength;
  1412. float _TessMaxDisp;
  1413. #endif
  1414. CBUFFER_END
  1415. #ifdef SCENEPICKINGPASS
  1416. float4 _SelectionID;
  1417. #endif
  1418. #ifdef SCENESELECTIONPASS
  1419. int _ObjectId;
  1420. int _PassValue;
  1421. #endif
  1422. PackedVaryings VertexFunction( Attributes input )
  1423. {
  1424. PackedVaryings output = (PackedVaryings)0;
  1425. UNITY_SETUP_INSTANCE_ID(input);
  1426. UNITY_TRANSFER_INSTANCE_ID(input, output);
  1427. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output);
  1428. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1429. float3 defaultVertexValue = input.positionOS.xyz;
  1430. #else
  1431. float3 defaultVertexValue = float3(0, 0, 0);
  1432. #endif
  1433. float3 vertexValue = defaultVertexValue;
  1434. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1435. input.positionOS.xyz = vertexValue;
  1436. #else
  1437. input.positionOS.xyz += vertexValue;
  1438. #endif
  1439. VertexPositionInputs vertexInput = GetVertexPositionInputs( input.positionOS.xyz );
  1440. // Jittered. Match the frame.
  1441. output.positionCS = vertexInput.positionCS;
  1442. output.positionCSNoJitter = mul( _NonJitteredViewProjMatrix, mul( UNITY_MATRIX_M, input.positionOS ) );
  1443. float4 prevPos = ( unity_MotionVectorsParams.x == 1 ) ? float4( input.positionOld, 1 ) : input.positionOS;
  1444. #if _ADD_PRECOMPUTED_VELOCITY
  1445. prevPos = prevPos - float4(input.alembicMotionVector, 0);
  1446. #endif
  1447. output.previousPositionCSNoJitter = mul( _PrevViewProjMatrix, mul( UNITY_PREV_MATRIX_M, prevPos ) );
  1448. return output;
  1449. }
  1450. PackedVaryings vert ( Attributes input )
  1451. {
  1452. return VertexFunction( input );
  1453. }
  1454. half4 frag( PackedVaryings input ) : SV_Target
  1455. {
  1456. UNITY_SETUP_INSTANCE_ID(input);
  1457. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( input );
  1458. float Alpha = 1;
  1459. float AlphaClipThreshold = 0.5;
  1460. #ifdef _ALPHATEST_ON
  1461. clip(Alpha - AlphaClipThreshold);
  1462. #endif
  1463. #ifdef LOD_FADE_CROSSFADE
  1464. LODFadeCrossFade( input.positionCS );
  1465. #endif
  1466. return float4( CalcNdcMotionVectorFromCsPositions( input.positionCSNoJitter, input.previousPositionCSNoJitter ), 0, 0 );
  1467. }
  1468. ENDHLSL
  1469. }
  1470. }
  1471. CustomEditor "UnityEditor.ShaderGraphUnlitGUI"
  1472. FallBack "Hidden/Shader Graph/FallbackError"
  1473. Fallback Off
  1474. }
  1475. /*ASEBEGIN
  1476. Version=19701
  1477. Node;AmplifyShaderEditor.CommentaryNode;81;-3072.893,944.1064;Inherit;False;3305.431;1216.579;Comment;23;79;78;80;73;61;65;62;59;58;57;55;56;52;53;49;51;50;60;67;66;63;64;45;Base Flame;1,1,1,1;0;0
  1478. Node;AmplifyShaderEditor.CommentaryNode;66;-762.2827,1883.056;Inherit;False;526.0117;261.1976;Blue;2;74;70;;0,0.1724138,1,1;0;0
  1479. Node;AmplifyShaderEditor.CommentaryNode;67;-723.4177,1050.806;Inherit;False;457.4534;257;R core col;2;75;68;;1,0,0,1;0;0
  1480. Node;AmplifyShaderEditor.CommentaryNode;64;-757.8022,1613.511;Inherit;False;526.0117;261.1976;Blue;2;76;72;;0,0.1724138,1,1;0;0
  1481. Node;AmplifyShaderEditor.CommentaryNode;123;-2421.244,-1594.994;Inherit;False;1977.936;729.7361;Blaze Particles;12;133;132;131;130;129;128;127;126;125;124;152;153;Blaze Particles;1,1,1,1;0;0
  1482. Node;AmplifyShaderEditor.CommentaryNode;121;-2419.758,-785.2353;Inherit;False;1977.936;729.7361;Fast Flame;12;108;112;116;110;114;106;105;109;115;107;148;149;Fast Flame;1,1,1,1;0;0
  1483. Node;AmplifyShaderEditor.CommentaryNode;104;-2426.847,16.08857;Inherit;False;2036.451;781.509;Flame Animation 2;21;103;4;8;7;3;6;11;9;5;101;100;12;14;13;20;21;22;1;88;90;95;Slow Flame;1,1,1,1;0;0
  1484. Node;AmplifyShaderEditor.CommentaryNode;63;-730.3889,1323.744;Inherit;False;475.6421;280.942;Green;2;77;69;;0,1,0.1724138,1;0;0
  1485. Node;AmplifyShaderEditor.CommentaryNode;45;-3025.604,1007.041;Inherit;False;673.9661;307.9057;World Space variation;4;54;48;47;46;;1,1,1,1;0;0
  1486. Node;AmplifyShaderEditor.RangedFloatNode;51;-2784.119,1611.421;Inherit;False;Property;_Flamespeed;Flame speed;7;0;Create;True;0;0;0;False;0;False;0;0.2;0;0;0;1;FLOAT;0
  1487. Node;AmplifyShaderEditor.PannerNode;57;-2191.657,1453.849;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;1,1;False;1;FLOAT;1;False;1;FLOAT2;0
  1488. Node;AmplifyShaderEditor.DynamicAppendNode;56;-2405.373,1686.076;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1489. Node;AmplifyShaderEditor.SimpleAddOpNode;55;-2390.495,1359.937;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1490. Node;AmplifyShaderEditor.WireNode;151;-2928.858,109.9087;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
  1491. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;54;-2520.639,1118.286;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1492. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;6;-2002.242,351.8699;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1493. Node;AmplifyShaderEditor.RangedFloatNode;4;-2225.779,256.5869;Inherit;False;Constant;_Float1;Float 1;2;0;Create;True;0;0;0;False;0;False;1.22;0;0;0;0;1;FLOAT;0
  1494. Node;AmplifyShaderEditor.NegateNode;53;-2609.776,1691.427;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  1495. Node;AmplifyShaderEditor.TextureCoordinatesNode;7;-2313.115,371.0726;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;3,2;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1496. Node;AmplifyShaderEditor.RangedFloatNode;3;-2225.779,157.4448;Inherit;False;Constant;_Float0;Float 0;2;0;Create;True;0;0;0;False;0;False;-1.5;0;0;0;0;1;FLOAT;0
  1497. Node;AmplifyShaderEditor.RangedFloatNode;48;-2724.788,1199.946;Inherit;False;Constant;_Float6;Float 6;5;0;Create;True;0;0;0;False;0;False;0.1;0;0;0;0;1;FLOAT;0
  1498. Node;AmplifyShaderEditor.SamplerNode;58;-2003.081,1429.707;Inherit;True;Property;_NoiseTexture;Noise Texture;2;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1499. Node;AmplifyShaderEditor.RangedFloatNode;9;-2216.337,650.795;Inherit;False;Constant;_Float3;Float 3;2;0;Create;True;0;0;0;False;0;False;-1;0;0;0;0;1;FLOAT;0
  1500. Node;AmplifyShaderEditor.TextureCoordinatesNode;112;-2331.358,-615.9479;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;0.6,0.6;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1501. Node;AmplifyShaderEditor.WireNode;150;-3049.075,67.83262;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
  1502. Node;AmplifyShaderEditor.WireNode;103;-2376.847,586.5317;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
  1503. Node;AmplifyShaderEditor.WireNode;102;-2698.98,455.7368;Inherit;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0
  1504. Node;AmplifyShaderEditor.ComponentMaskNode;59;-1733.974,1695.051;Inherit;True;False;True;False;False;1;0;COLOR;0,0,0,0;False;1;FLOAT;0
  1505. Node;AmplifyShaderEditor.TextureCoordinatesNode;116;-2324.192,-259.1771;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;0.5,0.5;False;1;FLOAT2;0.35,0.4;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1506. Node;AmplifyShaderEditor.RangedFloatNode;8;-2216.337,551.6528;Inherit;False;Constant;_Float2;Float 2;2;0;Create;True;0;0;0;False;0;False;0.5;0;0;0;0;1;FLOAT;0
  1507. Node;AmplifyShaderEditor.SimpleSubtractOpNode;60;-1471.206,1779.839;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0.2;False;1;FLOAT;0
  1508. Node;AmplifyShaderEditor.NoiseGeneratorNode;21;-1381.665,460.459;Inherit;True;Simplex2D;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT;0
  1509. Node;AmplifyShaderEditor.TextureCoordinatesNode;124;-2353.393,-1405.533;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;0.6,0.6;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1510. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;157;747.4509,-165.9077;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1511. Node;AmplifyShaderEditor.PannerNode;13;-1672.532,160.5262;Inherit;True;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1512. Node;AmplifyShaderEditor.SimpleAddOpNode;100;-1848.454,299.8766;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1513. Node;AmplifyShaderEditor.TextureCoordinatesNode;61;-1681.957,1421.245;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1514. Node;AmplifyShaderEditor.SimpleAddOpNode;148;-2098.937,-333.5205;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1515. Node;AmplifyShaderEditor.DynamicAppendNode;12;-1994.45,662.5977;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1516. Node;AmplifyShaderEditor.SimpleAddOpNode;101;-1829.67,473.3157;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1517. Node;AmplifyShaderEditor.SimpleAddOpNode;149;-2093.294,-521.8884;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1518. Node;AmplifyShaderEditor.DynamicAppendNode;5;-1993.27,158.6252;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1519. Node;AmplifyShaderEditor.TextureCoordinatesNode;49;-2848.22,1341.885;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1520. Node;AmplifyShaderEditor.PannerNode;110;-1938.239,-559.2572;Inherit;True;3;0;FLOAT2;1,1;False;2;FLOAT2;0.5,-2;False;1;FLOAT;0.3;False;1;FLOAT2;0
  1521. Node;AmplifyShaderEditor.PannerNode;14;-1662.574,501.8289;Inherit;True;3;0;FLOAT2;0,0;False;2;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT2;0
  1522. Node;AmplifyShaderEditor.PannerNode;114;-1913.039,-310.9333;Inherit;True;3;0;FLOAT2;1,1;False;2;FLOAT2;0,-1;False;1;FLOAT;0.8;False;1;FLOAT2;0
  1523. Node;AmplifyShaderEditor.RangedFloatNode;50;-2797.011,1485.385;Inherit;False;Property;_NoiseScale;Noise Scale;8;0;Create;True;0;0;0;False;0;False;1;0.4;0;0;0;1;FLOAT;0
  1524. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;11;-1987.368,536.9648;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1525. Node;AmplifyShaderEditor.SamplerNode;106;-1494.161,-285.4992;Inherit;True;Property;_TextureSample0;Texture Sample 0;10;0;Create;True;0;0;0;False;0;False;105;None;None;True;0;False;white;Auto;False;Instance;105;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
  1526. Node;AmplifyShaderEditor.SimpleAddOpNode;65;-1254.305,1472.685;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1527. Node;AmplifyShaderEditor.TextureCoordinatesNode;125;-2359.112,-1052.666;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;0.5,0.5;False;1;FLOAT2;0.35,0.4;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1528. Node;AmplifyShaderEditor.BillboardNode;176;972.1379,134.0259;Inherit;False;Spherical;True;True;0;1;FLOAT3;0
  1529. Node;AmplifyShaderEditor.NoiseGeneratorNode;20;-1394.27,193.899;Inherit;True;Simplex2D;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT;0
  1530. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;62;-1355.838,1625.217;Inherit;False;3;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  1531. Node;AmplifyShaderEditor.WorldPosInputsNode;46;-2975.604,1057.041;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  1532. Node;AmplifyShaderEditor.SaturateNode;120;-58.44512,-71.65452;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
  1533. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;52;-2596.579,1422.466;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT2;0
  1534. Node;AmplifyShaderEditor.VoronoiNode;140;-375.4698,666.3511;Inherit;False;0;0;1;0;1;False;1;False;False;False;4;0;FLOAT2;0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;3;FLOAT;0;FLOAT2;1;FLOAT2;2
  1535. Node;AmplifyShaderEditor.DynamicAppendNode;47;-2729.162,1075.998;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1536. Node;AmplifyShaderEditor.ColorNode;70;-712.2827,1937.254;Inherit;False;Property;_Color3;Color 3;6;0;Create;True;0;0;0;False;0;False;0.7450981,0,0.4313726,1;0.745283,0,0.4311411,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1537. Node;AmplifyShaderEditor.ColorNode;69;-680.3892,1373.745;Inherit;False;Property;_Color1;Color 1;4;0;Create;True;0;0;0;False;0;False;1,0.1058824,0,1;1,0.1058809,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1538. Node;AmplifyShaderEditor.SimpleAddOpNode;115;-1060.046,-735.2353;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1539. Node;AmplifyShaderEditor.SimpleAddOpNode;152;-2093.261,-1322.927;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1540. Node;AmplifyShaderEditor.GradientNode;1;-1384.302,112.9651;Inherit;False;0;4;3;0.1415094,0.02096804,0,0;1,0.5159165,0.3254902,0.3353018;1,0.9982066,0.5803922,0.5882353;1,1,1,1;1,0;1,0.282353;1,1;0;1;OBJECT;0
  1541. Node;AmplifyShaderEditor.ColorNode;72;-707.8022,1667.709;Inherit;False;Property;_Color2;Color 2;5;0;Create;True;0;0;0;False;0;False;0,1,0.145098,1;0,1,0.1433051,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1542. Node;AmplifyShaderEditor.ColorNode;68;-673.4178,1100.806;Inherit;False;Property;_Color0;Color 0;3;0;Create;True;0;0;0;False;0;False;1,0.4313726,0,1;1,0.4313721,0,0;True;True;0;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1543. Node;AmplifyShaderEditor.SimpleAddOpNode;153;-2106.261,-1046.927;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1544. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;22;-1126.841,327.0561;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1545. Node;AmplifyShaderEditor.SamplerNode;73;-1097.516,1478.066;Inherit;True;Property;_BaseFlame;Base Flame;0;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1546. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;74;-405.271,1933.056;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1547. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;76;-400.7904,1663.511;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1548. Node;AmplifyShaderEditor.GradientSampleNode;108;-770.8218,-503.9067;Inherit;True;2;0;OBJECT;;False;1;FLOAT;0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1549. Node;AmplifyShaderEditor.RangedFloatNode;143;-363.3094,785.9236;Inherit;False;Constant;_Float5;Float 5;13;0;Create;True;0;0;0;False;0;False;-0.88;0;0;0;0;1;FLOAT;0
  1550. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;77;-423.7467,1471.686;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1551. Node;AmplifyShaderEditor.GradientSampleNode;88;-971.299,67.6896;Inherit;True;2;0;OBJECT;;False;1;FLOAT;0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1552. Node;AmplifyShaderEditor.OneMinusNode;141;-190.0771,681.0725;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  1553. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;75;-434.964,1163.769;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1554. Node;AmplifyShaderEditor.PannerNode;126;-1914.526,-1120.692;Inherit;True;3;0;FLOAT2;1,1;False;2;FLOAT2;0,-1;False;1;FLOAT;0.8;False;1;FLOAT2;0
  1555. Node;AmplifyShaderEditor.SamplerNode;105;-1550.776,-547.2102;Inherit;True;Property;_FastFlame;Fast Flame;10;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1556. Node;AmplifyShaderEditor.GradientNode;109;-1085.007,-499.6427;Inherit;False;0;4;3;0.1415094,0.02096804,0,0;1,0.5159165,0.3254902,0.3353018;1,0.9982066,0.5803922,0.5882353;1,1,1,1;1,0;1,0.282353;1,1;0;1;OBJECT;0
  1557. Node;AmplifyShaderEditor.SamplerNode;129;-1495.648,-1095.257;Inherit;True;Property;_TextureSample1;Texture Sample 1;11;0;Create;True;0;0;0;False;0;False;105;None;None;True;0;False;white;Auto;False;Instance;128;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
  1558. Node;AmplifyShaderEditor.SamplerNode;128;-1550.184,-1356.969;Inherit;True;Property;_BlazeParticles;Blaze Particles;11;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1559. Node;AmplifyShaderEditor.SimpleAddOpNode;118;-364.3185,-155.858;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1560. Node;AmplifyShaderEditor.SimpleAddOpNode;144;-43.9966,702.847;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1561. Node;AmplifyShaderEditor.SamplerNode;90;-868.2055,374.0731;Inherit;True;Property;_AlphaMask;Alpha Mask;9;1;[NoScaleOffset];Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;6;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT3;5
  1562. Node;AmplifyShaderEditor.SimpleAddOpNode;78;-120.7208,1414.683;Inherit;False;4;4;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;1;COLOR;0
  1563. Node;AmplifyShaderEditor.RangedFloatNode;80;-227.5399,1239.406;Inherit;False;Property;_Brightnessmultiply;Brightness multiply;1;0;Create;True;0;0;0;False;0;False;0;3.13;0;10;0;1;FLOAT;0
  1564. Node;AmplifyShaderEditor.OneMinusNode;95;-559.3046,383.6637;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
  1565. Node;AmplifyShaderEditor.PannerNode;127;-1939.726,-1369.016;Inherit;True;3;0;FLOAT2;1,1;False;2;FLOAT2;0.5,-2;False;1;FLOAT;0.3;False;1;FLOAT2;0
  1566. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;79;50.61784,1379.407;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1567. Node;AmplifyShaderEditor.SimpleAddOpNode;130;-1061.533,-1544.994;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1568. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;142;77.65536,602.0963;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1569. Node;AmplifyShaderEditor.GradientNode;131;-1086.494,-1309.401;Inherit;False;0;5;3;0,0,0,0;1,0.5159165,0.3254902,0.2;1,0.9251295,0.5417691,0.6529488;1,0.9982066,0.5803922,0.9029374;1,1,1,1;1,0;1,0.282353;1,1;0;1;OBJECT;0
  1570. Node;AmplifyShaderEditor.RangedFloatNode;156;-397.8076,-864.402;Inherit;False;Property;_DepthFadeAmount;Depth Fade Amount;12;0;Create;True;0;0;0;False;0;False;0;0.25;0;0;0;1;FLOAT;0
  1571. Node;AmplifyShaderEditor.GradientSampleNode;132;-833.3086,-1381.666;Inherit;True;2;0;OBJECT;;False;1;FLOAT;0;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1572. Node;AmplifyShaderEditor.SimpleAddOpNode;146;308.3874,432.9623;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1573. Node;AmplifyShaderEditor.BlendOpsNode;92;141.24,93.33642;Inherit;True;Overlay;True;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;1;False;1;COLOR;0
  1574. Node;AmplifyShaderEditor.DepthFade;155;-147.5708,-946.0583;Inherit;False;True;True;True;2;1;FLOAT3;0,0,0;False;0;FLOAT;1;False;1;FLOAT;0
  1575. Node;AmplifyShaderEditor.BlendOpsNode;139;487.0601,-69.99021;Inherit;True;LinearDodge;True;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;1;False;1;COLOR;0
  1576. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;107;-1086.608,-414.7906;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1577. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;133;-1086.095,-1148.549;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1578. Node;AmplifyShaderEditor.RangedFloatNode;145;-198.3076,590.6285;Inherit;False;Constant;_Float8;Float 8;13;0;Create;True;0;0;0;False;0;False;6.2;0;0;0;0;1;FLOAT;0
  1579. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;194;1227.115,-39.50322;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1580. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;191;1227.115,-39.50322;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;True;1;False;;True;3;False;;True;True;0;False;;0;False;;True;0;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1581. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;192;1227.115,-39.50322;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;13;Tobyfredson/Torch Flame (URP);2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;1;False;;1;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;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;False;;False;True;2;False;;True;3;False;;True;True;0;False;;0;False;;True;1;LightMode=UniversalForward;False;False;0;;0;0;Standard;25;Surface;1;637814080014666729; Blend;2;637814080027467794;Two Sided;1;0;Forward Only;0;0;Alpha Clipping;1;0; Use Shadow Threshold;0;0;Cast Shadows;0;637814079975236284;Receive Shadows;1;0;Motion Vectors;1;0; Add Precomputed Velocity;0;0;GPU Instancing;0;637814079979708156;LOD CrossFade;0;0;Built-in Fog;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,;0; Type;0;0; Tess;16,False,;0; Min;10,False,;0; Max;25,False,;0; Edge Length;16,False,;0; Max Displacement;25,False,;0;Vertex Position,InvertActionOnDeselection;1;0;0;11;False;True;False;True;False;False;True;True;True;False;True;False;;False;0
  1582. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;193;1227.115,-39.50322;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1583. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;195;1227.115,-39.50322;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;255;False;;255;False;;255;False;;7;False;;1;False;;1;False;;1;False;;7;False;;1;False;;1;False;;1;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;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1584. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;196;1227.115,10.49678;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;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
  1585. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;197;1227.115,10.49678;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;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
  1586. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;198;1227.115,10.49678;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;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
  1587. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;199;1227.115,10.49678;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;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
  1588. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;200;1227.115,10.49678;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;True;4;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;UniversalMaterialType=Unlit;True;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
  1589. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;201;1227.115,60.49678;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;MotionVectors;0;10;MotionVectors;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;;False;True;0;False;;False;False;False;False;False;False;False;False;False;True;False;0;False;;255;False;;255;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;0;False;;False;False;False;False;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
  1590. WireConnection;57;0;55;0
  1591. WireConnection;57;2;56;0
  1592. WireConnection;56;0;53;0
  1593. WireConnection;56;1;53;0
  1594. WireConnection;55;0;54;0
  1595. WireConnection;55;1;52;0
  1596. WireConnection;151;0;54;0
  1597. WireConnection;54;0;47;0
  1598. WireConnection;54;1;48;0
  1599. WireConnection;6;0;4;0
  1600. WireConnection;6;1;7;0
  1601. WireConnection;53;0;51;0
  1602. WireConnection;58;1;57;0
  1603. WireConnection;150;0;54;0
  1604. WireConnection;103;0;54;0
  1605. WireConnection;102;0;54;0
  1606. WireConnection;59;0;58;0
  1607. WireConnection;60;0;59;0
  1608. WireConnection;21;0;14;0
  1609. WireConnection;157;0;155;0
  1610. WireConnection;157;1;139;0
  1611. WireConnection;13;0;100;0
  1612. WireConnection;13;2;5;0
  1613. WireConnection;100;0;102;0
  1614. WireConnection;100;1;6;0
  1615. WireConnection;148;0;151;0
  1616. WireConnection;148;1;116;0
  1617. WireConnection;12;1;9;0
  1618. WireConnection;101;0;103;0
  1619. WireConnection;101;1;11;0
  1620. WireConnection;149;0;150;0
  1621. WireConnection;149;1;112;0
  1622. WireConnection;5;1;3;0
  1623. WireConnection;110;0;149;0
  1624. WireConnection;14;0;101;0
  1625. WireConnection;14;2;12;0
  1626. WireConnection;114;0;148;0
  1627. WireConnection;11;0;7;0
  1628. WireConnection;11;1;8;0
  1629. WireConnection;106;1;114;0
  1630. WireConnection;65;0;61;0
  1631. WireConnection;65;1;62;0
  1632. WireConnection;20;0;13;0
  1633. WireConnection;62;0;61;2
  1634. WireConnection;62;1;60;0
  1635. WireConnection;62;2;61;2
  1636. WireConnection;120;0;118;0
  1637. WireConnection;52;0;49;0
  1638. WireConnection;52;1;50;0
  1639. WireConnection;47;0;46;1
  1640. WireConnection;47;1;46;2
  1641. WireConnection;115;0;105;0
  1642. WireConnection;115;1;106;0
  1643. WireConnection;152;0;54;0
  1644. WireConnection;152;1;124;0
  1645. WireConnection;153;0;54;0
  1646. WireConnection;153;1;125;0
  1647. WireConnection;22;0;20;0
  1648. WireConnection;22;1;21;0
  1649. WireConnection;73;1;65;0
  1650. WireConnection;74;0;73;4
  1651. WireConnection;74;1;70;0
  1652. WireConnection;76;0;73;3
  1653. WireConnection;76;1;72;0
  1654. WireConnection;108;0;109;0
  1655. WireConnection;108;1;115;0
  1656. WireConnection;77;0;69;0
  1657. WireConnection;77;1;73;2
  1658. WireConnection;88;0;1;0
  1659. WireConnection;88;1;22;0
  1660. WireConnection;141;0;140;0
  1661. WireConnection;75;0;68;0
  1662. WireConnection;75;1;73;1
  1663. WireConnection;126;0;153;0
  1664. WireConnection;105;1;110;0
  1665. WireConnection;129;1;126;0
  1666. WireConnection;128;1;127;0
  1667. WireConnection;118;0;108;0
  1668. WireConnection;118;1;88;0
  1669. WireConnection;144;0;143;0
  1670. WireConnection;144;1;141;0
  1671. WireConnection;78;0;75;0
  1672. WireConnection;78;1;77;0
  1673. WireConnection;78;2;76;0
  1674. WireConnection;78;3;74;0
  1675. WireConnection;95;0;90;0
  1676. WireConnection;127;0;152;0
  1677. WireConnection;79;0;80;0
  1678. WireConnection;79;1;78;0
  1679. WireConnection;130;0;128;0
  1680. WireConnection;130;1;129;0
  1681. WireConnection;142;0;145;0
  1682. WireConnection;142;1;144;0
  1683. WireConnection;132;0;131;0
  1684. WireConnection;132;1;130;0
  1685. WireConnection;146;0;90;0
  1686. WireConnection;146;1;142;0
  1687. WireConnection;92;0;120;0
  1688. WireConnection;92;1;79;0
  1689. WireConnection;92;2;95;0
  1690. WireConnection;155;0;156;0
  1691. WireConnection;139;0;132;0
  1692. WireConnection;139;1;92;0
  1693. WireConnection;139;2;146;0
  1694. WireConnection;107;0;105;0
  1695. WireConnection;107;1;106;0
  1696. WireConnection;133;0;128;0
  1697. WireConnection;133;1;129;0
  1698. WireConnection;192;2;157;0
  1699. WireConnection;192;5;176;0
  1700. ASEEND*/
  1701. //CHKSM=788B72F932B8ACD0F2074C8456431A4903B89DC8