DissolveSample.shader 103 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "LT/DissolveSample"
  4. {
  5. Properties
  6. {
  7. [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
  8. [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
  9. [ASEBegin][HDR]_Color("Color", Color) = (1,1,1,1)
  10. _ColorPower("ColorPower", Range( 0 , 20)) = 1
  11. _OpacityPower("OpacityPower", Float) = 1
  12. _Ramp("Ramp", 2D) = "white" {}
  13. _RampDirection("RampDirection ", Range( 0 , 1)) = 0
  14. _RampPower("RampPower", Range( 0.2 , 8)) = 1
  15. _MainTex("MainTex", 2D) = "white" {}
  16. _MainTexChannel("不透明通道选择", Vector) = (1,0,0,0)
  17. _MainTexRotation("贴图旋转", Range( 0 , 1)) = 0
  18. _DissolveSwitch("溶解开关", Range( 0 , 1)) = 0
  19. _DissolveTex("DissolveTex", 2D) = "white" {}
  20. _DissolvePower("DissolvePower", Float) = 2
  21. [Toggle(_DISSOLVETEXFLIP_ON)] _DissolveTexFlip("DissolveTexFlip", Float) = 0
  22. _DissolveExpReversed("DissolveExpReversed", Float) = 2
  23. _CustomDataSwitch("数据流控制UVMove", Range( 0 , 1)) = 0
  24. [ASEEnd]_MaskTex("MaskTex", 2D) = "white" {}
  25. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  26. [HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
  27. [HideInInspector]_QueueControl("_QueueControl", Float) = -1
  28. [HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  29. [HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  30. [HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  31. //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
  32. //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
  33. //_TessMin( "Tess Min Distance", Float ) = 10
  34. //_TessMax( "Tess Max Distance", Float ) = 25
  35. //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
  36. //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
  37. }
  38. SubShader
  39. {
  40. LOD 0
  41. Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Opaque" "Queue"="Transparent" }
  42. Cull Off
  43. AlphaToMask Off
  44. HLSLINCLUDE
  45. #pragma target 3.0
  46. #pragma prefer_hlslcc gles
  47. #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal vulkan nomrt
  48. #ifndef ASE_TESS_FUNCS
  49. #define ASE_TESS_FUNCS
  50. float4 FixedTess( float tessValue )
  51. {
  52. return tessValue;
  53. }
  54. float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
  55. {
  56. float3 wpos = mul(o2w,vertex).xyz;
  57. float dist = distance (wpos, cameraPos);
  58. float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
  59. return f;
  60. }
  61. float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
  62. {
  63. float4 tess;
  64. tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
  65. tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
  66. tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
  67. tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
  68. return tess;
  69. }
  70. float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
  71. {
  72. float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
  73. float len = distance(wpos0, wpos1);
  74. float f = max(len * scParams.y / (edgeLen * dist), 1.0);
  75. return f;
  76. }
  77. float DistanceFromPlane (float3 pos, float4 plane)
  78. {
  79. float d = dot (float4(pos,1.0f), plane);
  80. return d;
  81. }
  82. bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
  83. {
  84. float4 planeTest;
  85. planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  86. (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  87. (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
  88. planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  89. (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  90. (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
  91. planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  92. (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  93. (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
  94. planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  95. (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  96. (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
  97. return !all (planeTest);
  98. }
  99. float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
  100. {
  101. float3 f;
  102. f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
  103. f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
  104. f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
  105. return CalcTriEdgeTessFactors (f);
  106. }
  107. float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
  108. {
  109. float3 pos0 = mul(o2w,v0).xyz;
  110. float3 pos1 = mul(o2w,v1).xyz;
  111. float3 pos2 = mul(o2w,v2).xyz;
  112. float4 tess;
  113. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  114. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  115. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  116. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  117. return tess;
  118. }
  119. float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
  120. {
  121. float3 pos0 = mul(o2w,v0).xyz;
  122. float3 pos1 = mul(o2w,v1).xyz;
  123. float3 pos2 = mul(o2w,v2).xyz;
  124. float4 tess;
  125. if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
  126. {
  127. tess = 0.0f;
  128. }
  129. else
  130. {
  131. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  132. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  133. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  134. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  135. }
  136. return tess;
  137. }
  138. #endif //ASE_TESS_FUNCS
  139. ENDHLSL
  140. Pass
  141. {
  142. Name "Forward"
  143. Tags { "LightMode"="UniversalForward" }
  144. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  145. ZWrite Off
  146. ZTest LEqual
  147. Offset -1 , 0
  148. ColorMask RGBA
  149. HLSLPROGRAM
  150. #pragma multi_compile_instancing
  151. #define _RECEIVE_SHADOWS_OFF 1
  152. #define ASE_SRP_VERSION 999999
  153. #pragma multi_compile _ LIGHTMAP_ON
  154. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  155. #pragma shader_feature _ _SAMPLE_GI
  156. #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  157. #pragma multi_compile _ DEBUG_DISPLAY
  158. #define SHADERPASS SHADERPASS_UNLIT
  159. #pragma vertex vert
  160. #pragma fragment frag
  161. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  162. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  163. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  164. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  165. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  166. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  167. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  168. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  169. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  170. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  171. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  172. #define ASE_NEEDS_FRAG_COLOR
  173. #pragma shader_feature_local _DISSOLVETEXFLIP_ON
  174. struct VertexInput
  175. {
  176. float4 vertex : POSITION;
  177. float3 ase_normal : NORMAL;
  178. float4 ase_color : COLOR;
  179. float4 ase_texcoord : TEXCOORD0;
  180. float4 ase_texcoord1 : TEXCOORD1;
  181. UNITY_VERTEX_INPUT_INSTANCE_ID
  182. };
  183. struct VertexOutput
  184. {
  185. float4 clipPos : SV_POSITION;
  186. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  187. float3 worldPos : TEXCOORD0;
  188. #endif
  189. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  190. float4 shadowCoord : TEXCOORD1;
  191. #endif
  192. #ifdef ASE_FOG
  193. float fogFactor : TEXCOORD2;
  194. #endif
  195. float4 ase_color : COLOR;
  196. float4 ase_texcoord3 : TEXCOORD3;
  197. float4 ase_texcoord4 : TEXCOORD4;
  198. UNITY_VERTEX_INPUT_INSTANCE_ID
  199. UNITY_VERTEX_OUTPUT_STEREO
  200. };
  201. CBUFFER_START(UnityPerMaterial)
  202. float4 _MainTex_ST;
  203. float4 _MainTexChannel;
  204. float4 _DissolveTex_ST;
  205. float4 _MaskTex_ST;
  206. float4 _Color;
  207. float _ColorPower;
  208. float _MainTexRotation;
  209. float _CustomDataSwitch;
  210. float _DissolvePower;
  211. float _DissolveExpReversed;
  212. float _DissolveSwitch;
  213. float _OpacityPower;
  214. float _RampDirection;
  215. float _RampPower;
  216. #ifdef TESSELLATION_ON
  217. float _TessPhongStrength;
  218. float _TessValue;
  219. float _TessMin;
  220. float _TessMax;
  221. float _TessEdgeLength;
  222. float _TessMaxDisp;
  223. #endif
  224. CBUFFER_END
  225. sampler2D _Ramp;
  226. sampler2D _MainTex;
  227. sampler2D _DissolveTex;
  228. sampler2D _MaskTex;
  229. VertexOutput VertexFunction ( VertexInput v )
  230. {
  231. VertexOutput o = (VertexOutput)0;
  232. UNITY_SETUP_INSTANCE_ID(v);
  233. UNITY_TRANSFER_INSTANCE_ID(v, o);
  234. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  235. o.ase_color = v.ase_color;
  236. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  237. o.ase_texcoord4 = v.ase_texcoord1;
  238. //setting value to unused interpolator channels and avoid initialization warnings
  239. o.ase_texcoord3.zw = 0;
  240. #ifdef ASE_ABSOLUTE_VERTEX_POS
  241. float3 defaultVertexValue = v.vertex.xyz;
  242. #else
  243. float3 defaultVertexValue = float3(0, 0, 0);
  244. #endif
  245. float3 vertexValue = defaultVertexValue;
  246. #ifdef ASE_ABSOLUTE_VERTEX_POS
  247. v.vertex.xyz = vertexValue;
  248. #else
  249. v.vertex.xyz += vertexValue;
  250. #endif
  251. v.ase_normal = v.ase_normal;
  252. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  253. float4 positionCS = TransformWorldToHClip( positionWS );
  254. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  255. o.worldPos = positionWS;
  256. #endif
  257. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  258. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  259. vertexInput.positionWS = positionWS;
  260. vertexInput.positionCS = positionCS;
  261. o.shadowCoord = GetShadowCoord( vertexInput );
  262. #endif
  263. #ifdef ASE_FOG
  264. o.fogFactor = ComputeFogFactor( positionCS.z );
  265. #endif
  266. o.clipPos = positionCS;
  267. return o;
  268. }
  269. #if defined(TESSELLATION_ON)
  270. struct VertexControl
  271. {
  272. float4 vertex : INTERNALTESSPOS;
  273. float3 ase_normal : NORMAL;
  274. float4 ase_color : COLOR;
  275. float4 ase_texcoord : TEXCOORD0;
  276. float4 ase_texcoord1 : TEXCOORD1;
  277. UNITY_VERTEX_INPUT_INSTANCE_ID
  278. };
  279. struct TessellationFactors
  280. {
  281. float edge[3] : SV_TessFactor;
  282. float inside : SV_InsideTessFactor;
  283. };
  284. VertexControl vert ( VertexInput v )
  285. {
  286. VertexControl o;
  287. UNITY_SETUP_INSTANCE_ID(v);
  288. UNITY_TRANSFER_INSTANCE_ID(v, o);
  289. o.vertex = v.vertex;
  290. o.ase_normal = v.ase_normal;
  291. o.ase_color = v.ase_color;
  292. o.ase_texcoord = v.ase_texcoord;
  293. o.ase_texcoord1 = v.ase_texcoord1;
  294. return o;
  295. }
  296. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  297. {
  298. TessellationFactors o;
  299. float4 tf = 1;
  300. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  301. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  302. #if defined(ASE_FIXED_TESSELLATION)
  303. tf = FixedTess( tessValue );
  304. #elif defined(ASE_DISTANCE_TESSELLATION)
  305. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  306. #elif defined(ASE_LENGTH_TESSELLATION)
  307. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  308. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  309. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  310. #endif
  311. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  312. return o;
  313. }
  314. [domain("tri")]
  315. [partitioning("fractional_odd")]
  316. [outputtopology("triangle_cw")]
  317. [patchconstantfunc("TessellationFunction")]
  318. [outputcontrolpoints(3)]
  319. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  320. {
  321. return patch[id];
  322. }
  323. [domain("tri")]
  324. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  325. {
  326. VertexInput o = (VertexInput) 0;
  327. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  328. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  329. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  330. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  331. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  332. #if defined(ASE_PHONG_TESSELLATION)
  333. float3 pp[3];
  334. for (int i = 0; i < 3; ++i)
  335. pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
  336. float phongStrength = _TessPhongStrength;
  337. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  338. #endif
  339. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  340. return VertexFunction(o);
  341. }
  342. #else
  343. VertexOutput vert ( VertexInput v )
  344. {
  345. return VertexFunction( v );
  346. }
  347. #endif
  348. half4 frag ( VertexOutput IN ) : SV_Target
  349. {
  350. UNITY_SETUP_INSTANCE_ID( IN );
  351. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  352. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  353. float3 WorldPosition = IN.worldPos;
  354. #endif
  355. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  356. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  357. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  358. ShadowCoords = IN.shadowCoord;
  359. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  360. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  361. #endif
  362. #endif
  363. float cos127 = cos( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  364. float sin127 = sin( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  365. float2 rotator127 = mul( IN.ase_texcoord3.xy - float2( 0.5,0.5 ) , float2x2( cos127 , -sin127 , sin127 , cos127 )) + float2( 0.5,0.5 );
  366. float4 texCoord151 = IN.ase_texcoord4;
  367. texCoord151.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  368. float2 appendResult154 = (float2(texCoord151.z , texCoord151.w));
  369. float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  370. float2 lerpResult157 = lerp( rotator127 , ( appendResult154 + uv_MainTex ) , round( _CustomDataSwitch ));
  371. float4 tex2DNode33 = tex2D( _MainTex, lerpResult157 );
  372. float4 break92 = ( tex2DNode33 * _MainTexChannel );
  373. float clampResult94 = clamp( ( break92.r + break92.g + break92.b + break92.a ) , 0.0 , 1.0 );
  374. float2 uv_DissolveTex = IN.ase_texcoord3.xy * _DissolveTex_ST.xy + _DissolveTex_ST.zw;
  375. float4 texCoord145 = IN.ase_texcoord4;
  376. texCoord145.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  377. float2 appendResult143 = (float2(texCoord145.z , texCoord145.w));
  378. float4 tex2DNode66 = tex2D( _DissolveTex, ( uv_DissolveTex + appendResult143 ) );
  379. #ifdef _DISSOLVETEXFLIP_ON
  380. float staticSwitch110 = ( 1.0 - tex2DNode66.r );
  381. #else
  382. float staticSwitch110 = tex2DNode66.r;
  383. #endif
  384. float4 texCoord111 = IN.ase_texcoord4;
  385. texCoord111.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  386. float clampResult120 = clamp( ( 1.0 - pow( ( 1.0 - pow( staticSwitch110 , _DissolvePower ) ) , (1.0 + (texCoord111.x - 0.0) * (_DissolveExpReversed - 1.0) / (1.0 - 0.0)) ) ) , 0.0 , 1.0 );
  387. float4 texCoord122 = IN.ase_texcoord4;
  388. texCoord122.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  389. float clampResult124 = clamp( ( clampResult120 + (-1.0 + (texCoord122.x - 0.0) * (1.0 - -1.0) / (1.0 - 0.0)) ) , 0.0 , 1.0 );
  390. float lerpResult147 = lerp( clampResult124 , 0.0 , round( _DissolveSwitch ));
  391. float clampResult96 = clamp( ( clampResult94 - lerpResult147 ) , 0.0 , 1.0 );
  392. float2 uv_MaskTex = IN.ase_texcoord3.xy * _MaskTex_ST.xy + _MaskTex_ST.zw;
  393. float clampResult100 = clamp( ( clampResult96 * IN.ase_color.a * _OpacityPower * tex2D( _MaskTex, uv_MaskTex ).r ) , 0.0 , 1.0 );
  394. float lerpResult34 = lerp( clampResult94 , clampResult100 , _RampDirection);
  395. float2 appendResult44 = (float2(( 1.0 - pow( ( 1.0 - lerpResult34 ) , _RampPower ) ) , 0.0));
  396. float3 BakedAlbedo = 0;
  397. float3 BakedEmission = 0;
  398. float3 Color = ( ( IN.ase_color * _ColorPower ) * ( tex2D( _Ramp, appendResult44 ) * _Color * tex2DNode33 ) ).rgb;
  399. float Alpha = clampResult100;
  400. float AlphaClipThreshold = 0.5;
  401. float AlphaClipThresholdShadow = 0.5;
  402. #ifdef _ALPHATEST_ON
  403. clip( Alpha - AlphaClipThreshold );
  404. #endif
  405. #if defined(_DBUFFER)
  406. ApplyDecalToBaseColor(IN.clipPos, Color);
  407. #endif
  408. #if defined(_ALPHAPREMULTIPLY_ON)
  409. Color *= Alpha;
  410. #endif
  411. #ifdef LOD_FADE_CROSSFADE
  412. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  413. #endif
  414. #ifdef ASE_FOG
  415. Color = MixFog( Color, IN.fogFactor );
  416. #endif
  417. return half4( Color, Alpha );
  418. }
  419. ENDHLSL
  420. }
  421. Pass
  422. {
  423. Name "DepthOnly"
  424. Tags { "LightMode"="DepthOnly" }
  425. ZWrite On
  426. ColorMask 0
  427. AlphaToMask Off
  428. HLSLPROGRAM
  429. #pragma multi_compile_instancing
  430. #define _RECEIVE_SHADOWS_OFF 1
  431. #define ASE_SRP_VERSION 999999
  432. #pragma vertex vert
  433. #pragma fragment frag
  434. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  435. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  436. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  437. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  438. #pragma shader_feature_local _DISSOLVETEXFLIP_ON
  439. struct VertexInput
  440. {
  441. float4 vertex : POSITION;
  442. float3 ase_normal : NORMAL;
  443. float4 ase_texcoord : TEXCOORD0;
  444. float4 ase_texcoord1 : TEXCOORD1;
  445. float4 ase_color : COLOR;
  446. UNITY_VERTEX_INPUT_INSTANCE_ID
  447. };
  448. struct VertexOutput
  449. {
  450. float4 clipPos : SV_POSITION;
  451. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  452. float3 worldPos : TEXCOORD0;
  453. #endif
  454. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  455. float4 shadowCoord : TEXCOORD1;
  456. #endif
  457. float4 ase_texcoord2 : TEXCOORD2;
  458. float4 ase_texcoord3 : TEXCOORD3;
  459. float4 ase_color : COLOR;
  460. UNITY_VERTEX_INPUT_INSTANCE_ID
  461. UNITY_VERTEX_OUTPUT_STEREO
  462. };
  463. CBUFFER_START(UnityPerMaterial)
  464. float4 _MainTex_ST;
  465. float4 _MainTexChannel;
  466. float4 _DissolveTex_ST;
  467. float4 _MaskTex_ST;
  468. float4 _Color;
  469. float _ColorPower;
  470. float _MainTexRotation;
  471. float _CustomDataSwitch;
  472. float _DissolvePower;
  473. float _DissolveExpReversed;
  474. float _DissolveSwitch;
  475. float _OpacityPower;
  476. float _RampDirection;
  477. float _RampPower;
  478. #ifdef TESSELLATION_ON
  479. float _TessPhongStrength;
  480. float _TessValue;
  481. float _TessMin;
  482. float _TessMax;
  483. float _TessEdgeLength;
  484. float _TessMaxDisp;
  485. #endif
  486. CBUFFER_END
  487. sampler2D _MainTex;
  488. sampler2D _DissolveTex;
  489. sampler2D _MaskTex;
  490. VertexOutput VertexFunction( VertexInput v )
  491. {
  492. VertexOutput o = (VertexOutput)0;
  493. UNITY_SETUP_INSTANCE_ID(v);
  494. UNITY_TRANSFER_INSTANCE_ID(v, o);
  495. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  496. o.ase_texcoord2.xy = v.ase_texcoord.xy;
  497. o.ase_texcoord3 = v.ase_texcoord1;
  498. o.ase_color = v.ase_color;
  499. //setting value to unused interpolator channels and avoid initialization warnings
  500. o.ase_texcoord2.zw = 0;
  501. #ifdef ASE_ABSOLUTE_VERTEX_POS
  502. float3 defaultVertexValue = v.vertex.xyz;
  503. #else
  504. float3 defaultVertexValue = float3(0, 0, 0);
  505. #endif
  506. float3 vertexValue = defaultVertexValue;
  507. #ifdef ASE_ABSOLUTE_VERTEX_POS
  508. v.vertex.xyz = vertexValue;
  509. #else
  510. v.vertex.xyz += vertexValue;
  511. #endif
  512. v.ase_normal = v.ase_normal;
  513. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  514. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  515. o.worldPos = positionWS;
  516. #endif
  517. o.clipPos = TransformWorldToHClip( positionWS );
  518. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  519. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  520. vertexInput.positionWS = positionWS;
  521. vertexInput.positionCS = o.clipPos;
  522. o.shadowCoord = GetShadowCoord( vertexInput );
  523. #endif
  524. return o;
  525. }
  526. #if defined(TESSELLATION_ON)
  527. struct VertexControl
  528. {
  529. float4 vertex : INTERNALTESSPOS;
  530. float3 ase_normal : NORMAL;
  531. float4 ase_texcoord : TEXCOORD0;
  532. float4 ase_texcoord1 : TEXCOORD1;
  533. float4 ase_color : COLOR;
  534. UNITY_VERTEX_INPUT_INSTANCE_ID
  535. };
  536. struct TessellationFactors
  537. {
  538. float edge[3] : SV_TessFactor;
  539. float inside : SV_InsideTessFactor;
  540. };
  541. VertexControl vert ( VertexInput v )
  542. {
  543. VertexControl o;
  544. UNITY_SETUP_INSTANCE_ID(v);
  545. UNITY_TRANSFER_INSTANCE_ID(v, o);
  546. o.vertex = v.vertex;
  547. o.ase_normal = v.ase_normal;
  548. o.ase_texcoord = v.ase_texcoord;
  549. o.ase_texcoord1 = v.ase_texcoord1;
  550. o.ase_color = v.ase_color;
  551. return o;
  552. }
  553. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  554. {
  555. TessellationFactors o;
  556. float4 tf = 1;
  557. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  558. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  559. #if defined(ASE_FIXED_TESSELLATION)
  560. tf = FixedTess( tessValue );
  561. #elif defined(ASE_DISTANCE_TESSELLATION)
  562. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  563. #elif defined(ASE_LENGTH_TESSELLATION)
  564. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  565. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  566. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  567. #endif
  568. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  569. return o;
  570. }
  571. [domain("tri")]
  572. [partitioning("fractional_odd")]
  573. [outputtopology("triangle_cw")]
  574. [patchconstantfunc("TessellationFunction")]
  575. [outputcontrolpoints(3)]
  576. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  577. {
  578. return patch[id];
  579. }
  580. [domain("tri")]
  581. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  582. {
  583. VertexInput o = (VertexInput) 0;
  584. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  585. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  586. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  587. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  588. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  589. #if defined(ASE_PHONG_TESSELLATION)
  590. float3 pp[3];
  591. for (int i = 0; i < 3; ++i)
  592. pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
  593. float phongStrength = _TessPhongStrength;
  594. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  595. #endif
  596. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  597. return VertexFunction(o);
  598. }
  599. #else
  600. VertexOutput vert ( VertexInput v )
  601. {
  602. return VertexFunction( v );
  603. }
  604. #endif
  605. half4 frag(VertexOutput IN ) : SV_TARGET
  606. {
  607. UNITY_SETUP_INSTANCE_ID(IN);
  608. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  609. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  610. float3 WorldPosition = IN.worldPos;
  611. #endif
  612. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  613. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  614. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  615. ShadowCoords = IN.shadowCoord;
  616. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  617. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  618. #endif
  619. #endif
  620. float cos127 = cos( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  621. float sin127 = sin( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  622. float2 rotator127 = mul( IN.ase_texcoord2.xy - float2( 0.5,0.5 ) , float2x2( cos127 , -sin127 , sin127 , cos127 )) + float2( 0.5,0.5 );
  623. float4 texCoord151 = IN.ase_texcoord3;
  624. texCoord151.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 );
  625. float2 appendResult154 = (float2(texCoord151.z , texCoord151.w));
  626. float2 uv_MainTex = IN.ase_texcoord2.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  627. float2 lerpResult157 = lerp( rotator127 , ( appendResult154 + uv_MainTex ) , round( _CustomDataSwitch ));
  628. float4 tex2DNode33 = tex2D( _MainTex, lerpResult157 );
  629. float4 break92 = ( tex2DNode33 * _MainTexChannel );
  630. float clampResult94 = clamp( ( break92.r + break92.g + break92.b + break92.a ) , 0.0 , 1.0 );
  631. float2 uv_DissolveTex = IN.ase_texcoord2.xy * _DissolveTex_ST.xy + _DissolveTex_ST.zw;
  632. float4 texCoord145 = IN.ase_texcoord3;
  633. texCoord145.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 );
  634. float2 appendResult143 = (float2(texCoord145.z , texCoord145.w));
  635. float4 tex2DNode66 = tex2D( _DissolveTex, ( uv_DissolveTex + appendResult143 ) );
  636. #ifdef _DISSOLVETEXFLIP_ON
  637. float staticSwitch110 = ( 1.0 - tex2DNode66.r );
  638. #else
  639. float staticSwitch110 = tex2DNode66.r;
  640. #endif
  641. float4 texCoord111 = IN.ase_texcoord3;
  642. texCoord111.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 );
  643. float clampResult120 = clamp( ( 1.0 - pow( ( 1.0 - pow( staticSwitch110 , _DissolvePower ) ) , (1.0 + (texCoord111.x - 0.0) * (_DissolveExpReversed - 1.0) / (1.0 - 0.0)) ) ) , 0.0 , 1.0 );
  644. float4 texCoord122 = IN.ase_texcoord3;
  645. texCoord122.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 );
  646. float clampResult124 = clamp( ( clampResult120 + (-1.0 + (texCoord122.x - 0.0) * (1.0 - -1.0) / (1.0 - 0.0)) ) , 0.0 , 1.0 );
  647. float lerpResult147 = lerp( clampResult124 , 0.0 , round( _DissolveSwitch ));
  648. float clampResult96 = clamp( ( clampResult94 - lerpResult147 ) , 0.0 , 1.0 );
  649. float2 uv_MaskTex = IN.ase_texcoord2.xy * _MaskTex_ST.xy + _MaskTex_ST.zw;
  650. float clampResult100 = clamp( ( clampResult96 * IN.ase_color.a * _OpacityPower * tex2D( _MaskTex, uv_MaskTex ).r ) , 0.0 , 1.0 );
  651. float Alpha = clampResult100;
  652. float AlphaClipThreshold = 0.5;
  653. #ifdef _ALPHATEST_ON
  654. clip(Alpha - AlphaClipThreshold);
  655. #endif
  656. #ifdef LOD_FADE_CROSSFADE
  657. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  658. #endif
  659. return 0;
  660. }
  661. ENDHLSL
  662. }
  663. Pass
  664. {
  665. Name "Universal2D"
  666. Tags { "LightMode"="Universal2D" }
  667. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  668. ZWrite Off
  669. ZTest LEqual
  670. Offset -1 , 0
  671. ColorMask RGBA
  672. HLSLPROGRAM
  673. #pragma multi_compile_instancing
  674. #define _RECEIVE_SHADOWS_OFF 1
  675. #define ASE_SRP_VERSION 999999
  676. #pragma multi_compile _ LIGHTMAP_ON
  677. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  678. #pragma shader_feature _ _SAMPLE_GI
  679. #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  680. #pragma multi_compile _ DEBUG_DISPLAY
  681. #define SHADERPASS SHADERPASS_UNLIT
  682. #pragma vertex vert
  683. #pragma fragment frag
  684. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  685. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  686. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  687. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  688. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  689. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  690. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  691. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  692. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  693. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  694. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  695. #define ASE_NEEDS_FRAG_COLOR
  696. #pragma shader_feature_local _DISSOLVETEXFLIP_ON
  697. struct VertexInput
  698. {
  699. float4 vertex : POSITION;
  700. float3 ase_normal : NORMAL;
  701. float4 ase_color : COLOR;
  702. float4 ase_texcoord : TEXCOORD0;
  703. float4 ase_texcoord1 : TEXCOORD1;
  704. UNITY_VERTEX_INPUT_INSTANCE_ID
  705. };
  706. struct VertexOutput
  707. {
  708. float4 clipPos : SV_POSITION;
  709. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  710. float3 worldPos : TEXCOORD0;
  711. #endif
  712. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  713. float4 shadowCoord : TEXCOORD1;
  714. #endif
  715. #ifdef ASE_FOG
  716. float fogFactor : TEXCOORD2;
  717. #endif
  718. float4 ase_color : COLOR;
  719. float4 ase_texcoord3 : TEXCOORD3;
  720. float4 ase_texcoord4 : TEXCOORD4;
  721. UNITY_VERTEX_INPUT_INSTANCE_ID
  722. UNITY_VERTEX_OUTPUT_STEREO
  723. };
  724. CBUFFER_START(UnityPerMaterial)
  725. float4 _MainTex_ST;
  726. float4 _MainTexChannel;
  727. float4 _DissolveTex_ST;
  728. float4 _MaskTex_ST;
  729. float4 _Color;
  730. float _ColorPower;
  731. float _MainTexRotation;
  732. float _CustomDataSwitch;
  733. float _DissolvePower;
  734. float _DissolveExpReversed;
  735. float _DissolveSwitch;
  736. float _OpacityPower;
  737. float _RampDirection;
  738. float _RampPower;
  739. #ifdef TESSELLATION_ON
  740. float _TessPhongStrength;
  741. float _TessValue;
  742. float _TessMin;
  743. float _TessMax;
  744. float _TessEdgeLength;
  745. float _TessMaxDisp;
  746. #endif
  747. CBUFFER_END
  748. sampler2D _Ramp;
  749. sampler2D _MainTex;
  750. sampler2D _DissolveTex;
  751. sampler2D _MaskTex;
  752. VertexOutput VertexFunction ( VertexInput v )
  753. {
  754. VertexOutput o = (VertexOutput)0;
  755. UNITY_SETUP_INSTANCE_ID(v);
  756. UNITY_TRANSFER_INSTANCE_ID(v, o);
  757. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  758. o.ase_color = v.ase_color;
  759. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  760. o.ase_texcoord4 = v.ase_texcoord1;
  761. //setting value to unused interpolator channels and avoid initialization warnings
  762. o.ase_texcoord3.zw = 0;
  763. #ifdef ASE_ABSOLUTE_VERTEX_POS
  764. float3 defaultVertexValue = v.vertex.xyz;
  765. #else
  766. float3 defaultVertexValue = float3(0, 0, 0);
  767. #endif
  768. float3 vertexValue = defaultVertexValue;
  769. #ifdef ASE_ABSOLUTE_VERTEX_POS
  770. v.vertex.xyz = vertexValue;
  771. #else
  772. v.vertex.xyz += vertexValue;
  773. #endif
  774. v.ase_normal = v.ase_normal;
  775. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  776. float4 positionCS = TransformWorldToHClip( positionWS );
  777. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  778. o.worldPos = positionWS;
  779. #endif
  780. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  781. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  782. vertexInput.positionWS = positionWS;
  783. vertexInput.positionCS = positionCS;
  784. o.shadowCoord = GetShadowCoord( vertexInput );
  785. #endif
  786. #ifdef ASE_FOG
  787. o.fogFactor = ComputeFogFactor( positionCS.z );
  788. #endif
  789. o.clipPos = positionCS;
  790. return o;
  791. }
  792. #if defined(TESSELLATION_ON)
  793. struct VertexControl
  794. {
  795. float4 vertex : INTERNALTESSPOS;
  796. float3 ase_normal : NORMAL;
  797. float4 ase_color : COLOR;
  798. float4 ase_texcoord : TEXCOORD0;
  799. float4 ase_texcoord1 : TEXCOORD1;
  800. UNITY_VERTEX_INPUT_INSTANCE_ID
  801. };
  802. struct TessellationFactors
  803. {
  804. float edge[3] : SV_TessFactor;
  805. float inside : SV_InsideTessFactor;
  806. };
  807. VertexControl vert ( VertexInput v )
  808. {
  809. VertexControl o;
  810. UNITY_SETUP_INSTANCE_ID(v);
  811. UNITY_TRANSFER_INSTANCE_ID(v, o);
  812. o.vertex = v.vertex;
  813. o.ase_normal = v.ase_normal;
  814. o.ase_color = v.ase_color;
  815. o.ase_texcoord = v.ase_texcoord;
  816. o.ase_texcoord1 = v.ase_texcoord1;
  817. return o;
  818. }
  819. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  820. {
  821. TessellationFactors o;
  822. float4 tf = 1;
  823. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  824. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  825. #if defined(ASE_FIXED_TESSELLATION)
  826. tf = FixedTess( tessValue );
  827. #elif defined(ASE_DISTANCE_TESSELLATION)
  828. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  829. #elif defined(ASE_LENGTH_TESSELLATION)
  830. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  831. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  832. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  833. #endif
  834. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  835. return o;
  836. }
  837. [domain("tri")]
  838. [partitioning("fractional_odd")]
  839. [outputtopology("triangle_cw")]
  840. [patchconstantfunc("TessellationFunction")]
  841. [outputcontrolpoints(3)]
  842. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  843. {
  844. return patch[id];
  845. }
  846. [domain("tri")]
  847. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  848. {
  849. VertexInput o = (VertexInput) 0;
  850. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  851. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  852. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  853. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  854. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  855. #if defined(ASE_PHONG_TESSELLATION)
  856. float3 pp[3];
  857. for (int i = 0; i < 3; ++i)
  858. pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
  859. float phongStrength = _TessPhongStrength;
  860. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  861. #endif
  862. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  863. return VertexFunction(o);
  864. }
  865. #else
  866. VertexOutput vert ( VertexInput v )
  867. {
  868. return VertexFunction( v );
  869. }
  870. #endif
  871. half4 frag ( VertexOutput IN ) : SV_Target
  872. {
  873. UNITY_SETUP_INSTANCE_ID( IN );
  874. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  875. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  876. float3 WorldPosition = IN.worldPos;
  877. #endif
  878. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  879. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  880. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  881. ShadowCoords = IN.shadowCoord;
  882. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  883. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  884. #endif
  885. #endif
  886. float cos127 = cos( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  887. float sin127 = sin( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  888. float2 rotator127 = mul( IN.ase_texcoord3.xy - float2( 0.5,0.5 ) , float2x2( cos127 , -sin127 , sin127 , cos127 )) + float2( 0.5,0.5 );
  889. float4 texCoord151 = IN.ase_texcoord4;
  890. texCoord151.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  891. float2 appendResult154 = (float2(texCoord151.z , texCoord151.w));
  892. float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  893. float2 lerpResult157 = lerp( rotator127 , ( appendResult154 + uv_MainTex ) , round( _CustomDataSwitch ));
  894. float4 tex2DNode33 = tex2D( _MainTex, lerpResult157 );
  895. float4 break92 = ( tex2DNode33 * _MainTexChannel );
  896. float clampResult94 = clamp( ( break92.r + break92.g + break92.b + break92.a ) , 0.0 , 1.0 );
  897. float2 uv_DissolveTex = IN.ase_texcoord3.xy * _DissolveTex_ST.xy + _DissolveTex_ST.zw;
  898. float4 texCoord145 = IN.ase_texcoord4;
  899. texCoord145.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  900. float2 appendResult143 = (float2(texCoord145.z , texCoord145.w));
  901. float4 tex2DNode66 = tex2D( _DissolveTex, ( uv_DissolveTex + appendResult143 ) );
  902. #ifdef _DISSOLVETEXFLIP_ON
  903. float staticSwitch110 = ( 1.0 - tex2DNode66.r );
  904. #else
  905. float staticSwitch110 = tex2DNode66.r;
  906. #endif
  907. float4 texCoord111 = IN.ase_texcoord4;
  908. texCoord111.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  909. float clampResult120 = clamp( ( 1.0 - pow( ( 1.0 - pow( staticSwitch110 , _DissolvePower ) ) , (1.0 + (texCoord111.x - 0.0) * (_DissolveExpReversed - 1.0) / (1.0 - 0.0)) ) ) , 0.0 , 1.0 );
  910. float4 texCoord122 = IN.ase_texcoord4;
  911. texCoord122.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  912. float clampResult124 = clamp( ( clampResult120 + (-1.0 + (texCoord122.x - 0.0) * (1.0 - -1.0) / (1.0 - 0.0)) ) , 0.0 , 1.0 );
  913. float lerpResult147 = lerp( clampResult124 , 0.0 , round( _DissolveSwitch ));
  914. float clampResult96 = clamp( ( clampResult94 - lerpResult147 ) , 0.0 , 1.0 );
  915. float2 uv_MaskTex = IN.ase_texcoord3.xy * _MaskTex_ST.xy + _MaskTex_ST.zw;
  916. float clampResult100 = clamp( ( clampResult96 * IN.ase_color.a * _OpacityPower * tex2D( _MaskTex, uv_MaskTex ).r ) , 0.0 , 1.0 );
  917. float lerpResult34 = lerp( clampResult94 , clampResult100 , _RampDirection);
  918. float2 appendResult44 = (float2(( 1.0 - pow( ( 1.0 - lerpResult34 ) , _RampPower ) ) , 0.0));
  919. float3 BakedAlbedo = 0;
  920. float3 BakedEmission = 0;
  921. float3 Color = ( ( IN.ase_color * _ColorPower ) * ( tex2D( _Ramp, appendResult44 ) * _Color * tex2DNode33 ) ).rgb;
  922. float Alpha = clampResult100;
  923. float AlphaClipThreshold = 0.5;
  924. float AlphaClipThresholdShadow = 0.5;
  925. #ifdef _ALPHATEST_ON
  926. clip( Alpha - AlphaClipThreshold );
  927. #endif
  928. #if defined(_DBUFFER)
  929. ApplyDecalToBaseColor(IN.clipPos, Color);
  930. #endif
  931. #if defined(_ALPHAPREMULTIPLY_ON)
  932. Color *= Alpha;
  933. #endif
  934. #ifdef LOD_FADE_CROSSFADE
  935. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  936. #endif
  937. #ifdef ASE_FOG
  938. Color = MixFog( Color, IN.fogFactor );
  939. #endif
  940. return half4( Color, Alpha );
  941. }
  942. ENDHLSL
  943. }
  944. Pass
  945. {
  946. Name "SceneSelectionPass"
  947. Tags { "LightMode"="SceneSelectionPass" }
  948. Cull Off
  949. HLSLPROGRAM
  950. #pragma multi_compile_instancing
  951. #define _RECEIVE_SHADOWS_OFF 1
  952. #define ASE_SRP_VERSION 999999
  953. #pragma only_renderers d3d11 glcore gles gles3
  954. #pragma vertex vert
  955. #pragma fragment frag
  956. #define ATTRIBUTES_NEED_NORMAL
  957. #define ATTRIBUTES_NEED_TANGENT
  958. #define SHADERPASS SHADERPASS_DEPTHONLY
  959. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  960. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  961. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  962. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  963. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  964. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  965. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  966. #pragma shader_feature_local _DISSOLVETEXFLIP_ON
  967. struct VertexInput
  968. {
  969. float4 vertex : POSITION;
  970. float3 ase_normal : NORMAL;
  971. float4 ase_texcoord : TEXCOORD0;
  972. float4 ase_texcoord1 : TEXCOORD1;
  973. float4 ase_color : COLOR;
  974. UNITY_VERTEX_INPUT_INSTANCE_ID
  975. };
  976. struct VertexOutput
  977. {
  978. float4 clipPos : SV_POSITION;
  979. float4 ase_texcoord : TEXCOORD0;
  980. float4 ase_texcoord1 : TEXCOORD1;
  981. float4 ase_color : COLOR;
  982. UNITY_VERTEX_INPUT_INSTANCE_ID
  983. UNITY_VERTEX_OUTPUT_STEREO
  984. };
  985. CBUFFER_START(UnityPerMaterial)
  986. float4 _MainTex_ST;
  987. float4 _MainTexChannel;
  988. float4 _DissolveTex_ST;
  989. float4 _MaskTex_ST;
  990. float4 _Color;
  991. float _ColorPower;
  992. float _MainTexRotation;
  993. float _CustomDataSwitch;
  994. float _DissolvePower;
  995. float _DissolveExpReversed;
  996. float _DissolveSwitch;
  997. float _OpacityPower;
  998. float _RampDirection;
  999. float _RampPower;
  1000. #ifdef TESSELLATION_ON
  1001. float _TessPhongStrength;
  1002. float _TessValue;
  1003. float _TessMin;
  1004. float _TessMax;
  1005. float _TessEdgeLength;
  1006. float _TessMaxDisp;
  1007. #endif
  1008. CBUFFER_END
  1009. sampler2D _MainTex;
  1010. sampler2D _DissolveTex;
  1011. sampler2D _MaskTex;
  1012. int _ObjectId;
  1013. int _PassValue;
  1014. struct SurfaceDescription
  1015. {
  1016. float Alpha;
  1017. float AlphaClipThreshold;
  1018. };
  1019. VertexOutput VertexFunction(VertexInput v )
  1020. {
  1021. VertexOutput o;
  1022. ZERO_INITIALIZE(VertexOutput, o);
  1023. UNITY_SETUP_INSTANCE_ID(v);
  1024. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1025. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1026. o.ase_texcoord.xy = v.ase_texcoord.xy;
  1027. o.ase_texcoord1 = v.ase_texcoord1;
  1028. o.ase_color = v.ase_color;
  1029. //setting value to unused interpolator channels and avoid initialization warnings
  1030. o.ase_texcoord.zw = 0;
  1031. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1032. float3 defaultVertexValue = v.vertex.xyz;
  1033. #else
  1034. float3 defaultVertexValue = float3(0, 0, 0);
  1035. #endif
  1036. float3 vertexValue = defaultVertexValue;
  1037. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1038. v.vertex.xyz = vertexValue;
  1039. #else
  1040. v.vertex.xyz += vertexValue;
  1041. #endif
  1042. v.ase_normal = v.ase_normal;
  1043. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1044. o.clipPos = TransformWorldToHClip(positionWS);
  1045. return o;
  1046. }
  1047. #if defined(TESSELLATION_ON)
  1048. struct VertexControl
  1049. {
  1050. float4 vertex : INTERNALTESSPOS;
  1051. float3 ase_normal : NORMAL;
  1052. float4 ase_texcoord : TEXCOORD0;
  1053. float4 ase_texcoord1 : TEXCOORD1;
  1054. float4 ase_color : COLOR;
  1055. UNITY_VERTEX_INPUT_INSTANCE_ID
  1056. };
  1057. struct TessellationFactors
  1058. {
  1059. float edge[3] : SV_TessFactor;
  1060. float inside : SV_InsideTessFactor;
  1061. };
  1062. VertexControl vert ( VertexInput v )
  1063. {
  1064. VertexControl o;
  1065. UNITY_SETUP_INSTANCE_ID(v);
  1066. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1067. o.vertex = v.vertex;
  1068. o.ase_normal = v.ase_normal;
  1069. o.ase_texcoord = v.ase_texcoord;
  1070. o.ase_texcoord1 = v.ase_texcoord1;
  1071. o.ase_color = v.ase_color;
  1072. return o;
  1073. }
  1074. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1075. {
  1076. TessellationFactors o;
  1077. float4 tf = 1;
  1078. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1079. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1080. #if defined(ASE_FIXED_TESSELLATION)
  1081. tf = FixedTess( tessValue );
  1082. #elif defined(ASE_DISTANCE_TESSELLATION)
  1083. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1084. #elif defined(ASE_LENGTH_TESSELLATION)
  1085. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1086. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1087. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1088. #endif
  1089. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1090. return o;
  1091. }
  1092. [domain("tri")]
  1093. [partitioning("fractional_odd")]
  1094. [outputtopology("triangle_cw")]
  1095. [patchconstantfunc("TessellationFunction")]
  1096. [outputcontrolpoints(3)]
  1097. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1098. {
  1099. return patch[id];
  1100. }
  1101. [domain("tri")]
  1102. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1103. {
  1104. VertexInput o = (VertexInput) 0;
  1105. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1106. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1107. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1108. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1109. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1110. #if defined(ASE_PHONG_TESSELLATION)
  1111. float3 pp[3];
  1112. for (int i = 0; i < 3; ++i)
  1113. pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
  1114. float phongStrength = _TessPhongStrength;
  1115. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1116. #endif
  1117. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1118. return VertexFunction(o);
  1119. }
  1120. #else
  1121. VertexOutput vert ( VertexInput v )
  1122. {
  1123. return VertexFunction( v );
  1124. }
  1125. #endif
  1126. half4 frag(VertexOutput IN ) : SV_TARGET
  1127. {
  1128. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1129. float cos127 = cos( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  1130. float sin127 = sin( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  1131. float2 rotator127 = mul( IN.ase_texcoord.xy - float2( 0.5,0.5 ) , float2x2( cos127 , -sin127 , sin127 , cos127 )) + float2( 0.5,0.5 );
  1132. float4 texCoord151 = IN.ase_texcoord1;
  1133. texCoord151.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1134. float2 appendResult154 = (float2(texCoord151.z , texCoord151.w));
  1135. float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1136. float2 lerpResult157 = lerp( rotator127 , ( appendResult154 + uv_MainTex ) , round( _CustomDataSwitch ));
  1137. float4 tex2DNode33 = tex2D( _MainTex, lerpResult157 );
  1138. float4 break92 = ( tex2DNode33 * _MainTexChannel );
  1139. float clampResult94 = clamp( ( break92.r + break92.g + break92.b + break92.a ) , 0.0 , 1.0 );
  1140. float2 uv_DissolveTex = IN.ase_texcoord.xy * _DissolveTex_ST.xy + _DissolveTex_ST.zw;
  1141. float4 texCoord145 = IN.ase_texcoord1;
  1142. texCoord145.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1143. float2 appendResult143 = (float2(texCoord145.z , texCoord145.w));
  1144. float4 tex2DNode66 = tex2D( _DissolveTex, ( uv_DissolveTex + appendResult143 ) );
  1145. #ifdef _DISSOLVETEXFLIP_ON
  1146. float staticSwitch110 = ( 1.0 - tex2DNode66.r );
  1147. #else
  1148. float staticSwitch110 = tex2DNode66.r;
  1149. #endif
  1150. float4 texCoord111 = IN.ase_texcoord1;
  1151. texCoord111.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1152. float clampResult120 = clamp( ( 1.0 - pow( ( 1.0 - pow( staticSwitch110 , _DissolvePower ) ) , (1.0 + (texCoord111.x - 0.0) * (_DissolveExpReversed - 1.0) / (1.0 - 0.0)) ) ) , 0.0 , 1.0 );
  1153. float4 texCoord122 = IN.ase_texcoord1;
  1154. texCoord122.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1155. float clampResult124 = clamp( ( clampResult120 + (-1.0 + (texCoord122.x - 0.0) * (1.0 - -1.0) / (1.0 - 0.0)) ) , 0.0 , 1.0 );
  1156. float lerpResult147 = lerp( clampResult124 , 0.0 , round( _DissolveSwitch ));
  1157. float clampResult96 = clamp( ( clampResult94 - lerpResult147 ) , 0.0 , 1.0 );
  1158. float2 uv_MaskTex = IN.ase_texcoord.xy * _MaskTex_ST.xy + _MaskTex_ST.zw;
  1159. float clampResult100 = clamp( ( clampResult96 * IN.ase_color.a * _OpacityPower * tex2D( _MaskTex, uv_MaskTex ).r ) , 0.0 , 1.0 );
  1160. surfaceDescription.Alpha = clampResult100;
  1161. surfaceDescription.AlphaClipThreshold = 0.5;
  1162. #if _ALPHATEST_ON
  1163. float alphaClipThreshold = 0.01f;
  1164. #if ALPHA_CLIP_THRESHOLD
  1165. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1166. #endif
  1167. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1168. #endif
  1169. half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  1170. return outColor;
  1171. }
  1172. ENDHLSL
  1173. }
  1174. Pass
  1175. {
  1176. Name "ScenePickingPass"
  1177. Tags { "LightMode"="Picking" }
  1178. HLSLPROGRAM
  1179. #pragma multi_compile_instancing
  1180. #define _RECEIVE_SHADOWS_OFF 1
  1181. #define ASE_SRP_VERSION 999999
  1182. #pragma only_renderers d3d11 glcore gles gles3
  1183. #pragma vertex vert
  1184. #pragma fragment frag
  1185. #define ATTRIBUTES_NEED_NORMAL
  1186. #define ATTRIBUTES_NEED_TANGENT
  1187. #define SHADERPASS SHADERPASS_DEPTHONLY
  1188. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1189. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1190. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1191. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1192. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1193. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1194. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1195. #pragma shader_feature_local _DISSOLVETEXFLIP_ON
  1196. struct VertexInput
  1197. {
  1198. float4 vertex : POSITION;
  1199. float3 ase_normal : NORMAL;
  1200. float4 ase_texcoord : TEXCOORD0;
  1201. float4 ase_texcoord1 : TEXCOORD1;
  1202. float4 ase_color : COLOR;
  1203. UNITY_VERTEX_INPUT_INSTANCE_ID
  1204. };
  1205. struct VertexOutput
  1206. {
  1207. float4 clipPos : SV_POSITION;
  1208. float4 ase_texcoord : TEXCOORD0;
  1209. float4 ase_texcoord1 : TEXCOORD1;
  1210. float4 ase_color : COLOR;
  1211. UNITY_VERTEX_INPUT_INSTANCE_ID
  1212. UNITY_VERTEX_OUTPUT_STEREO
  1213. };
  1214. CBUFFER_START(UnityPerMaterial)
  1215. float4 _MainTex_ST;
  1216. float4 _MainTexChannel;
  1217. float4 _DissolveTex_ST;
  1218. float4 _MaskTex_ST;
  1219. float4 _Color;
  1220. float _ColorPower;
  1221. float _MainTexRotation;
  1222. float _CustomDataSwitch;
  1223. float _DissolvePower;
  1224. float _DissolveExpReversed;
  1225. float _DissolveSwitch;
  1226. float _OpacityPower;
  1227. float _RampDirection;
  1228. float _RampPower;
  1229. #ifdef TESSELLATION_ON
  1230. float _TessPhongStrength;
  1231. float _TessValue;
  1232. float _TessMin;
  1233. float _TessMax;
  1234. float _TessEdgeLength;
  1235. float _TessMaxDisp;
  1236. #endif
  1237. CBUFFER_END
  1238. sampler2D _MainTex;
  1239. sampler2D _DissolveTex;
  1240. sampler2D _MaskTex;
  1241. float4 _SelectionID;
  1242. struct SurfaceDescription
  1243. {
  1244. float Alpha;
  1245. float AlphaClipThreshold;
  1246. };
  1247. VertexOutput VertexFunction(VertexInput v )
  1248. {
  1249. VertexOutput o;
  1250. ZERO_INITIALIZE(VertexOutput, o);
  1251. UNITY_SETUP_INSTANCE_ID(v);
  1252. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1253. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1254. o.ase_texcoord.xy = v.ase_texcoord.xy;
  1255. o.ase_texcoord1 = v.ase_texcoord1;
  1256. o.ase_color = v.ase_color;
  1257. //setting value to unused interpolator channels and avoid initialization warnings
  1258. o.ase_texcoord.zw = 0;
  1259. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1260. float3 defaultVertexValue = v.vertex.xyz;
  1261. #else
  1262. float3 defaultVertexValue = float3(0, 0, 0);
  1263. #endif
  1264. float3 vertexValue = defaultVertexValue;
  1265. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1266. v.vertex.xyz = vertexValue;
  1267. #else
  1268. v.vertex.xyz += vertexValue;
  1269. #endif
  1270. v.ase_normal = v.ase_normal;
  1271. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1272. o.clipPos = TransformWorldToHClip(positionWS);
  1273. return o;
  1274. }
  1275. #if defined(TESSELLATION_ON)
  1276. struct VertexControl
  1277. {
  1278. float4 vertex : INTERNALTESSPOS;
  1279. float3 ase_normal : NORMAL;
  1280. float4 ase_texcoord : TEXCOORD0;
  1281. float4 ase_texcoord1 : TEXCOORD1;
  1282. float4 ase_color : COLOR;
  1283. UNITY_VERTEX_INPUT_INSTANCE_ID
  1284. };
  1285. struct TessellationFactors
  1286. {
  1287. float edge[3] : SV_TessFactor;
  1288. float inside : SV_InsideTessFactor;
  1289. };
  1290. VertexControl vert ( VertexInput v )
  1291. {
  1292. VertexControl o;
  1293. UNITY_SETUP_INSTANCE_ID(v);
  1294. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1295. o.vertex = v.vertex;
  1296. o.ase_normal = v.ase_normal;
  1297. o.ase_texcoord = v.ase_texcoord;
  1298. o.ase_texcoord1 = v.ase_texcoord1;
  1299. o.ase_color = v.ase_color;
  1300. return o;
  1301. }
  1302. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1303. {
  1304. TessellationFactors o;
  1305. float4 tf = 1;
  1306. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1307. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1308. #if defined(ASE_FIXED_TESSELLATION)
  1309. tf = FixedTess( tessValue );
  1310. #elif defined(ASE_DISTANCE_TESSELLATION)
  1311. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1312. #elif defined(ASE_LENGTH_TESSELLATION)
  1313. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1314. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1315. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1316. #endif
  1317. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1318. return o;
  1319. }
  1320. [domain("tri")]
  1321. [partitioning("fractional_odd")]
  1322. [outputtopology("triangle_cw")]
  1323. [patchconstantfunc("TessellationFunction")]
  1324. [outputcontrolpoints(3)]
  1325. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1326. {
  1327. return patch[id];
  1328. }
  1329. [domain("tri")]
  1330. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1331. {
  1332. VertexInput o = (VertexInput) 0;
  1333. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1334. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1335. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1336. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1337. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1338. #if defined(ASE_PHONG_TESSELLATION)
  1339. float3 pp[3];
  1340. for (int i = 0; i < 3; ++i)
  1341. pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
  1342. float phongStrength = _TessPhongStrength;
  1343. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1344. #endif
  1345. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1346. return VertexFunction(o);
  1347. }
  1348. #else
  1349. VertexOutput vert ( VertexInput v )
  1350. {
  1351. return VertexFunction( v );
  1352. }
  1353. #endif
  1354. half4 frag(VertexOutput IN ) : SV_TARGET
  1355. {
  1356. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1357. float cos127 = cos( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  1358. float sin127 = sin( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  1359. float2 rotator127 = mul( IN.ase_texcoord.xy - float2( 0.5,0.5 ) , float2x2( cos127 , -sin127 , sin127 , cos127 )) + float2( 0.5,0.5 );
  1360. float4 texCoord151 = IN.ase_texcoord1;
  1361. texCoord151.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1362. float2 appendResult154 = (float2(texCoord151.z , texCoord151.w));
  1363. float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1364. float2 lerpResult157 = lerp( rotator127 , ( appendResult154 + uv_MainTex ) , round( _CustomDataSwitch ));
  1365. float4 tex2DNode33 = tex2D( _MainTex, lerpResult157 );
  1366. float4 break92 = ( tex2DNode33 * _MainTexChannel );
  1367. float clampResult94 = clamp( ( break92.r + break92.g + break92.b + break92.a ) , 0.0 , 1.0 );
  1368. float2 uv_DissolveTex = IN.ase_texcoord.xy * _DissolveTex_ST.xy + _DissolveTex_ST.zw;
  1369. float4 texCoord145 = IN.ase_texcoord1;
  1370. texCoord145.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1371. float2 appendResult143 = (float2(texCoord145.z , texCoord145.w));
  1372. float4 tex2DNode66 = tex2D( _DissolveTex, ( uv_DissolveTex + appendResult143 ) );
  1373. #ifdef _DISSOLVETEXFLIP_ON
  1374. float staticSwitch110 = ( 1.0 - tex2DNode66.r );
  1375. #else
  1376. float staticSwitch110 = tex2DNode66.r;
  1377. #endif
  1378. float4 texCoord111 = IN.ase_texcoord1;
  1379. texCoord111.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1380. float clampResult120 = clamp( ( 1.0 - pow( ( 1.0 - pow( staticSwitch110 , _DissolvePower ) ) , (1.0 + (texCoord111.x - 0.0) * (_DissolveExpReversed - 1.0) / (1.0 - 0.0)) ) ) , 0.0 , 1.0 );
  1381. float4 texCoord122 = IN.ase_texcoord1;
  1382. texCoord122.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1383. float clampResult124 = clamp( ( clampResult120 + (-1.0 + (texCoord122.x - 0.0) * (1.0 - -1.0) / (1.0 - 0.0)) ) , 0.0 , 1.0 );
  1384. float lerpResult147 = lerp( clampResult124 , 0.0 , round( _DissolveSwitch ));
  1385. float clampResult96 = clamp( ( clampResult94 - lerpResult147 ) , 0.0 , 1.0 );
  1386. float2 uv_MaskTex = IN.ase_texcoord.xy * _MaskTex_ST.xy + _MaskTex_ST.zw;
  1387. float clampResult100 = clamp( ( clampResult96 * IN.ase_color.a * _OpacityPower * tex2D( _MaskTex, uv_MaskTex ).r ) , 0.0 , 1.0 );
  1388. surfaceDescription.Alpha = clampResult100;
  1389. surfaceDescription.AlphaClipThreshold = 0.5;
  1390. #if _ALPHATEST_ON
  1391. float alphaClipThreshold = 0.01f;
  1392. #if ALPHA_CLIP_THRESHOLD
  1393. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1394. #endif
  1395. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1396. #endif
  1397. half4 outColor = 0;
  1398. outColor = _SelectionID;
  1399. return outColor;
  1400. }
  1401. ENDHLSL
  1402. }
  1403. Pass
  1404. {
  1405. Name "DepthNormals"
  1406. Tags { "LightMode"="DepthNormalsOnly" }
  1407. ZTest LEqual
  1408. ZWrite On
  1409. HLSLPROGRAM
  1410. #pragma multi_compile_instancing
  1411. #define _RECEIVE_SHADOWS_OFF 1
  1412. #define ASE_SRP_VERSION 999999
  1413. #pragma only_renderers d3d11 glcore gles gles3
  1414. #pragma multi_compile_fog
  1415. #pragma instancing_options renderinglayer
  1416. #pragma vertex vert
  1417. #pragma fragment frag
  1418. #define ATTRIBUTES_NEED_NORMAL
  1419. #define ATTRIBUTES_NEED_TANGENT
  1420. #define VARYINGS_NEED_NORMAL_WS
  1421. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1422. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1423. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1424. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1425. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1426. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1427. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1428. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1429. #pragma shader_feature_local _DISSOLVETEXFLIP_ON
  1430. struct VertexInput
  1431. {
  1432. float4 vertex : POSITION;
  1433. float3 ase_normal : NORMAL;
  1434. float4 ase_texcoord : TEXCOORD0;
  1435. float4 ase_texcoord1 : TEXCOORD1;
  1436. float4 ase_color : COLOR;
  1437. UNITY_VERTEX_INPUT_INSTANCE_ID
  1438. };
  1439. struct VertexOutput
  1440. {
  1441. float4 clipPos : SV_POSITION;
  1442. float3 normalWS : TEXCOORD0;
  1443. float4 ase_texcoord1 : TEXCOORD1;
  1444. float4 ase_texcoord2 : TEXCOORD2;
  1445. float4 ase_color : COLOR;
  1446. UNITY_VERTEX_INPUT_INSTANCE_ID
  1447. UNITY_VERTEX_OUTPUT_STEREO
  1448. };
  1449. CBUFFER_START(UnityPerMaterial)
  1450. float4 _MainTex_ST;
  1451. float4 _MainTexChannel;
  1452. float4 _DissolveTex_ST;
  1453. float4 _MaskTex_ST;
  1454. float4 _Color;
  1455. float _ColorPower;
  1456. float _MainTexRotation;
  1457. float _CustomDataSwitch;
  1458. float _DissolvePower;
  1459. float _DissolveExpReversed;
  1460. float _DissolveSwitch;
  1461. float _OpacityPower;
  1462. float _RampDirection;
  1463. float _RampPower;
  1464. #ifdef TESSELLATION_ON
  1465. float _TessPhongStrength;
  1466. float _TessValue;
  1467. float _TessMin;
  1468. float _TessMax;
  1469. float _TessEdgeLength;
  1470. float _TessMaxDisp;
  1471. #endif
  1472. CBUFFER_END
  1473. sampler2D _MainTex;
  1474. sampler2D _DissolveTex;
  1475. sampler2D _MaskTex;
  1476. struct SurfaceDescription
  1477. {
  1478. float Alpha;
  1479. float AlphaClipThreshold;
  1480. };
  1481. VertexOutput VertexFunction(VertexInput v )
  1482. {
  1483. VertexOutput o;
  1484. ZERO_INITIALIZE(VertexOutput, o);
  1485. UNITY_SETUP_INSTANCE_ID(v);
  1486. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1487. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1488. o.ase_texcoord1.xy = v.ase_texcoord.xy;
  1489. o.ase_texcoord2 = v.ase_texcoord1;
  1490. o.ase_color = v.ase_color;
  1491. //setting value to unused interpolator channels and avoid initialization warnings
  1492. o.ase_texcoord1.zw = 0;
  1493. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1494. float3 defaultVertexValue = v.vertex.xyz;
  1495. #else
  1496. float3 defaultVertexValue = float3(0, 0, 0);
  1497. #endif
  1498. float3 vertexValue = defaultVertexValue;
  1499. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1500. v.vertex.xyz = vertexValue;
  1501. #else
  1502. v.vertex.xyz += vertexValue;
  1503. #endif
  1504. v.ase_normal = v.ase_normal;
  1505. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1506. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1507. o.clipPos = TransformWorldToHClip(positionWS);
  1508. o.normalWS.xyz = normalWS;
  1509. return o;
  1510. }
  1511. #if defined(TESSELLATION_ON)
  1512. struct VertexControl
  1513. {
  1514. float4 vertex : INTERNALTESSPOS;
  1515. float3 ase_normal : NORMAL;
  1516. float4 ase_texcoord : TEXCOORD0;
  1517. float4 ase_texcoord1 : TEXCOORD1;
  1518. float4 ase_color : COLOR;
  1519. UNITY_VERTEX_INPUT_INSTANCE_ID
  1520. };
  1521. struct TessellationFactors
  1522. {
  1523. float edge[3] : SV_TessFactor;
  1524. float inside : SV_InsideTessFactor;
  1525. };
  1526. VertexControl vert ( VertexInput v )
  1527. {
  1528. VertexControl o;
  1529. UNITY_SETUP_INSTANCE_ID(v);
  1530. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1531. o.vertex = v.vertex;
  1532. o.ase_normal = v.ase_normal;
  1533. o.ase_texcoord = v.ase_texcoord;
  1534. o.ase_texcoord1 = v.ase_texcoord1;
  1535. o.ase_color = v.ase_color;
  1536. return o;
  1537. }
  1538. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1539. {
  1540. TessellationFactors o;
  1541. float4 tf = 1;
  1542. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1543. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1544. #if defined(ASE_FIXED_TESSELLATION)
  1545. tf = FixedTess( tessValue );
  1546. #elif defined(ASE_DISTANCE_TESSELLATION)
  1547. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1548. #elif defined(ASE_LENGTH_TESSELLATION)
  1549. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1550. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1551. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1552. #endif
  1553. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1554. return o;
  1555. }
  1556. [domain("tri")]
  1557. [partitioning("fractional_odd")]
  1558. [outputtopology("triangle_cw")]
  1559. [patchconstantfunc("TessellationFunction")]
  1560. [outputcontrolpoints(3)]
  1561. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1562. {
  1563. return patch[id];
  1564. }
  1565. [domain("tri")]
  1566. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1567. {
  1568. VertexInput o = (VertexInput) 0;
  1569. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1570. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1571. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1572. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1573. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1574. #if defined(ASE_PHONG_TESSELLATION)
  1575. float3 pp[3];
  1576. for (int i = 0; i < 3; ++i)
  1577. pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
  1578. float phongStrength = _TessPhongStrength;
  1579. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1580. #endif
  1581. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1582. return VertexFunction(o);
  1583. }
  1584. #else
  1585. VertexOutput vert ( VertexInput v )
  1586. {
  1587. return VertexFunction( v );
  1588. }
  1589. #endif
  1590. half4 frag(VertexOutput IN ) : SV_TARGET
  1591. {
  1592. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1593. float cos127 = cos( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  1594. float sin127 = sin( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  1595. float2 rotator127 = mul( IN.ase_texcoord1.xy - float2( 0.5,0.5 ) , float2x2( cos127 , -sin127 , sin127 , cos127 )) + float2( 0.5,0.5 );
  1596. float4 texCoord151 = IN.ase_texcoord2;
  1597. texCoord151.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1598. float2 appendResult154 = (float2(texCoord151.z , texCoord151.w));
  1599. float2 uv_MainTex = IN.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1600. float2 lerpResult157 = lerp( rotator127 , ( appendResult154 + uv_MainTex ) , round( _CustomDataSwitch ));
  1601. float4 tex2DNode33 = tex2D( _MainTex, lerpResult157 );
  1602. float4 break92 = ( tex2DNode33 * _MainTexChannel );
  1603. float clampResult94 = clamp( ( break92.r + break92.g + break92.b + break92.a ) , 0.0 , 1.0 );
  1604. float2 uv_DissolveTex = IN.ase_texcoord1.xy * _DissolveTex_ST.xy + _DissolveTex_ST.zw;
  1605. float4 texCoord145 = IN.ase_texcoord2;
  1606. texCoord145.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1607. float2 appendResult143 = (float2(texCoord145.z , texCoord145.w));
  1608. float4 tex2DNode66 = tex2D( _DissolveTex, ( uv_DissolveTex + appendResult143 ) );
  1609. #ifdef _DISSOLVETEXFLIP_ON
  1610. float staticSwitch110 = ( 1.0 - tex2DNode66.r );
  1611. #else
  1612. float staticSwitch110 = tex2DNode66.r;
  1613. #endif
  1614. float4 texCoord111 = IN.ase_texcoord2;
  1615. texCoord111.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1616. float clampResult120 = clamp( ( 1.0 - pow( ( 1.0 - pow( staticSwitch110 , _DissolvePower ) ) , (1.0 + (texCoord111.x - 0.0) * (_DissolveExpReversed - 1.0) / (1.0 - 0.0)) ) ) , 0.0 , 1.0 );
  1617. float4 texCoord122 = IN.ase_texcoord2;
  1618. texCoord122.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1619. float clampResult124 = clamp( ( clampResult120 + (-1.0 + (texCoord122.x - 0.0) * (1.0 - -1.0) / (1.0 - 0.0)) ) , 0.0 , 1.0 );
  1620. float lerpResult147 = lerp( clampResult124 , 0.0 , round( _DissolveSwitch ));
  1621. float clampResult96 = clamp( ( clampResult94 - lerpResult147 ) , 0.0 , 1.0 );
  1622. float2 uv_MaskTex = IN.ase_texcoord1.xy * _MaskTex_ST.xy + _MaskTex_ST.zw;
  1623. float clampResult100 = clamp( ( clampResult96 * IN.ase_color.a * _OpacityPower * tex2D( _MaskTex, uv_MaskTex ).r ) , 0.0 , 1.0 );
  1624. surfaceDescription.Alpha = clampResult100;
  1625. surfaceDescription.AlphaClipThreshold = 0.5;
  1626. #if _ALPHATEST_ON
  1627. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1628. #endif
  1629. #ifdef LOD_FADE_CROSSFADE
  1630. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1631. #endif
  1632. float3 normalWS = IN.normalWS;
  1633. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1634. }
  1635. ENDHLSL
  1636. }
  1637. Pass
  1638. {
  1639. Name "DepthNormalsOnly"
  1640. Tags { "LightMode"="DepthNormalsOnly" }
  1641. ZTest LEqual
  1642. ZWrite On
  1643. HLSLPROGRAM
  1644. #pragma multi_compile_instancing
  1645. #define _RECEIVE_SHADOWS_OFF 1
  1646. #define ASE_SRP_VERSION 999999
  1647. #pragma exclude_renderers glcore gles gles3
  1648. #pragma vertex vert
  1649. #pragma fragment frag
  1650. #define ATTRIBUTES_NEED_NORMAL
  1651. #define ATTRIBUTES_NEED_TANGENT
  1652. #define ATTRIBUTES_NEED_TEXCOORD1
  1653. #define VARYINGS_NEED_NORMAL_WS
  1654. #define VARYINGS_NEED_TANGENT_WS
  1655. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1656. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1657. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1658. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1659. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1660. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1661. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1662. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1663. #pragma shader_feature_local _DISSOLVETEXFLIP_ON
  1664. struct VertexInput
  1665. {
  1666. float4 vertex : POSITION;
  1667. float3 ase_normal : NORMAL;
  1668. float4 ase_texcoord : TEXCOORD0;
  1669. float4 ase_texcoord1 : TEXCOORD1;
  1670. float4 ase_color : COLOR;
  1671. UNITY_VERTEX_INPUT_INSTANCE_ID
  1672. };
  1673. struct VertexOutput
  1674. {
  1675. float4 clipPos : SV_POSITION;
  1676. float3 normalWS : TEXCOORD0;
  1677. float4 ase_texcoord1 : TEXCOORD1;
  1678. float4 ase_texcoord2 : TEXCOORD2;
  1679. float4 ase_color : COLOR;
  1680. UNITY_VERTEX_INPUT_INSTANCE_ID
  1681. UNITY_VERTEX_OUTPUT_STEREO
  1682. };
  1683. CBUFFER_START(UnityPerMaterial)
  1684. float4 _MainTex_ST;
  1685. float4 _MainTexChannel;
  1686. float4 _DissolveTex_ST;
  1687. float4 _MaskTex_ST;
  1688. float4 _Color;
  1689. float _ColorPower;
  1690. float _MainTexRotation;
  1691. float _CustomDataSwitch;
  1692. float _DissolvePower;
  1693. float _DissolveExpReversed;
  1694. float _DissolveSwitch;
  1695. float _OpacityPower;
  1696. float _RampDirection;
  1697. float _RampPower;
  1698. #ifdef TESSELLATION_ON
  1699. float _TessPhongStrength;
  1700. float _TessValue;
  1701. float _TessMin;
  1702. float _TessMax;
  1703. float _TessEdgeLength;
  1704. float _TessMaxDisp;
  1705. #endif
  1706. CBUFFER_END
  1707. sampler2D _MainTex;
  1708. sampler2D _DissolveTex;
  1709. sampler2D _MaskTex;
  1710. struct SurfaceDescription
  1711. {
  1712. float Alpha;
  1713. float AlphaClipThreshold;
  1714. };
  1715. VertexOutput VertexFunction(VertexInput v )
  1716. {
  1717. VertexOutput o;
  1718. ZERO_INITIALIZE(VertexOutput, o);
  1719. UNITY_SETUP_INSTANCE_ID(v);
  1720. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1721. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1722. o.ase_texcoord1.xy = v.ase_texcoord.xy;
  1723. o.ase_texcoord2 = v.ase_texcoord1;
  1724. o.ase_color = v.ase_color;
  1725. //setting value to unused interpolator channels and avoid initialization warnings
  1726. o.ase_texcoord1.zw = 0;
  1727. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1728. float3 defaultVertexValue = v.vertex.xyz;
  1729. #else
  1730. float3 defaultVertexValue = float3(0, 0, 0);
  1731. #endif
  1732. float3 vertexValue = defaultVertexValue;
  1733. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1734. v.vertex.xyz = vertexValue;
  1735. #else
  1736. v.vertex.xyz += vertexValue;
  1737. #endif
  1738. v.ase_normal = v.ase_normal;
  1739. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1740. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1741. o.clipPos = TransformWorldToHClip(positionWS);
  1742. o.normalWS.xyz = normalWS;
  1743. return o;
  1744. }
  1745. #if defined(TESSELLATION_ON)
  1746. struct VertexControl
  1747. {
  1748. float4 vertex : INTERNALTESSPOS;
  1749. float3 ase_normal : NORMAL;
  1750. float4 ase_texcoord : TEXCOORD0;
  1751. float4 ase_texcoord1 : TEXCOORD1;
  1752. float4 ase_color : COLOR;
  1753. UNITY_VERTEX_INPUT_INSTANCE_ID
  1754. };
  1755. struct TessellationFactors
  1756. {
  1757. float edge[3] : SV_TessFactor;
  1758. float inside : SV_InsideTessFactor;
  1759. };
  1760. VertexControl vert ( VertexInput v )
  1761. {
  1762. VertexControl o;
  1763. UNITY_SETUP_INSTANCE_ID(v);
  1764. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1765. o.vertex = v.vertex;
  1766. o.ase_normal = v.ase_normal;
  1767. o.ase_texcoord = v.ase_texcoord;
  1768. o.ase_texcoord1 = v.ase_texcoord1;
  1769. o.ase_color = v.ase_color;
  1770. return o;
  1771. }
  1772. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1773. {
  1774. TessellationFactors o;
  1775. float4 tf = 1;
  1776. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1777. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1778. #if defined(ASE_FIXED_TESSELLATION)
  1779. tf = FixedTess( tessValue );
  1780. #elif defined(ASE_DISTANCE_TESSELLATION)
  1781. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1782. #elif defined(ASE_LENGTH_TESSELLATION)
  1783. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1784. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1785. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1786. #endif
  1787. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1788. return o;
  1789. }
  1790. [domain("tri")]
  1791. [partitioning("fractional_odd")]
  1792. [outputtopology("triangle_cw")]
  1793. [patchconstantfunc("TessellationFunction")]
  1794. [outputcontrolpoints(3)]
  1795. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1796. {
  1797. return patch[id];
  1798. }
  1799. [domain("tri")]
  1800. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1801. {
  1802. VertexInput o = (VertexInput) 0;
  1803. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1804. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1805. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1806. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1807. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1808. #if defined(ASE_PHONG_TESSELLATION)
  1809. float3 pp[3];
  1810. for (int i = 0; i < 3; ++i)
  1811. pp[i] = o.vertex.xyz - patch[i].ase_normal * (dot(o.vertex.xyz, patch[i].ase_normal) - dot(patch[i].vertex.xyz, patch[i].ase_normal));
  1812. float phongStrength = _TessPhongStrength;
  1813. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1814. #endif
  1815. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1816. return VertexFunction(o);
  1817. }
  1818. #else
  1819. VertexOutput vert ( VertexInput v )
  1820. {
  1821. return VertexFunction( v );
  1822. }
  1823. #endif
  1824. half4 frag(VertexOutput IN ) : SV_TARGET
  1825. {
  1826. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1827. float cos127 = cos( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  1828. float sin127 = sin( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  1829. float2 rotator127 = mul( IN.ase_texcoord1.xy - float2( 0.5,0.5 ) , float2x2( cos127 , -sin127 , sin127 , cos127 )) + float2( 0.5,0.5 );
  1830. float4 texCoord151 = IN.ase_texcoord2;
  1831. texCoord151.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1832. float2 appendResult154 = (float2(texCoord151.z , texCoord151.w));
  1833. float2 uv_MainTex = IN.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1834. float2 lerpResult157 = lerp( rotator127 , ( appendResult154 + uv_MainTex ) , round( _CustomDataSwitch ));
  1835. float4 tex2DNode33 = tex2D( _MainTex, lerpResult157 );
  1836. float4 break92 = ( tex2DNode33 * _MainTexChannel );
  1837. float clampResult94 = clamp( ( break92.r + break92.g + break92.b + break92.a ) , 0.0 , 1.0 );
  1838. float2 uv_DissolveTex = IN.ase_texcoord1.xy * _DissolveTex_ST.xy + _DissolveTex_ST.zw;
  1839. float4 texCoord145 = IN.ase_texcoord2;
  1840. texCoord145.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1841. float2 appendResult143 = (float2(texCoord145.z , texCoord145.w));
  1842. float4 tex2DNode66 = tex2D( _DissolveTex, ( uv_DissolveTex + appendResult143 ) );
  1843. #ifdef _DISSOLVETEXFLIP_ON
  1844. float staticSwitch110 = ( 1.0 - tex2DNode66.r );
  1845. #else
  1846. float staticSwitch110 = tex2DNode66.r;
  1847. #endif
  1848. float4 texCoord111 = IN.ase_texcoord2;
  1849. texCoord111.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1850. float clampResult120 = clamp( ( 1.0 - pow( ( 1.0 - pow( staticSwitch110 , _DissolvePower ) ) , (1.0 + (texCoord111.x - 0.0) * (_DissolveExpReversed - 1.0) / (1.0 - 0.0)) ) ) , 0.0 , 1.0 );
  1851. float4 texCoord122 = IN.ase_texcoord2;
  1852. texCoord122.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1853. float clampResult124 = clamp( ( clampResult120 + (-1.0 + (texCoord122.x - 0.0) * (1.0 - -1.0) / (1.0 - 0.0)) ) , 0.0 , 1.0 );
  1854. float lerpResult147 = lerp( clampResult124 , 0.0 , round( _DissolveSwitch ));
  1855. float clampResult96 = clamp( ( clampResult94 - lerpResult147 ) , 0.0 , 1.0 );
  1856. float2 uv_MaskTex = IN.ase_texcoord1.xy * _MaskTex_ST.xy + _MaskTex_ST.zw;
  1857. float clampResult100 = clamp( ( clampResult96 * IN.ase_color.a * _OpacityPower * tex2D( _MaskTex, uv_MaskTex ).r ) , 0.0 , 1.0 );
  1858. surfaceDescription.Alpha = clampResult100;
  1859. surfaceDescription.AlphaClipThreshold = 0.5;
  1860. #if _ALPHATEST_ON
  1861. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1862. #endif
  1863. #ifdef LOD_FADE_CROSSFADE
  1864. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1865. #endif
  1866. float3 normalWS = IN.normalWS;
  1867. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1868. }
  1869. ENDHLSL
  1870. }
  1871. }
  1872. CustomEditor "UnityEditor.ShaderGraphUnlitGUI"
  1873. Fallback "Hidden/InternalErrorShader"
  1874. }
  1875. /*ASEBEGIN
  1876. Version=18935
  1877. -2025;289;1322;697;7921.5;1055.287;7.141183;True;False
  1878. Node;AmplifyShaderEditor.CommentaryNode;126;-4875.995,1831.975;Inherit;False;3098.323;877.6342;;22;70;66;104;110;76;73;118;119;120;122;123;121;124;105;77;112;113;111;143;144;145;148;溶解;1,1,1,1;0;0
  1879. Node;AmplifyShaderEditor.TextureCoordinatesNode;145;-4800.079,2289.925;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1880. Node;AmplifyShaderEditor.TextureCoordinatesNode;105;-4747.35,1943.516;Inherit;False;0;66;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
  1881. Node;AmplifyShaderEditor.DynamicAppendNode;143;-4511.478,2364.026;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1882. Node;AmplifyShaderEditor.SimpleAddOpNode;144;-4341.179,2271.725;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1883. Node;AmplifyShaderEditor.SamplerNode;66;-4177.373,2244.854;Inherit;True;Property;_DissolveTex;DissolveTex;10;0;Create;True;0;0;0;False;0;False;-1;893077602610eaf4e9b93d85a92b7323;893077602610eaf4e9b93d85a92b7323;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1884. Node;AmplifyShaderEditor.OneMinusNode;70;-3860.163,2456.21;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
  1885. Node;AmplifyShaderEditor.CommentaryNode;133;-5117.183,591.9059;Inherit;False;942.2288;543.4;;5;131;128;129;130;127;贴图可旋转;1,1,1,1;0;0
  1886. Node;AmplifyShaderEditor.CommentaryNode;150;-4809.542,1216.24;Inherit;False;808.6021;543.3561;Comment;6;156;155;154;153;152;151;数据流控制 uv 滚动;1,1,1,1;0;0
  1887. Node;AmplifyShaderEditor.RangedFloatNode;76;-3608.553,2542.684;Inherit;False;Property;_DissolvePower;DissolvePower;11;0;Create;True;0;0;0;False;0;False;2;2;0;0;0;1;FLOAT;0
  1888. Node;AmplifyShaderEditor.StaticSwitch;110;-3668.06,2247.026;Inherit;True;Property;_DissolveTexFlip;DissolveTexFlip;12;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0
  1889. Node;AmplifyShaderEditor.RangedFloatNode;128;-5067.183,864.8772;Inherit;False;Property;_MainTexRotation;贴图旋转;8;0;Create;False;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0
  1890. Node;AmplifyShaderEditor.PiNode;131;-4977.257,1024.907;Inherit;False;1;0;FLOAT;2;False;1;FLOAT;0
  1891. Node;AmplifyShaderEditor.TextureCoordinatesNode;151;-4759.543,1266.24;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1892. Node;AmplifyShaderEditor.TFHCRemapNode;130;-4737.256,854.9053;Inherit;True;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;4;FLOAT;1;False;1;FLOAT;0
  1893. Node;AmplifyShaderEditor.DynamicAppendNode;154;-4493.837,1291.19;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1894. Node;AmplifyShaderEditor.TextureCoordinatesNode;152;-4518.183,1462.2;Inherit;False;0;33;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
  1895. Node;AmplifyShaderEditor.RangedFloatNode;153;-4544.935,1646.451;Inherit;False;Property;_CustomDataSwitch;数据流控制UVMove;14;0;Create;False;0;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0
  1896. Node;AmplifyShaderEditor.TexCoordVertexDataNode;129;-4806.257,641.9059;Inherit;False;0;2;0;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1897. Node;AmplifyShaderEditor.RangedFloatNode;113;-3352.471,2094.233;Inherit;False;Property;_DissolveExpReversed;DissolveExpReversed;13;0;Create;True;0;0;0;False;0;False;2;2;0;0;0;1;FLOAT;0
  1898. Node;AmplifyShaderEditor.PowerNode;73;-3383.055,2264.603;Inherit;True;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
  1899. Node;AmplifyShaderEditor.TextureCoordinatesNode;111;-3403.592,1881.975;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1900. Node;AmplifyShaderEditor.OneMinusNode;77;-3152.935,2259.332;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
  1901. Node;AmplifyShaderEditor.SimpleAddOpNode;156;-4294.285,1293.563;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0
  1902. Node;AmplifyShaderEditor.TFHCRemapNode;112;-3093.471,1998.233;Inherit;True;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;1;False;4;FLOAT;2;False;1;FLOAT;0
  1903. Node;AmplifyShaderEditor.RotatorNode;127;-4451.155,671.3196;Inherit;True;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0
  1904. Node;AmplifyShaderEditor.RoundOpNode;155;-4152.941,1496.651;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  1905. Node;AmplifyShaderEditor.PowerNode;118;-2754.471,2113.233;Inherit;True;False;2;0;FLOAT;0;False;1;FLOAT;5.47;False;1;FLOAT;0
  1906. Node;AmplifyShaderEditor.LerpOp;157;-3439.591,1139.371;Inherit;True;3;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;1;FLOAT2;0
  1907. Node;AmplifyShaderEditor.CommentaryNode;95;-2913.277,1229.688;Inherit;False;1134.653;571.8313;;6;93;94;92;33;90;91;贴图通道选择;1,1,1,1;0;0
  1908. Node;AmplifyShaderEditor.Vector4Node;91;-2774.394,1592.519;Inherit;False;Property;_MainTexChannel;不透明通道选择;7;0;Create;False;0;0;0;False;0;False;1,0,0,0;1,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1909. Node;AmplifyShaderEditor.TextureCoordinatesNode;122;-2717.471,2424.233;Inherit;False;1;-1;4;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1910. Node;AmplifyShaderEditor.OneMinusNode;119;-2506.471,2121.233;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
  1911. Node;AmplifyShaderEditor.SamplerNode;33;-2863.277,1279.688;Inherit;True;Property;_MainTex;MainTex;6;0;Create;True;0;0;0;False;0;False;-1;None;7211a0f9fb965394c9b04af1d9382b87;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1912. Node;AmplifyShaderEditor.ClampOpNode;120;-2323.471,2135.233;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
  1913. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;90;-2416.207,1482.177;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;1;COLOR;0
  1914. Node;AmplifyShaderEditor.TFHCRemapNode;123;-2494.471,2408.233;Inherit;True;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;-1;False;4;FLOAT;1;False;1;FLOAT;0
  1915. Node;AmplifyShaderEditor.SimpleAddOpNode;121;-2166.471,2203.233;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1916. Node;AmplifyShaderEditor.BreakToComponentsNode;92;-2256.64,1500.76;Inherit;False;COLOR;1;0;COLOR;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
  1917. Node;AmplifyShaderEditor.RangedFloatNode;148;-2067.487,2615.879;Inherit;False;Property;_DissolveSwitch;溶解开关;9;0;Create;False;0;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0
  1918. Node;AmplifyShaderEditor.ClampOpNode;124;-1948.471,2213.233;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
  1919. Node;AmplifyShaderEditor.RangedFloatNode;146;-1928.465,2459.247;Inherit;False;Constant;_Float0;Float 0;13;0;Create;True;0;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
  1920. Node;AmplifyShaderEditor.RoundOpNode;149;-1799.889,2631.595;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  1921. Node;AmplifyShaderEditor.SimpleAddOpNode;93;-2094.29,1499.512;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0
  1922. Node;AmplifyShaderEditor.LerpOp;147;-1712.821,2304.973;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  1923. Node;AmplifyShaderEditor.CommentaryNode;101;-1735.79,1605.399;Inherit;False;962.8287;607.9102;;7;72;96;97;98;99;100;158;不透明度;1,1,1,1;0;0
  1924. Node;AmplifyShaderEditor.ClampOpNode;94;-1949.425,1504.508;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
  1925. Node;AmplifyShaderEditor.SimpleSubtractOpNode;72;-1685.79,1729.16;Inherit;True;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1926. Node;AmplifyShaderEditor.RangedFloatNode;99;-1430.691,2097.91;Inherit;False;Property;_OpacityPower;OpacityPower;2;0;Create;True;0;0;0;False;0;False;1;2;0;0;0;1;FLOAT;0
  1927. Node;AmplifyShaderEditor.SamplerNode;158;-1183.102,2026.195;Inherit;True;Property;_MaskTex;MaskTex;15;0;Create;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1928. Node;AmplifyShaderEditor.ClampOpNode;96;-1422.582,1752.997;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
  1929. Node;AmplifyShaderEditor.VertexColorNode;98;-1453.28,1899.358;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1930. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;97;-1208.302,1827.955;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0
  1931. Node;AmplifyShaderEditor.CommentaryNode;64;855.4103,754.5458;Inherit;False;1768.499;823.6578;;6;60;62;61;55;54;63;颜色;1,1,1,1;0;0
  1932. Node;AmplifyShaderEditor.CommentaryNode;48;-1456.849,609.0362;Inherit;False;2008.187;511.4504;;8;34;38;39;41;44;6;40;35;渐变映射;1,1,1,1;0;0
  1933. Node;AmplifyShaderEditor.VertexColorNode;61;2036.778,804.5458;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1934. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;63;2461.511,1052.647;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1935. Node;AmplifyShaderEditor.OneMinusNode;41;-202.1538,795.8334;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  1936. Node;AmplifyShaderEditor.OneMinusNode;38;-656.5423,731.3303;Inherit;True;1;0;FLOAT;0;False;1;FLOAT;0
  1937. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;60;2311.036,874.021;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1938. Node;AmplifyShaderEditor.ScaleAndOffsetNode;104;-4327.323,1956.321;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;1;False;2;FLOAT;0;False;1;FLOAT;0
  1939. Node;AmplifyShaderEditor.PowerNode;39;-430.9549,733.6354;Inherit;True;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
  1940. Node;AmplifyShaderEditor.RangedFloatNode;35;-1375.335,1005.086;Inherit;False;Property;_RampDirection;RampDirection ;4;0;Create;True;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0
  1941. Node;AmplifyShaderEditor.ColorNode;55;930.9643,965.9161;Inherit;False;Property;_Color;Color;0;1;[HDR];Create;True;0;0;0;False;0;False;1,1,1,1;0.9811321,0.7788113,0.7349235,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1942. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;54;1433.246,1019.538;Inherit;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;1;COLOR;0
  1943. Node;AmplifyShaderEditor.RangedFloatNode;62;1954.21,993.1076;Inherit;False;Property;_ColorPower;ColorPower;1;0;Create;True;0;0;0;False;0;False;1;3.5;0;20;0;1;FLOAT;0
  1944. Node;AmplifyShaderEditor.SamplerNode;6;229.7377,659.0362;Inherit;True;Property;_Ramp;Ramp;3;0;Create;True;0;0;0;False;0;False;-1;None;6c4aa65523d00c149afe7e86612536d6;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1945. Node;AmplifyShaderEditor.RangedFloatNode;40;-717.051,972.8342;Inherit;False;Property;_RampPower;RampPower;5;0;Create;True;0;0;0;False;0;False;1;0.76;0.2;8;0;1;FLOAT;0
  1946. Node;AmplifyShaderEditor.ClampOpNode;100;-1026.761,1655.399;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
  1947. Node;AmplifyShaderEditor.DynamicAppendNode;44;37.04702,757.0352;Inherit;False;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
  1948. Node;AmplifyShaderEditor.LerpOp;34;-976.3518,659.8109;Inherit;True;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;1;FLOAT;0
  1949. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;138;3117.402,1672.419;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=DepthNormalsOnly;False;True;15;d3d9;d3d11_9x;d3d11;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1950. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;137;3117.402,1672.419;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=DepthNormalsOnly;False;True;4;d3d11;glcore;gles;gles3;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1951. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;135;3117.402,1672.419;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=SceneSelectionPass;False;True;4;d3d11;glcore;gles;gles3;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1952. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;4;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Meta;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1953. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;2;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;True;False;False;False;False;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;True;3;False;-1;False;True;1;LightMode=ShadowCaster;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1954. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;134;3117.402,1672.419;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;True;1;5;False;-1;10;False;-1;1;1;False;-1;10;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;2;False;-1;True;3;False;-1;True;True;-1;False;-1;0;False;-1;True;1;LightMode=Universal2D;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1955. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;True;1;1;False;-1;0;False;-1;0;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;True;1;False;-1;True;3;False;-1;True;True;0;False;-1;0;False;-1;True;0;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1956. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;3;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;False;False;True;False;False;False;False;0;False;-1;False;False;False;False;False;False;False;False;False;True;1;False;-1;False;False;True;1;LightMode=DepthOnly;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1957. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;136;3117.402,1672.419;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;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;-1;False;True;0;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Geometry=Queue=0;True;2;True;17;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;xbox360;xboxone;xboxseries;ps4;playstation;psp2;n3ds;wiiu;switch;nomrt;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;1;LightMode=Picking;False;True;4;d3d11;glcore;gles;gles3;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1958. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;2983.416,1995.033;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;LT/DissolveSample;2992e84f91cbeb14eab234972e07ea9d;True;Forward;0;1;Forward;8;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-1;False;True;2;False;-1;False;False;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;False;False;False;False;True;3;RenderPipeline=UniversalPipeline;RenderType=Opaque=RenderType;Queue=Transparent=Queue=0;True;2;True;8;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;nomrt;0;False;True;1;5;False;-1;10;False;-1;1;1;False;-1;10;False;-1;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;True;True;True;True;0;False;-1;False;False;False;False;False;False;False;True;False;255;False;-1;255;False;-1;255;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;7;False;-1;1;False;-1;1;False;-1;1;False;-1;True;True;2;False;-1;True;3;False;-1;True;True;-1;False;-1;0;False;-1;True;2;LightMode=UniversalForward;=;False;False;0;Hidden/InternalErrorShader;0;0;Standard;22;Surface;1;637757611261979016; Blend;0;0;Two Sided;0;637759134089118442;Cast Shadows;0;637757611280070069; Use Shadow Threshold;0;0;Receive Shadows;0;637757611291408736;GPU Instancing;1;0;LOD CrossFade;0;0;Built-in Fog;0;0;DOTS Instancing;0;0;Meta Pass;0;0;Extra Pre Pass;0;0;Tessellation;0;0; Phong;0;0; Strength;0.5,False,-1;0; Type;0;0; Tess;16,False,-1;0; Min;10,False,-1;0; Max;25,False,-1;0; Edge Length;16,False,-1;0; Max Displacement;25,False,-1;0;Vertex Position,InvertActionOnDeselection;1;0;0;10;False;True;False;True;False;True;True;True;True;True;False;;False;0
  1959. WireConnection;143;0;145;3
  1960. WireConnection;143;1;145;4
  1961. WireConnection;144;0;105;0
  1962. WireConnection;144;1;143;0
  1963. WireConnection;66;1;144;0
  1964. WireConnection;70;0;66;1
  1965. WireConnection;110;1;66;1
  1966. WireConnection;110;0;70;0
  1967. WireConnection;130;0;128;0
  1968. WireConnection;130;4;131;0
  1969. WireConnection;154;0;151;3
  1970. WireConnection;154;1;151;4
  1971. WireConnection;73;0;110;0
  1972. WireConnection;73;1;76;0
  1973. WireConnection;77;0;73;0
  1974. WireConnection;156;0;154;0
  1975. WireConnection;156;1;152;0
  1976. WireConnection;112;0;111;1
  1977. WireConnection;112;4;113;0
  1978. WireConnection;127;0;129;0
  1979. WireConnection;127;2;130;0
  1980. WireConnection;155;0;153;0
  1981. WireConnection;118;0;77;0
  1982. WireConnection;118;1;112;0
  1983. WireConnection;157;0;127;0
  1984. WireConnection;157;1;156;0
  1985. WireConnection;157;2;155;0
  1986. WireConnection;119;0;118;0
  1987. WireConnection;33;1;157;0
  1988. WireConnection;120;0;119;0
  1989. WireConnection;90;0;33;0
  1990. WireConnection;90;1;91;0
  1991. WireConnection;123;0;122;1
  1992. WireConnection;121;0;120;0
  1993. WireConnection;121;1;123;0
  1994. WireConnection;92;0;90;0
  1995. WireConnection;124;0;121;0
  1996. WireConnection;149;0;148;0
  1997. WireConnection;93;0;92;0
  1998. WireConnection;93;1;92;1
  1999. WireConnection;93;2;92;2
  2000. WireConnection;93;3;92;3
  2001. WireConnection;147;0;124;0
  2002. WireConnection;147;1;146;0
  2003. WireConnection;147;2;149;0
  2004. WireConnection;94;0;93;0
  2005. WireConnection;72;0;94;0
  2006. WireConnection;72;1;147;0
  2007. WireConnection;96;0;72;0
  2008. WireConnection;97;0;96;0
  2009. WireConnection;97;1;98;4
  2010. WireConnection;97;2;99;0
  2011. WireConnection;97;3;158;1
  2012. WireConnection;63;0;60;0
  2013. WireConnection;63;1;54;0
  2014. WireConnection;41;0;39;0
  2015. WireConnection;38;0;34;0
  2016. WireConnection;60;0;61;0
  2017. WireConnection;60;1;62;0
  2018. WireConnection;39;0;38;0
  2019. WireConnection;39;1;40;0
  2020. WireConnection;54;0;6;0
  2021. WireConnection;54;1;55;0
  2022. WireConnection;54;2;33;0
  2023. WireConnection;6;1;44;0
  2024. WireConnection;100;0;97;0
  2025. WireConnection;44;0;41;0
  2026. WireConnection;34;0;94;0
  2027. WireConnection;34;1;100;0
  2028. WireConnection;34;2;35;0
  2029. WireConnection;1;2;63;0
  2030. WireConnection;1;3;100;0
  2031. ASEEND*/
  2032. //CHKSM=FB3466C5E8C244B4FD598BF5C44537F73D3B81C2