CartoonBoom01.shader 92 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "LT/CartoonBoom01"
  4. {
  5. Properties
  6. {
  7. [HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
  8. [HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
  9. [ASEBegin]_MainTex("MainTex", 2D) = "white" {}
  10. [HDR]_ColorR("ColorR", Color) = (0.9433962,0.3101912,0,1)
  11. [HDR]_ColorG("ColorG", Color) = (0.6509434,0.1219102,0,1)
  12. [HDR]_ColorB("ColorB", Color) = (0.2641509,0.02860036,0,1)
  13. _ca("_ca", Float) = 1
  14. _rjfanxiang("溶解反向", Range( 0 , 1)) = 0
  15. [ASEEnd]_rjTex("溶解贴图", 2D) = "white" {}
  16. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  17. [HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
  18. [HideInInspector]_QueueControl("_QueueControl", Float) = -1
  19. [HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  20. [HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  21. [HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  22. //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
  23. //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
  24. //_TessMin( "Tess Min Distance", Float ) = 10
  25. //_TessMax( "Tess Max Distance", Float ) = 25
  26. //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
  27. //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
  28. }
  29. SubShader
  30. {
  31. LOD 0
  32. Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" }
  33. Cull Off
  34. AlphaToMask Off
  35. HLSLINCLUDE
  36. #pragma target 3.0
  37. #pragma prefer_hlslcc gles
  38. #pragma exclude_renderers d3d11_9x
  39. #ifndef ASE_TESS_FUNCS
  40. #define ASE_TESS_FUNCS
  41. float4 FixedTess( float tessValue )
  42. {
  43. return tessValue;
  44. }
  45. float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
  46. {
  47. float3 wpos = mul(o2w,vertex).xyz;
  48. float dist = distance (wpos, cameraPos);
  49. float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
  50. return f;
  51. }
  52. float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
  53. {
  54. float4 tess;
  55. tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
  56. tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
  57. tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
  58. tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
  59. return tess;
  60. }
  61. float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
  62. {
  63. float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
  64. float len = distance(wpos0, wpos1);
  65. float f = max(len * scParams.y / (edgeLen * dist), 1.0);
  66. return f;
  67. }
  68. float DistanceFromPlane (float3 pos, float4 plane)
  69. {
  70. float d = dot (float4(pos,1.0f), plane);
  71. return d;
  72. }
  73. bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
  74. {
  75. float4 planeTest;
  76. planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  77. (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  78. (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
  79. planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  80. (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  81. (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
  82. planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  83. (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  84. (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
  85. planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  86. (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  87. (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
  88. return !all (planeTest);
  89. }
  90. float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
  91. {
  92. float3 f;
  93. f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
  94. f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
  95. f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
  96. return CalcTriEdgeTessFactors (f);
  97. }
  98. float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
  99. {
  100. float3 pos0 = mul(o2w,v0).xyz;
  101. float3 pos1 = mul(o2w,v1).xyz;
  102. float3 pos2 = mul(o2w,v2).xyz;
  103. float4 tess;
  104. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  105. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  106. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  107. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  108. return tess;
  109. }
  110. float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
  111. {
  112. float3 pos0 = mul(o2w,v0).xyz;
  113. float3 pos1 = mul(o2w,v1).xyz;
  114. float3 pos2 = mul(o2w,v2).xyz;
  115. float4 tess;
  116. if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
  117. {
  118. tess = 0.0f;
  119. }
  120. else
  121. {
  122. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  123. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  124. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  125. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  126. }
  127. return tess;
  128. }
  129. #endif //ASE_TESS_FUNCS
  130. ENDHLSL
  131. Pass
  132. {
  133. Name "Forward"
  134. Tags { "LightMode"="UniversalForwardOnly" }
  135. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  136. ZWrite Off
  137. ZTest LEqual
  138. Offset 0 , 0
  139. ColorMask RGBA
  140. HLSLPROGRAM
  141. #pragma multi_compile_instancing
  142. #define _RECEIVE_SHADOWS_OFF 1
  143. #define ASE_SRP_VERSION 999999
  144. #pragma multi_compile _ LIGHTMAP_ON
  145. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  146. #pragma shader_feature _ _SAMPLE_GI
  147. #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  148. #pragma multi_compile _ DEBUG_DISPLAY
  149. #define SHADERPASS SHADERPASS_UNLIT
  150. #pragma vertex vert
  151. #pragma fragment frag
  152. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  153. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  154. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  155. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  156. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  157. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  158. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  159. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  160. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  161. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  162. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  163. #define ASE_NEEDS_FRAG_COLOR
  164. struct VertexInput
  165. {
  166. float4 vertex : POSITION;
  167. float3 ase_normal : NORMAL;
  168. float4 ase_texcoord : TEXCOORD0;
  169. float4 ase_texcoord1 : TEXCOORD1;
  170. float4 ase_color : COLOR;
  171. UNITY_VERTEX_INPUT_INSTANCE_ID
  172. };
  173. struct VertexOutput
  174. {
  175. float4 clipPos : SV_POSITION;
  176. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  177. float3 worldPos : TEXCOORD0;
  178. #endif
  179. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  180. float4 shadowCoord : TEXCOORD1;
  181. #endif
  182. #ifdef ASE_FOG
  183. float fogFactor : TEXCOORD2;
  184. #endif
  185. float4 ase_texcoord3 : TEXCOORD3;
  186. float4 ase_texcoord4 : TEXCOORD4;
  187. float4 ase_color : COLOR;
  188. UNITY_VERTEX_INPUT_INSTANCE_ID
  189. UNITY_VERTEX_OUTPUT_STEREO
  190. };
  191. CBUFFER_START(UnityPerMaterial)
  192. float4 _MainTex_ST;
  193. float4 _ColorR;
  194. float4 _rjTex_ST;
  195. float4 _ColorG;
  196. float4 _ColorB;
  197. float _rjfanxiang;
  198. float _ca;
  199. #ifdef TESSELLATION_ON
  200. float _TessPhongStrength;
  201. float _TessValue;
  202. float _TessMin;
  203. float _TessMax;
  204. float _TessEdgeLength;
  205. float _TessMaxDisp;
  206. #endif
  207. CBUFFER_END
  208. sampler2D _MainTex;
  209. sampler2D _rjTex;
  210. VertexOutput VertexFunction ( VertexInput v )
  211. {
  212. VertexOutput o = (VertexOutput)0;
  213. UNITY_SETUP_INSTANCE_ID(v);
  214. UNITY_TRANSFER_INSTANCE_ID(v, o);
  215. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  216. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  217. o.ase_texcoord4 = v.ase_texcoord1;
  218. o.ase_color = v.ase_color;
  219. //setting value to unused interpolator channels and avoid initialization warnings
  220. o.ase_texcoord3.zw = 0;
  221. #ifdef ASE_ABSOLUTE_VERTEX_POS
  222. float3 defaultVertexValue = v.vertex.xyz;
  223. #else
  224. float3 defaultVertexValue = float3(0, 0, 0);
  225. #endif
  226. float3 vertexValue = defaultVertexValue;
  227. #ifdef ASE_ABSOLUTE_VERTEX_POS
  228. v.vertex.xyz = vertexValue;
  229. #else
  230. v.vertex.xyz += vertexValue;
  231. #endif
  232. v.ase_normal = v.ase_normal;
  233. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  234. float4 positionCS = TransformWorldToHClip( positionWS );
  235. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  236. o.worldPos = positionWS;
  237. #endif
  238. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  239. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  240. vertexInput.positionWS = positionWS;
  241. vertexInput.positionCS = positionCS;
  242. o.shadowCoord = GetShadowCoord( vertexInput );
  243. #endif
  244. #ifdef ASE_FOG
  245. o.fogFactor = ComputeFogFactor( positionCS.z );
  246. #endif
  247. o.clipPos = positionCS;
  248. return o;
  249. }
  250. #if defined(TESSELLATION_ON)
  251. struct VertexControl
  252. {
  253. float4 vertex : INTERNALTESSPOS;
  254. float3 ase_normal : NORMAL;
  255. float4 ase_texcoord : TEXCOORD0;
  256. float4 ase_texcoord1 : TEXCOORD1;
  257. float4 ase_color : COLOR;
  258. UNITY_VERTEX_INPUT_INSTANCE_ID
  259. };
  260. struct TessellationFactors
  261. {
  262. float edge[3] : SV_TessFactor;
  263. float inside : SV_InsideTessFactor;
  264. };
  265. VertexControl vert ( VertexInput v )
  266. {
  267. VertexControl o;
  268. UNITY_SETUP_INSTANCE_ID(v);
  269. UNITY_TRANSFER_INSTANCE_ID(v, o);
  270. o.vertex = v.vertex;
  271. o.ase_normal = v.ase_normal;
  272. o.ase_texcoord = v.ase_texcoord;
  273. o.ase_texcoord1 = v.ase_texcoord1;
  274. o.ase_color = v.ase_color;
  275. return o;
  276. }
  277. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  278. {
  279. TessellationFactors o;
  280. float4 tf = 1;
  281. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  282. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  283. #if defined(ASE_FIXED_TESSELLATION)
  284. tf = FixedTess( tessValue );
  285. #elif defined(ASE_DISTANCE_TESSELLATION)
  286. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  287. #elif defined(ASE_LENGTH_TESSELLATION)
  288. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  289. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  290. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  291. #endif
  292. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  293. return o;
  294. }
  295. [domain("tri")]
  296. [partitioning("fractional_odd")]
  297. [outputtopology("triangle_cw")]
  298. [patchconstantfunc("TessellationFunction")]
  299. [outputcontrolpoints(3)]
  300. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  301. {
  302. return patch[id];
  303. }
  304. [domain("tri")]
  305. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  306. {
  307. VertexInput o = (VertexInput) 0;
  308. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  309. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  310. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  311. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  312. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  313. #if defined(ASE_PHONG_TESSELLATION)
  314. float3 pp[3];
  315. for (int i = 0; i < 3; ++i)
  316. 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));
  317. float phongStrength = _TessPhongStrength;
  318. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  319. #endif
  320. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  321. return VertexFunction(o);
  322. }
  323. #else
  324. VertexOutput vert ( VertexInput v )
  325. {
  326. return VertexFunction( v );
  327. }
  328. #endif
  329. half4 frag ( VertexOutput IN ) : SV_Target
  330. {
  331. UNITY_SETUP_INSTANCE_ID( IN );
  332. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  333. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  334. float3 WorldPosition = IN.worldPos;
  335. #endif
  336. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  337. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  338. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  339. ShadowCoords = IN.shadowCoord;
  340. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  341. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  342. #endif
  343. #endif
  344. float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  345. float4 tex2DNode11 = tex2D( _MainTex, uv_MainTex );
  346. float2 uv_rjTex = IN.ase_texcoord3.xy * _rjTex_ST.xy + _rjTex_ST.zw;
  347. float4 tex2DNode57 = tex2D( _rjTex, uv_rjTex );
  348. float temp_output_2_0_g4 = tex2DNode57.r;
  349. float lerpResult6_g4 = lerp( temp_output_2_0_g4 , ( 1.0 - temp_output_2_0_g4 ) , _rjfanxiang);
  350. float4 texCoord52 = IN.ase_texcoord4;
  351. texCoord52.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  352. float temp_output_4_0_g4 = texCoord52.w;
  353. float4 temp_output_29_0 = ( ( tex2DNode11.r * _ColorR ) * saturate( ( ( ( ( lerpResult6_g4 + 1.0 ) - ( texCoord52.x * ( 1.0 + ( 1.0 - temp_output_4_0_g4 ) ) ) ) - temp_output_4_0_g4 ) / ( 1.0 - temp_output_4_0_g4 ) ) ) );
  354. float temp_output_2_0_g2 = tex2DNode57.r;
  355. float lerpResult6_g2 = lerp( temp_output_2_0_g2 , ( 1.0 - temp_output_2_0_g2 ) , _rjfanxiang);
  356. float temp_output_4_0_g2 = texCoord52.w;
  357. float4 temp_output_24_0 = ( ( tex2DNode11.g * _ColorG ) * saturate( ( ( ( ( lerpResult6_g2 + 1.0 ) - ( texCoord52.y * ( 1.0 + ( 1.0 - temp_output_4_0_g2 ) ) ) ) - temp_output_4_0_g2 ) / ( 1.0 - temp_output_4_0_g2 ) ) ) );
  358. float temp_output_2_0_g3 = tex2DNode57.r;
  359. float lerpResult6_g3 = lerp( temp_output_2_0_g3 , ( 1.0 - temp_output_2_0_g3 ) , _rjfanxiang);
  360. float temp_output_4_0_g3 = texCoord52.w;
  361. float4 temp_output_22_0 = ( ( tex2DNode11.b * _ColorB ) * saturate( ( ( ( ( lerpResult6_g3 + 1.0 ) - ( texCoord52.z * ( 1.0 + ( 1.0 - temp_output_4_0_g3 ) ) ) ) - temp_output_4_0_g3 ) / ( 1.0 - temp_output_4_0_g3 ) ) ) );
  362. float4 temp_output_35_0 = ( float4( (( temp_output_24_0 * (temp_output_24_0).a )).rgb , 0.0 ) + ( temp_output_22_0 * ( 2.0 - (temp_output_22_0).a ) ) );
  363. float4 temp_output_45_0 = ( float4( (( temp_output_29_0 * (temp_output_29_0).a )).rgb , 0.0 ) + ( temp_output_35_0 * ( 2.0 - (temp_output_35_0).a ) ) );
  364. float3 BakedAlbedo = 0;
  365. float3 BakedEmission = 0;
  366. float3 Color = ( temp_output_45_0 * IN.ase_color ).rgb;
  367. float Alpha = ( ( (temp_output_45_0).a * IN.ase_color.a ) * _ca );
  368. float AlphaClipThreshold = 0.5;
  369. float AlphaClipThresholdShadow = 0.5;
  370. #ifdef _ALPHATEST_ON
  371. clip( Alpha - AlphaClipThreshold );
  372. #endif
  373. #if defined(_DBUFFER)
  374. ApplyDecalToBaseColor(IN.clipPos, Color);
  375. #endif
  376. #if defined(_ALPHAPREMULTIPLY_ON)
  377. Color *= Alpha;
  378. #endif
  379. #ifdef LOD_FADE_CROSSFADE
  380. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  381. #endif
  382. #ifdef ASE_FOG
  383. Color = MixFog( Color, IN.fogFactor );
  384. #endif
  385. return half4( Color, Alpha );
  386. }
  387. ENDHLSL
  388. }
  389. Pass
  390. {
  391. Name "DepthOnly"
  392. Tags { "LightMode"="DepthOnly" }
  393. ZWrite On
  394. ColorMask 0
  395. AlphaToMask Off
  396. HLSLPROGRAM
  397. #pragma multi_compile_instancing
  398. #define _RECEIVE_SHADOWS_OFF 1
  399. #define ASE_SRP_VERSION 999999
  400. #pragma vertex vert
  401. #pragma fragment frag
  402. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  403. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  404. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  405. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  406. struct VertexInput
  407. {
  408. float4 vertex : POSITION;
  409. float3 ase_normal : NORMAL;
  410. float4 ase_texcoord : TEXCOORD0;
  411. float4 ase_texcoord1 : TEXCOORD1;
  412. float4 ase_color : COLOR;
  413. UNITY_VERTEX_INPUT_INSTANCE_ID
  414. };
  415. struct VertexOutput
  416. {
  417. float4 clipPos : SV_POSITION;
  418. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  419. float3 worldPos : TEXCOORD0;
  420. #endif
  421. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  422. float4 shadowCoord : TEXCOORD1;
  423. #endif
  424. float4 ase_texcoord2 : TEXCOORD2;
  425. float4 ase_texcoord3 : TEXCOORD3;
  426. float4 ase_color : COLOR;
  427. UNITY_VERTEX_INPUT_INSTANCE_ID
  428. UNITY_VERTEX_OUTPUT_STEREO
  429. };
  430. CBUFFER_START(UnityPerMaterial)
  431. float4 _MainTex_ST;
  432. float4 _ColorR;
  433. float4 _rjTex_ST;
  434. float4 _ColorG;
  435. float4 _ColorB;
  436. float _rjfanxiang;
  437. float _ca;
  438. #ifdef TESSELLATION_ON
  439. float _TessPhongStrength;
  440. float _TessValue;
  441. float _TessMin;
  442. float _TessMax;
  443. float _TessEdgeLength;
  444. float _TessMaxDisp;
  445. #endif
  446. CBUFFER_END
  447. sampler2D _MainTex;
  448. sampler2D _rjTex;
  449. VertexOutput VertexFunction( VertexInput v )
  450. {
  451. VertexOutput o = (VertexOutput)0;
  452. UNITY_SETUP_INSTANCE_ID(v);
  453. UNITY_TRANSFER_INSTANCE_ID(v, o);
  454. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  455. o.ase_texcoord2.xy = v.ase_texcoord.xy;
  456. o.ase_texcoord3 = v.ase_texcoord1;
  457. o.ase_color = v.ase_color;
  458. //setting value to unused interpolator channels and avoid initialization warnings
  459. o.ase_texcoord2.zw = 0;
  460. #ifdef ASE_ABSOLUTE_VERTEX_POS
  461. float3 defaultVertexValue = v.vertex.xyz;
  462. #else
  463. float3 defaultVertexValue = float3(0, 0, 0);
  464. #endif
  465. float3 vertexValue = defaultVertexValue;
  466. #ifdef ASE_ABSOLUTE_VERTEX_POS
  467. v.vertex.xyz = vertexValue;
  468. #else
  469. v.vertex.xyz += vertexValue;
  470. #endif
  471. v.ase_normal = v.ase_normal;
  472. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  473. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  474. o.worldPos = positionWS;
  475. #endif
  476. o.clipPos = TransformWorldToHClip( positionWS );
  477. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  478. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  479. vertexInput.positionWS = positionWS;
  480. vertexInput.positionCS = o.clipPos;
  481. o.shadowCoord = GetShadowCoord( vertexInput );
  482. #endif
  483. return o;
  484. }
  485. #if defined(TESSELLATION_ON)
  486. struct VertexControl
  487. {
  488. float4 vertex : INTERNALTESSPOS;
  489. float3 ase_normal : NORMAL;
  490. float4 ase_texcoord : TEXCOORD0;
  491. float4 ase_texcoord1 : TEXCOORD1;
  492. float4 ase_color : COLOR;
  493. UNITY_VERTEX_INPUT_INSTANCE_ID
  494. };
  495. struct TessellationFactors
  496. {
  497. float edge[3] : SV_TessFactor;
  498. float inside : SV_InsideTessFactor;
  499. };
  500. VertexControl vert ( VertexInput v )
  501. {
  502. VertexControl o;
  503. UNITY_SETUP_INSTANCE_ID(v);
  504. UNITY_TRANSFER_INSTANCE_ID(v, o);
  505. o.vertex = v.vertex;
  506. o.ase_normal = v.ase_normal;
  507. o.ase_texcoord = v.ase_texcoord;
  508. o.ase_texcoord1 = v.ase_texcoord1;
  509. o.ase_color = v.ase_color;
  510. return o;
  511. }
  512. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  513. {
  514. TessellationFactors o;
  515. float4 tf = 1;
  516. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  517. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  518. #if defined(ASE_FIXED_TESSELLATION)
  519. tf = FixedTess( tessValue );
  520. #elif defined(ASE_DISTANCE_TESSELLATION)
  521. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  522. #elif defined(ASE_LENGTH_TESSELLATION)
  523. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  524. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  525. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  526. #endif
  527. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  528. return o;
  529. }
  530. [domain("tri")]
  531. [partitioning("fractional_odd")]
  532. [outputtopology("triangle_cw")]
  533. [patchconstantfunc("TessellationFunction")]
  534. [outputcontrolpoints(3)]
  535. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  536. {
  537. return patch[id];
  538. }
  539. [domain("tri")]
  540. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  541. {
  542. VertexInput o = (VertexInput) 0;
  543. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  544. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  545. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  546. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  547. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  548. #if defined(ASE_PHONG_TESSELLATION)
  549. float3 pp[3];
  550. for (int i = 0; i < 3; ++i)
  551. 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));
  552. float phongStrength = _TessPhongStrength;
  553. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  554. #endif
  555. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  556. return VertexFunction(o);
  557. }
  558. #else
  559. VertexOutput vert ( VertexInput v )
  560. {
  561. return VertexFunction( v );
  562. }
  563. #endif
  564. half4 frag(VertexOutput IN ) : SV_TARGET
  565. {
  566. UNITY_SETUP_INSTANCE_ID(IN);
  567. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  568. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  569. float3 WorldPosition = IN.worldPos;
  570. #endif
  571. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  572. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  573. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  574. ShadowCoords = IN.shadowCoord;
  575. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  576. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  577. #endif
  578. #endif
  579. float2 uv_MainTex = IN.ase_texcoord2.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  580. float4 tex2DNode11 = tex2D( _MainTex, uv_MainTex );
  581. float2 uv_rjTex = IN.ase_texcoord2.xy * _rjTex_ST.xy + _rjTex_ST.zw;
  582. float4 tex2DNode57 = tex2D( _rjTex, uv_rjTex );
  583. float temp_output_2_0_g4 = tex2DNode57.r;
  584. float lerpResult6_g4 = lerp( temp_output_2_0_g4 , ( 1.0 - temp_output_2_0_g4 ) , _rjfanxiang);
  585. float4 texCoord52 = IN.ase_texcoord3;
  586. texCoord52.xy = IN.ase_texcoord3.xy * float2( 1,1 ) + float2( 0,0 );
  587. float temp_output_4_0_g4 = texCoord52.w;
  588. float4 temp_output_29_0 = ( ( tex2DNode11.r * _ColorR ) * saturate( ( ( ( ( lerpResult6_g4 + 1.0 ) - ( texCoord52.x * ( 1.0 + ( 1.0 - temp_output_4_0_g4 ) ) ) ) - temp_output_4_0_g4 ) / ( 1.0 - temp_output_4_0_g4 ) ) ) );
  589. float temp_output_2_0_g2 = tex2DNode57.r;
  590. float lerpResult6_g2 = lerp( temp_output_2_0_g2 , ( 1.0 - temp_output_2_0_g2 ) , _rjfanxiang);
  591. float temp_output_4_0_g2 = texCoord52.w;
  592. float4 temp_output_24_0 = ( ( tex2DNode11.g * _ColorG ) * saturate( ( ( ( ( lerpResult6_g2 + 1.0 ) - ( texCoord52.y * ( 1.0 + ( 1.0 - temp_output_4_0_g2 ) ) ) ) - temp_output_4_0_g2 ) / ( 1.0 - temp_output_4_0_g2 ) ) ) );
  593. float temp_output_2_0_g3 = tex2DNode57.r;
  594. float lerpResult6_g3 = lerp( temp_output_2_0_g3 , ( 1.0 - temp_output_2_0_g3 ) , _rjfanxiang);
  595. float temp_output_4_0_g3 = texCoord52.w;
  596. float4 temp_output_22_0 = ( ( tex2DNode11.b * _ColorB ) * saturate( ( ( ( ( lerpResult6_g3 + 1.0 ) - ( texCoord52.z * ( 1.0 + ( 1.0 - temp_output_4_0_g3 ) ) ) ) - temp_output_4_0_g3 ) / ( 1.0 - temp_output_4_0_g3 ) ) ) );
  597. float4 temp_output_35_0 = ( float4( (( temp_output_24_0 * (temp_output_24_0).a )).rgb , 0.0 ) + ( temp_output_22_0 * ( 2.0 - (temp_output_22_0).a ) ) );
  598. float4 temp_output_45_0 = ( float4( (( temp_output_29_0 * (temp_output_29_0).a )).rgb , 0.0 ) + ( temp_output_35_0 * ( 2.0 - (temp_output_35_0).a ) ) );
  599. float Alpha = ( ( (temp_output_45_0).a * IN.ase_color.a ) * _ca );
  600. float AlphaClipThreshold = 0.5;
  601. #ifdef _ALPHATEST_ON
  602. clip(Alpha - AlphaClipThreshold);
  603. #endif
  604. #ifdef LOD_FADE_CROSSFADE
  605. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  606. #endif
  607. return 0;
  608. }
  609. ENDHLSL
  610. }
  611. Pass
  612. {
  613. Name "Universal2D"
  614. Tags { "LightMode"="Universal2D" }
  615. Blend SrcAlpha OneMinusSrcAlpha, One OneMinusSrcAlpha
  616. ZWrite Off
  617. ZTest LEqual
  618. Offset 0 , 0
  619. ColorMask RGBA
  620. HLSLPROGRAM
  621. #pragma multi_compile_instancing
  622. #define _RECEIVE_SHADOWS_OFF 1
  623. #define ASE_SRP_VERSION 999999
  624. #pragma multi_compile _ LIGHTMAP_ON
  625. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  626. #pragma shader_feature _ _SAMPLE_GI
  627. #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  628. #pragma multi_compile _ DEBUG_DISPLAY
  629. #define SHADERPASS SHADERPASS_UNLIT
  630. #pragma vertex vert
  631. #pragma fragment frag
  632. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  633. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  634. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  635. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  636. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  637. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  638. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  639. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  640. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  641. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  642. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  643. #define ASE_NEEDS_FRAG_COLOR
  644. struct VertexInput
  645. {
  646. float4 vertex : POSITION;
  647. float3 ase_normal : NORMAL;
  648. float4 ase_texcoord : TEXCOORD0;
  649. float4 ase_texcoord1 : TEXCOORD1;
  650. float4 ase_color : COLOR;
  651. UNITY_VERTEX_INPUT_INSTANCE_ID
  652. };
  653. struct VertexOutput
  654. {
  655. float4 clipPos : SV_POSITION;
  656. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  657. float3 worldPos : TEXCOORD0;
  658. #endif
  659. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  660. float4 shadowCoord : TEXCOORD1;
  661. #endif
  662. #ifdef ASE_FOG
  663. float fogFactor : TEXCOORD2;
  664. #endif
  665. float4 ase_texcoord3 : TEXCOORD3;
  666. float4 ase_texcoord4 : TEXCOORD4;
  667. float4 ase_color : COLOR;
  668. UNITY_VERTEX_INPUT_INSTANCE_ID
  669. UNITY_VERTEX_OUTPUT_STEREO
  670. };
  671. CBUFFER_START(UnityPerMaterial)
  672. float4 _MainTex_ST;
  673. float4 _ColorR;
  674. float4 _rjTex_ST;
  675. float4 _ColorG;
  676. float4 _ColorB;
  677. float _rjfanxiang;
  678. float _ca;
  679. #ifdef TESSELLATION_ON
  680. float _TessPhongStrength;
  681. float _TessValue;
  682. float _TessMin;
  683. float _TessMax;
  684. float _TessEdgeLength;
  685. float _TessMaxDisp;
  686. #endif
  687. CBUFFER_END
  688. sampler2D _MainTex;
  689. sampler2D _rjTex;
  690. VertexOutput VertexFunction ( VertexInput v )
  691. {
  692. VertexOutput o = (VertexOutput)0;
  693. UNITY_SETUP_INSTANCE_ID(v);
  694. UNITY_TRANSFER_INSTANCE_ID(v, o);
  695. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  696. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  697. o.ase_texcoord4 = v.ase_texcoord1;
  698. o.ase_color = v.ase_color;
  699. //setting value to unused interpolator channels and avoid initialization warnings
  700. o.ase_texcoord3.zw = 0;
  701. #ifdef ASE_ABSOLUTE_VERTEX_POS
  702. float3 defaultVertexValue = v.vertex.xyz;
  703. #else
  704. float3 defaultVertexValue = float3(0, 0, 0);
  705. #endif
  706. float3 vertexValue = defaultVertexValue;
  707. #ifdef ASE_ABSOLUTE_VERTEX_POS
  708. v.vertex.xyz = vertexValue;
  709. #else
  710. v.vertex.xyz += vertexValue;
  711. #endif
  712. v.ase_normal = v.ase_normal;
  713. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  714. float4 positionCS = TransformWorldToHClip( positionWS );
  715. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  716. o.worldPos = positionWS;
  717. #endif
  718. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  719. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  720. vertexInput.positionWS = positionWS;
  721. vertexInput.positionCS = positionCS;
  722. o.shadowCoord = GetShadowCoord( vertexInput );
  723. #endif
  724. #ifdef ASE_FOG
  725. o.fogFactor = ComputeFogFactor( positionCS.z );
  726. #endif
  727. o.clipPos = positionCS;
  728. return o;
  729. }
  730. #if defined(TESSELLATION_ON)
  731. struct VertexControl
  732. {
  733. float4 vertex : INTERNALTESSPOS;
  734. float3 ase_normal : NORMAL;
  735. float4 ase_texcoord : TEXCOORD0;
  736. float4 ase_texcoord1 : TEXCOORD1;
  737. float4 ase_color : COLOR;
  738. UNITY_VERTEX_INPUT_INSTANCE_ID
  739. };
  740. struct TessellationFactors
  741. {
  742. float edge[3] : SV_TessFactor;
  743. float inside : SV_InsideTessFactor;
  744. };
  745. VertexControl vert ( VertexInput v )
  746. {
  747. VertexControl o;
  748. UNITY_SETUP_INSTANCE_ID(v);
  749. UNITY_TRANSFER_INSTANCE_ID(v, o);
  750. o.vertex = v.vertex;
  751. o.ase_normal = v.ase_normal;
  752. o.ase_texcoord = v.ase_texcoord;
  753. o.ase_texcoord1 = v.ase_texcoord1;
  754. o.ase_color = v.ase_color;
  755. return o;
  756. }
  757. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  758. {
  759. TessellationFactors o;
  760. float4 tf = 1;
  761. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  762. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  763. #if defined(ASE_FIXED_TESSELLATION)
  764. tf = FixedTess( tessValue );
  765. #elif defined(ASE_DISTANCE_TESSELLATION)
  766. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  767. #elif defined(ASE_LENGTH_TESSELLATION)
  768. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  769. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  770. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  771. #endif
  772. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  773. return o;
  774. }
  775. [domain("tri")]
  776. [partitioning("fractional_odd")]
  777. [outputtopology("triangle_cw")]
  778. [patchconstantfunc("TessellationFunction")]
  779. [outputcontrolpoints(3)]
  780. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  781. {
  782. return patch[id];
  783. }
  784. [domain("tri")]
  785. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  786. {
  787. VertexInput o = (VertexInput) 0;
  788. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  789. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  790. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  791. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  792. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  793. #if defined(ASE_PHONG_TESSELLATION)
  794. float3 pp[3];
  795. for (int i = 0; i < 3; ++i)
  796. 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));
  797. float phongStrength = _TessPhongStrength;
  798. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  799. #endif
  800. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  801. return VertexFunction(o);
  802. }
  803. #else
  804. VertexOutput vert ( VertexInput v )
  805. {
  806. return VertexFunction( v );
  807. }
  808. #endif
  809. half4 frag ( VertexOutput IN ) : SV_Target
  810. {
  811. UNITY_SETUP_INSTANCE_ID( IN );
  812. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  813. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  814. float3 WorldPosition = IN.worldPos;
  815. #endif
  816. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  817. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  818. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  819. ShadowCoords = IN.shadowCoord;
  820. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  821. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  822. #endif
  823. #endif
  824. float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  825. float4 tex2DNode11 = tex2D( _MainTex, uv_MainTex );
  826. float2 uv_rjTex = IN.ase_texcoord3.xy * _rjTex_ST.xy + _rjTex_ST.zw;
  827. float4 tex2DNode57 = tex2D( _rjTex, uv_rjTex );
  828. float temp_output_2_0_g4 = tex2DNode57.r;
  829. float lerpResult6_g4 = lerp( temp_output_2_0_g4 , ( 1.0 - temp_output_2_0_g4 ) , _rjfanxiang);
  830. float4 texCoord52 = IN.ase_texcoord4;
  831. texCoord52.xy = IN.ase_texcoord4.xy * float2( 1,1 ) + float2( 0,0 );
  832. float temp_output_4_0_g4 = texCoord52.w;
  833. float4 temp_output_29_0 = ( ( tex2DNode11.r * _ColorR ) * saturate( ( ( ( ( lerpResult6_g4 + 1.0 ) - ( texCoord52.x * ( 1.0 + ( 1.0 - temp_output_4_0_g4 ) ) ) ) - temp_output_4_0_g4 ) / ( 1.0 - temp_output_4_0_g4 ) ) ) );
  834. float temp_output_2_0_g2 = tex2DNode57.r;
  835. float lerpResult6_g2 = lerp( temp_output_2_0_g2 , ( 1.0 - temp_output_2_0_g2 ) , _rjfanxiang);
  836. float temp_output_4_0_g2 = texCoord52.w;
  837. float4 temp_output_24_0 = ( ( tex2DNode11.g * _ColorG ) * saturate( ( ( ( ( lerpResult6_g2 + 1.0 ) - ( texCoord52.y * ( 1.0 + ( 1.0 - temp_output_4_0_g2 ) ) ) ) - temp_output_4_0_g2 ) / ( 1.0 - temp_output_4_0_g2 ) ) ) );
  838. float temp_output_2_0_g3 = tex2DNode57.r;
  839. float lerpResult6_g3 = lerp( temp_output_2_0_g3 , ( 1.0 - temp_output_2_0_g3 ) , _rjfanxiang);
  840. float temp_output_4_0_g3 = texCoord52.w;
  841. float4 temp_output_22_0 = ( ( tex2DNode11.b * _ColorB ) * saturate( ( ( ( ( lerpResult6_g3 + 1.0 ) - ( texCoord52.z * ( 1.0 + ( 1.0 - temp_output_4_0_g3 ) ) ) ) - temp_output_4_0_g3 ) / ( 1.0 - temp_output_4_0_g3 ) ) ) );
  842. float4 temp_output_35_0 = ( float4( (( temp_output_24_0 * (temp_output_24_0).a )).rgb , 0.0 ) + ( temp_output_22_0 * ( 2.0 - (temp_output_22_0).a ) ) );
  843. float4 temp_output_45_0 = ( float4( (( temp_output_29_0 * (temp_output_29_0).a )).rgb , 0.0 ) + ( temp_output_35_0 * ( 2.0 - (temp_output_35_0).a ) ) );
  844. float3 BakedAlbedo = 0;
  845. float3 BakedEmission = 0;
  846. float3 Color = ( temp_output_45_0 * IN.ase_color ).rgb;
  847. float Alpha = ( ( (temp_output_45_0).a * IN.ase_color.a ) * _ca );
  848. float AlphaClipThreshold = 0.5;
  849. float AlphaClipThresholdShadow = 0.5;
  850. #ifdef _ALPHATEST_ON
  851. clip( Alpha - AlphaClipThreshold );
  852. #endif
  853. #if defined(_DBUFFER)
  854. ApplyDecalToBaseColor(IN.clipPos, Color);
  855. #endif
  856. #if defined(_ALPHAPREMULTIPLY_ON)
  857. Color *= Alpha;
  858. #endif
  859. #ifdef LOD_FADE_CROSSFADE
  860. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  861. #endif
  862. #ifdef ASE_FOG
  863. Color = MixFog( Color, IN.fogFactor );
  864. #endif
  865. return half4( Color, Alpha );
  866. }
  867. ENDHLSL
  868. }
  869. Pass
  870. {
  871. Name "SceneSelectionPass"
  872. Tags { "LightMode"="SceneSelectionPass" }
  873. Cull Off
  874. HLSLPROGRAM
  875. #pragma multi_compile_instancing
  876. #define _RECEIVE_SHADOWS_OFF 1
  877. #define ASE_SRP_VERSION 999999
  878. #pragma only_renderers d3d11 glcore gles gles3
  879. #pragma vertex vert
  880. #pragma fragment frag
  881. #define ATTRIBUTES_NEED_NORMAL
  882. #define ATTRIBUTES_NEED_TANGENT
  883. #define SHADERPASS SHADERPASS_DEPTHONLY
  884. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  885. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  886. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  887. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  888. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  889. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  890. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  891. struct VertexInput
  892. {
  893. float4 vertex : POSITION;
  894. float3 ase_normal : NORMAL;
  895. float4 ase_texcoord : TEXCOORD0;
  896. float4 ase_texcoord1 : TEXCOORD1;
  897. float4 ase_color : COLOR;
  898. UNITY_VERTEX_INPUT_INSTANCE_ID
  899. };
  900. struct VertexOutput
  901. {
  902. float4 clipPos : SV_POSITION;
  903. float4 ase_texcoord : TEXCOORD0;
  904. float4 ase_texcoord1 : TEXCOORD1;
  905. float4 ase_color : COLOR;
  906. UNITY_VERTEX_INPUT_INSTANCE_ID
  907. UNITY_VERTEX_OUTPUT_STEREO
  908. };
  909. CBUFFER_START(UnityPerMaterial)
  910. float4 _MainTex_ST;
  911. float4 _ColorR;
  912. float4 _rjTex_ST;
  913. float4 _ColorG;
  914. float4 _ColorB;
  915. float _rjfanxiang;
  916. float _ca;
  917. #ifdef TESSELLATION_ON
  918. float _TessPhongStrength;
  919. float _TessValue;
  920. float _TessMin;
  921. float _TessMax;
  922. float _TessEdgeLength;
  923. float _TessMaxDisp;
  924. #endif
  925. CBUFFER_END
  926. sampler2D _MainTex;
  927. sampler2D _rjTex;
  928. int _ObjectId;
  929. int _PassValue;
  930. struct SurfaceDescription
  931. {
  932. float Alpha;
  933. float AlphaClipThreshold;
  934. };
  935. VertexOutput VertexFunction(VertexInput v )
  936. {
  937. VertexOutput o;
  938. ZERO_INITIALIZE(VertexOutput, o);
  939. UNITY_SETUP_INSTANCE_ID(v);
  940. UNITY_TRANSFER_INSTANCE_ID(v, o);
  941. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  942. o.ase_texcoord.xy = v.ase_texcoord.xy;
  943. o.ase_texcoord1 = v.ase_texcoord1;
  944. o.ase_color = v.ase_color;
  945. //setting value to unused interpolator channels and avoid initialization warnings
  946. o.ase_texcoord.zw = 0;
  947. #ifdef ASE_ABSOLUTE_VERTEX_POS
  948. float3 defaultVertexValue = v.vertex.xyz;
  949. #else
  950. float3 defaultVertexValue = float3(0, 0, 0);
  951. #endif
  952. float3 vertexValue = defaultVertexValue;
  953. #ifdef ASE_ABSOLUTE_VERTEX_POS
  954. v.vertex.xyz = vertexValue;
  955. #else
  956. v.vertex.xyz += vertexValue;
  957. #endif
  958. v.ase_normal = v.ase_normal;
  959. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  960. o.clipPos = TransformWorldToHClip(positionWS);
  961. return o;
  962. }
  963. #if defined(TESSELLATION_ON)
  964. struct VertexControl
  965. {
  966. float4 vertex : INTERNALTESSPOS;
  967. float3 ase_normal : NORMAL;
  968. float4 ase_texcoord : TEXCOORD0;
  969. float4 ase_texcoord1 : TEXCOORD1;
  970. float4 ase_color : COLOR;
  971. UNITY_VERTEX_INPUT_INSTANCE_ID
  972. };
  973. struct TessellationFactors
  974. {
  975. float edge[3] : SV_TessFactor;
  976. float inside : SV_InsideTessFactor;
  977. };
  978. VertexControl vert ( VertexInput v )
  979. {
  980. VertexControl o;
  981. UNITY_SETUP_INSTANCE_ID(v);
  982. UNITY_TRANSFER_INSTANCE_ID(v, o);
  983. o.vertex = v.vertex;
  984. o.ase_normal = v.ase_normal;
  985. o.ase_texcoord = v.ase_texcoord;
  986. o.ase_texcoord1 = v.ase_texcoord1;
  987. o.ase_color = v.ase_color;
  988. return o;
  989. }
  990. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  991. {
  992. TessellationFactors o;
  993. float4 tf = 1;
  994. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  995. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  996. #if defined(ASE_FIXED_TESSELLATION)
  997. tf = FixedTess( tessValue );
  998. #elif defined(ASE_DISTANCE_TESSELLATION)
  999. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1000. #elif defined(ASE_LENGTH_TESSELLATION)
  1001. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1002. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1003. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1004. #endif
  1005. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1006. return o;
  1007. }
  1008. [domain("tri")]
  1009. [partitioning("fractional_odd")]
  1010. [outputtopology("triangle_cw")]
  1011. [patchconstantfunc("TessellationFunction")]
  1012. [outputcontrolpoints(3)]
  1013. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1014. {
  1015. return patch[id];
  1016. }
  1017. [domain("tri")]
  1018. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1019. {
  1020. VertexInput o = (VertexInput) 0;
  1021. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1022. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1023. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1024. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1025. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1026. #if defined(ASE_PHONG_TESSELLATION)
  1027. float3 pp[3];
  1028. for (int i = 0; i < 3; ++i)
  1029. 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));
  1030. float phongStrength = _TessPhongStrength;
  1031. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1032. #endif
  1033. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1034. return VertexFunction(o);
  1035. }
  1036. #else
  1037. VertexOutput vert ( VertexInput v )
  1038. {
  1039. return VertexFunction( v );
  1040. }
  1041. #endif
  1042. half4 frag(VertexOutput IN ) : SV_TARGET
  1043. {
  1044. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1045. float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1046. float4 tex2DNode11 = tex2D( _MainTex, uv_MainTex );
  1047. float2 uv_rjTex = IN.ase_texcoord.xy * _rjTex_ST.xy + _rjTex_ST.zw;
  1048. float4 tex2DNode57 = tex2D( _rjTex, uv_rjTex );
  1049. float temp_output_2_0_g4 = tex2DNode57.r;
  1050. float lerpResult6_g4 = lerp( temp_output_2_0_g4 , ( 1.0 - temp_output_2_0_g4 ) , _rjfanxiang);
  1051. float4 texCoord52 = IN.ase_texcoord1;
  1052. texCoord52.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1053. float temp_output_4_0_g4 = texCoord52.w;
  1054. float4 temp_output_29_0 = ( ( tex2DNode11.r * _ColorR ) * saturate( ( ( ( ( lerpResult6_g4 + 1.0 ) - ( texCoord52.x * ( 1.0 + ( 1.0 - temp_output_4_0_g4 ) ) ) ) - temp_output_4_0_g4 ) / ( 1.0 - temp_output_4_0_g4 ) ) ) );
  1055. float temp_output_2_0_g2 = tex2DNode57.r;
  1056. float lerpResult6_g2 = lerp( temp_output_2_0_g2 , ( 1.0 - temp_output_2_0_g2 ) , _rjfanxiang);
  1057. float temp_output_4_0_g2 = texCoord52.w;
  1058. float4 temp_output_24_0 = ( ( tex2DNode11.g * _ColorG ) * saturate( ( ( ( ( lerpResult6_g2 + 1.0 ) - ( texCoord52.y * ( 1.0 + ( 1.0 - temp_output_4_0_g2 ) ) ) ) - temp_output_4_0_g2 ) / ( 1.0 - temp_output_4_0_g2 ) ) ) );
  1059. float temp_output_2_0_g3 = tex2DNode57.r;
  1060. float lerpResult6_g3 = lerp( temp_output_2_0_g3 , ( 1.0 - temp_output_2_0_g3 ) , _rjfanxiang);
  1061. float temp_output_4_0_g3 = texCoord52.w;
  1062. float4 temp_output_22_0 = ( ( tex2DNode11.b * _ColorB ) * saturate( ( ( ( ( lerpResult6_g3 + 1.0 ) - ( texCoord52.z * ( 1.0 + ( 1.0 - temp_output_4_0_g3 ) ) ) ) - temp_output_4_0_g3 ) / ( 1.0 - temp_output_4_0_g3 ) ) ) );
  1063. float4 temp_output_35_0 = ( float4( (( temp_output_24_0 * (temp_output_24_0).a )).rgb , 0.0 ) + ( temp_output_22_0 * ( 2.0 - (temp_output_22_0).a ) ) );
  1064. float4 temp_output_45_0 = ( float4( (( temp_output_29_0 * (temp_output_29_0).a )).rgb , 0.0 ) + ( temp_output_35_0 * ( 2.0 - (temp_output_35_0).a ) ) );
  1065. surfaceDescription.Alpha = ( ( (temp_output_45_0).a * IN.ase_color.a ) * _ca );
  1066. surfaceDescription.AlphaClipThreshold = 0.5;
  1067. #if _ALPHATEST_ON
  1068. float alphaClipThreshold = 0.01f;
  1069. #if ALPHA_CLIP_THRESHOLD
  1070. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1071. #endif
  1072. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1073. #endif
  1074. half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  1075. return outColor;
  1076. }
  1077. ENDHLSL
  1078. }
  1079. Pass
  1080. {
  1081. Name "ScenePickingPass"
  1082. Tags { "LightMode"="Picking" }
  1083. HLSLPROGRAM
  1084. #pragma multi_compile_instancing
  1085. #define _RECEIVE_SHADOWS_OFF 1
  1086. #define ASE_SRP_VERSION 999999
  1087. #pragma only_renderers d3d11 glcore gles gles3
  1088. #pragma vertex vert
  1089. #pragma fragment frag
  1090. #define ATTRIBUTES_NEED_NORMAL
  1091. #define ATTRIBUTES_NEED_TANGENT
  1092. #define SHADERPASS SHADERPASS_DEPTHONLY
  1093. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1094. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1095. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1096. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1097. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1098. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1099. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1100. struct VertexInput
  1101. {
  1102. float4 vertex : POSITION;
  1103. float3 ase_normal : NORMAL;
  1104. float4 ase_texcoord : TEXCOORD0;
  1105. float4 ase_texcoord1 : TEXCOORD1;
  1106. float4 ase_color : COLOR;
  1107. UNITY_VERTEX_INPUT_INSTANCE_ID
  1108. };
  1109. struct VertexOutput
  1110. {
  1111. float4 clipPos : SV_POSITION;
  1112. float4 ase_texcoord : TEXCOORD0;
  1113. float4 ase_texcoord1 : TEXCOORD1;
  1114. float4 ase_color : COLOR;
  1115. UNITY_VERTEX_INPUT_INSTANCE_ID
  1116. UNITY_VERTEX_OUTPUT_STEREO
  1117. };
  1118. CBUFFER_START(UnityPerMaterial)
  1119. float4 _MainTex_ST;
  1120. float4 _ColorR;
  1121. float4 _rjTex_ST;
  1122. float4 _ColorG;
  1123. float4 _ColorB;
  1124. float _rjfanxiang;
  1125. float _ca;
  1126. #ifdef TESSELLATION_ON
  1127. float _TessPhongStrength;
  1128. float _TessValue;
  1129. float _TessMin;
  1130. float _TessMax;
  1131. float _TessEdgeLength;
  1132. float _TessMaxDisp;
  1133. #endif
  1134. CBUFFER_END
  1135. sampler2D _MainTex;
  1136. sampler2D _rjTex;
  1137. float4 _SelectionID;
  1138. struct SurfaceDescription
  1139. {
  1140. float Alpha;
  1141. float AlphaClipThreshold;
  1142. };
  1143. VertexOutput VertexFunction(VertexInput v )
  1144. {
  1145. VertexOutput o;
  1146. ZERO_INITIALIZE(VertexOutput, o);
  1147. UNITY_SETUP_INSTANCE_ID(v);
  1148. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1149. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1150. o.ase_texcoord.xy = v.ase_texcoord.xy;
  1151. o.ase_texcoord1 = v.ase_texcoord1;
  1152. o.ase_color = v.ase_color;
  1153. //setting value to unused interpolator channels and avoid initialization warnings
  1154. o.ase_texcoord.zw = 0;
  1155. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1156. float3 defaultVertexValue = v.vertex.xyz;
  1157. #else
  1158. float3 defaultVertexValue = float3(0, 0, 0);
  1159. #endif
  1160. float3 vertexValue = defaultVertexValue;
  1161. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1162. v.vertex.xyz = vertexValue;
  1163. #else
  1164. v.vertex.xyz += vertexValue;
  1165. #endif
  1166. v.ase_normal = v.ase_normal;
  1167. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1168. o.clipPos = TransformWorldToHClip(positionWS);
  1169. return o;
  1170. }
  1171. #if defined(TESSELLATION_ON)
  1172. struct VertexControl
  1173. {
  1174. float4 vertex : INTERNALTESSPOS;
  1175. float3 ase_normal : NORMAL;
  1176. float4 ase_texcoord : TEXCOORD0;
  1177. float4 ase_texcoord1 : TEXCOORD1;
  1178. float4 ase_color : COLOR;
  1179. UNITY_VERTEX_INPUT_INSTANCE_ID
  1180. };
  1181. struct TessellationFactors
  1182. {
  1183. float edge[3] : SV_TessFactor;
  1184. float inside : SV_InsideTessFactor;
  1185. };
  1186. VertexControl vert ( VertexInput v )
  1187. {
  1188. VertexControl o;
  1189. UNITY_SETUP_INSTANCE_ID(v);
  1190. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1191. o.vertex = v.vertex;
  1192. o.ase_normal = v.ase_normal;
  1193. o.ase_texcoord = v.ase_texcoord;
  1194. o.ase_texcoord1 = v.ase_texcoord1;
  1195. o.ase_color = v.ase_color;
  1196. return o;
  1197. }
  1198. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1199. {
  1200. TessellationFactors o;
  1201. float4 tf = 1;
  1202. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1203. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1204. #if defined(ASE_FIXED_TESSELLATION)
  1205. tf = FixedTess( tessValue );
  1206. #elif defined(ASE_DISTANCE_TESSELLATION)
  1207. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1208. #elif defined(ASE_LENGTH_TESSELLATION)
  1209. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1210. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1211. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1212. #endif
  1213. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1214. return o;
  1215. }
  1216. [domain("tri")]
  1217. [partitioning("fractional_odd")]
  1218. [outputtopology("triangle_cw")]
  1219. [patchconstantfunc("TessellationFunction")]
  1220. [outputcontrolpoints(3)]
  1221. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1222. {
  1223. return patch[id];
  1224. }
  1225. [domain("tri")]
  1226. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1227. {
  1228. VertexInput o = (VertexInput) 0;
  1229. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1230. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1231. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1232. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1233. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1234. #if defined(ASE_PHONG_TESSELLATION)
  1235. float3 pp[3];
  1236. for (int i = 0; i < 3; ++i)
  1237. 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));
  1238. float phongStrength = _TessPhongStrength;
  1239. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1240. #endif
  1241. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1242. return VertexFunction(o);
  1243. }
  1244. #else
  1245. VertexOutput vert ( VertexInput v )
  1246. {
  1247. return VertexFunction( v );
  1248. }
  1249. #endif
  1250. half4 frag(VertexOutput IN ) : SV_TARGET
  1251. {
  1252. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1253. float2 uv_MainTex = IN.ase_texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1254. float4 tex2DNode11 = tex2D( _MainTex, uv_MainTex );
  1255. float2 uv_rjTex = IN.ase_texcoord.xy * _rjTex_ST.xy + _rjTex_ST.zw;
  1256. float4 tex2DNode57 = tex2D( _rjTex, uv_rjTex );
  1257. float temp_output_2_0_g4 = tex2DNode57.r;
  1258. float lerpResult6_g4 = lerp( temp_output_2_0_g4 , ( 1.0 - temp_output_2_0_g4 ) , _rjfanxiang);
  1259. float4 texCoord52 = IN.ase_texcoord1;
  1260. texCoord52.xy = IN.ase_texcoord1.xy * float2( 1,1 ) + float2( 0,0 );
  1261. float temp_output_4_0_g4 = texCoord52.w;
  1262. float4 temp_output_29_0 = ( ( tex2DNode11.r * _ColorR ) * saturate( ( ( ( ( lerpResult6_g4 + 1.0 ) - ( texCoord52.x * ( 1.0 + ( 1.0 - temp_output_4_0_g4 ) ) ) ) - temp_output_4_0_g4 ) / ( 1.0 - temp_output_4_0_g4 ) ) ) );
  1263. float temp_output_2_0_g2 = tex2DNode57.r;
  1264. float lerpResult6_g2 = lerp( temp_output_2_0_g2 , ( 1.0 - temp_output_2_0_g2 ) , _rjfanxiang);
  1265. float temp_output_4_0_g2 = texCoord52.w;
  1266. float4 temp_output_24_0 = ( ( tex2DNode11.g * _ColorG ) * saturate( ( ( ( ( lerpResult6_g2 + 1.0 ) - ( texCoord52.y * ( 1.0 + ( 1.0 - temp_output_4_0_g2 ) ) ) ) - temp_output_4_0_g2 ) / ( 1.0 - temp_output_4_0_g2 ) ) ) );
  1267. float temp_output_2_0_g3 = tex2DNode57.r;
  1268. float lerpResult6_g3 = lerp( temp_output_2_0_g3 , ( 1.0 - temp_output_2_0_g3 ) , _rjfanxiang);
  1269. float temp_output_4_0_g3 = texCoord52.w;
  1270. float4 temp_output_22_0 = ( ( tex2DNode11.b * _ColorB ) * saturate( ( ( ( ( lerpResult6_g3 + 1.0 ) - ( texCoord52.z * ( 1.0 + ( 1.0 - temp_output_4_0_g3 ) ) ) ) - temp_output_4_0_g3 ) / ( 1.0 - temp_output_4_0_g3 ) ) ) );
  1271. float4 temp_output_35_0 = ( float4( (( temp_output_24_0 * (temp_output_24_0).a )).rgb , 0.0 ) + ( temp_output_22_0 * ( 2.0 - (temp_output_22_0).a ) ) );
  1272. float4 temp_output_45_0 = ( float4( (( temp_output_29_0 * (temp_output_29_0).a )).rgb , 0.0 ) + ( temp_output_35_0 * ( 2.0 - (temp_output_35_0).a ) ) );
  1273. surfaceDescription.Alpha = ( ( (temp_output_45_0).a * IN.ase_color.a ) * _ca );
  1274. surfaceDescription.AlphaClipThreshold = 0.5;
  1275. #if _ALPHATEST_ON
  1276. float alphaClipThreshold = 0.01f;
  1277. #if ALPHA_CLIP_THRESHOLD
  1278. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1279. #endif
  1280. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1281. #endif
  1282. half4 outColor = 0;
  1283. outColor = _SelectionID;
  1284. return outColor;
  1285. }
  1286. ENDHLSL
  1287. }
  1288. Pass
  1289. {
  1290. Name "DepthNormals"
  1291. Tags { "LightMode"="DepthNormalsOnly" }
  1292. ZTest LEqual
  1293. ZWrite On
  1294. HLSLPROGRAM
  1295. #pragma multi_compile_instancing
  1296. #define _RECEIVE_SHADOWS_OFF 1
  1297. #define ASE_SRP_VERSION 999999
  1298. #pragma only_renderers d3d11 glcore gles gles3
  1299. #pragma multi_compile_fog
  1300. #pragma instancing_options renderinglayer
  1301. #pragma vertex vert
  1302. #pragma fragment frag
  1303. #define ATTRIBUTES_NEED_NORMAL
  1304. #define ATTRIBUTES_NEED_TANGENT
  1305. #define VARYINGS_NEED_NORMAL_WS
  1306. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1307. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1308. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1309. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1310. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1311. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1312. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1313. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1314. struct VertexInput
  1315. {
  1316. float4 vertex : POSITION;
  1317. float3 ase_normal : NORMAL;
  1318. float4 ase_texcoord : TEXCOORD0;
  1319. float4 ase_texcoord1 : TEXCOORD1;
  1320. float4 ase_color : COLOR;
  1321. UNITY_VERTEX_INPUT_INSTANCE_ID
  1322. };
  1323. struct VertexOutput
  1324. {
  1325. float4 clipPos : SV_POSITION;
  1326. float3 normalWS : TEXCOORD0;
  1327. float4 ase_texcoord1 : TEXCOORD1;
  1328. float4 ase_texcoord2 : TEXCOORD2;
  1329. float4 ase_color : COLOR;
  1330. UNITY_VERTEX_INPUT_INSTANCE_ID
  1331. UNITY_VERTEX_OUTPUT_STEREO
  1332. };
  1333. CBUFFER_START(UnityPerMaterial)
  1334. float4 _MainTex_ST;
  1335. float4 _ColorR;
  1336. float4 _rjTex_ST;
  1337. float4 _ColorG;
  1338. float4 _ColorB;
  1339. float _rjfanxiang;
  1340. float _ca;
  1341. #ifdef TESSELLATION_ON
  1342. float _TessPhongStrength;
  1343. float _TessValue;
  1344. float _TessMin;
  1345. float _TessMax;
  1346. float _TessEdgeLength;
  1347. float _TessMaxDisp;
  1348. #endif
  1349. CBUFFER_END
  1350. sampler2D _MainTex;
  1351. sampler2D _rjTex;
  1352. struct SurfaceDescription
  1353. {
  1354. float Alpha;
  1355. float AlphaClipThreshold;
  1356. };
  1357. VertexOutput VertexFunction(VertexInput v )
  1358. {
  1359. VertexOutput o;
  1360. ZERO_INITIALIZE(VertexOutput, o);
  1361. UNITY_SETUP_INSTANCE_ID(v);
  1362. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1363. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1364. o.ase_texcoord1.xy = v.ase_texcoord.xy;
  1365. o.ase_texcoord2 = v.ase_texcoord1;
  1366. o.ase_color = v.ase_color;
  1367. //setting value to unused interpolator channels and avoid initialization warnings
  1368. o.ase_texcoord1.zw = 0;
  1369. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1370. float3 defaultVertexValue = v.vertex.xyz;
  1371. #else
  1372. float3 defaultVertexValue = float3(0, 0, 0);
  1373. #endif
  1374. float3 vertexValue = defaultVertexValue;
  1375. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1376. v.vertex.xyz = vertexValue;
  1377. #else
  1378. v.vertex.xyz += vertexValue;
  1379. #endif
  1380. v.ase_normal = v.ase_normal;
  1381. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1382. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1383. o.clipPos = TransformWorldToHClip(positionWS);
  1384. o.normalWS.xyz = normalWS;
  1385. return o;
  1386. }
  1387. #if defined(TESSELLATION_ON)
  1388. struct VertexControl
  1389. {
  1390. float4 vertex : INTERNALTESSPOS;
  1391. float3 ase_normal : NORMAL;
  1392. float4 ase_texcoord : TEXCOORD0;
  1393. float4 ase_texcoord1 : TEXCOORD1;
  1394. float4 ase_color : COLOR;
  1395. UNITY_VERTEX_INPUT_INSTANCE_ID
  1396. };
  1397. struct TessellationFactors
  1398. {
  1399. float edge[3] : SV_TessFactor;
  1400. float inside : SV_InsideTessFactor;
  1401. };
  1402. VertexControl vert ( VertexInput v )
  1403. {
  1404. VertexControl o;
  1405. UNITY_SETUP_INSTANCE_ID(v);
  1406. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1407. o.vertex = v.vertex;
  1408. o.ase_normal = v.ase_normal;
  1409. o.ase_texcoord = v.ase_texcoord;
  1410. o.ase_texcoord1 = v.ase_texcoord1;
  1411. o.ase_color = v.ase_color;
  1412. return o;
  1413. }
  1414. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1415. {
  1416. TessellationFactors o;
  1417. float4 tf = 1;
  1418. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1419. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1420. #if defined(ASE_FIXED_TESSELLATION)
  1421. tf = FixedTess( tessValue );
  1422. #elif defined(ASE_DISTANCE_TESSELLATION)
  1423. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1424. #elif defined(ASE_LENGTH_TESSELLATION)
  1425. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1426. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1427. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1428. #endif
  1429. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1430. return o;
  1431. }
  1432. [domain("tri")]
  1433. [partitioning("fractional_odd")]
  1434. [outputtopology("triangle_cw")]
  1435. [patchconstantfunc("TessellationFunction")]
  1436. [outputcontrolpoints(3)]
  1437. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1438. {
  1439. return patch[id];
  1440. }
  1441. [domain("tri")]
  1442. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1443. {
  1444. VertexInput o = (VertexInput) 0;
  1445. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1446. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1447. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1448. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1449. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1450. #if defined(ASE_PHONG_TESSELLATION)
  1451. float3 pp[3];
  1452. for (int i = 0; i < 3; ++i)
  1453. 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));
  1454. float phongStrength = _TessPhongStrength;
  1455. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1456. #endif
  1457. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1458. return VertexFunction(o);
  1459. }
  1460. #else
  1461. VertexOutput vert ( VertexInput v )
  1462. {
  1463. return VertexFunction( v );
  1464. }
  1465. #endif
  1466. half4 frag(VertexOutput IN ) : SV_TARGET
  1467. {
  1468. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1469. float2 uv_MainTex = IN.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1470. float4 tex2DNode11 = tex2D( _MainTex, uv_MainTex );
  1471. float2 uv_rjTex = IN.ase_texcoord1.xy * _rjTex_ST.xy + _rjTex_ST.zw;
  1472. float4 tex2DNode57 = tex2D( _rjTex, uv_rjTex );
  1473. float temp_output_2_0_g4 = tex2DNode57.r;
  1474. float lerpResult6_g4 = lerp( temp_output_2_0_g4 , ( 1.0 - temp_output_2_0_g4 ) , _rjfanxiang);
  1475. float4 texCoord52 = IN.ase_texcoord2;
  1476. texCoord52.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1477. float temp_output_4_0_g4 = texCoord52.w;
  1478. float4 temp_output_29_0 = ( ( tex2DNode11.r * _ColorR ) * saturate( ( ( ( ( lerpResult6_g4 + 1.0 ) - ( texCoord52.x * ( 1.0 + ( 1.0 - temp_output_4_0_g4 ) ) ) ) - temp_output_4_0_g4 ) / ( 1.0 - temp_output_4_0_g4 ) ) ) );
  1479. float temp_output_2_0_g2 = tex2DNode57.r;
  1480. float lerpResult6_g2 = lerp( temp_output_2_0_g2 , ( 1.0 - temp_output_2_0_g2 ) , _rjfanxiang);
  1481. float temp_output_4_0_g2 = texCoord52.w;
  1482. float4 temp_output_24_0 = ( ( tex2DNode11.g * _ColorG ) * saturate( ( ( ( ( lerpResult6_g2 + 1.0 ) - ( texCoord52.y * ( 1.0 + ( 1.0 - temp_output_4_0_g2 ) ) ) ) - temp_output_4_0_g2 ) / ( 1.0 - temp_output_4_0_g2 ) ) ) );
  1483. float temp_output_2_0_g3 = tex2DNode57.r;
  1484. float lerpResult6_g3 = lerp( temp_output_2_0_g3 , ( 1.0 - temp_output_2_0_g3 ) , _rjfanxiang);
  1485. float temp_output_4_0_g3 = texCoord52.w;
  1486. float4 temp_output_22_0 = ( ( tex2DNode11.b * _ColorB ) * saturate( ( ( ( ( lerpResult6_g3 + 1.0 ) - ( texCoord52.z * ( 1.0 + ( 1.0 - temp_output_4_0_g3 ) ) ) ) - temp_output_4_0_g3 ) / ( 1.0 - temp_output_4_0_g3 ) ) ) );
  1487. float4 temp_output_35_0 = ( float4( (( temp_output_24_0 * (temp_output_24_0).a )).rgb , 0.0 ) + ( temp_output_22_0 * ( 2.0 - (temp_output_22_0).a ) ) );
  1488. float4 temp_output_45_0 = ( float4( (( temp_output_29_0 * (temp_output_29_0).a )).rgb , 0.0 ) + ( temp_output_35_0 * ( 2.0 - (temp_output_35_0).a ) ) );
  1489. surfaceDescription.Alpha = ( ( (temp_output_45_0).a * IN.ase_color.a ) * _ca );
  1490. surfaceDescription.AlphaClipThreshold = 0.5;
  1491. #if _ALPHATEST_ON
  1492. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1493. #endif
  1494. #ifdef LOD_FADE_CROSSFADE
  1495. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1496. #endif
  1497. float3 normalWS = IN.normalWS;
  1498. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1499. }
  1500. ENDHLSL
  1501. }
  1502. Pass
  1503. {
  1504. Name "DepthNormalsOnly"
  1505. Tags { "LightMode"="DepthNormalsOnly" }
  1506. ZTest LEqual
  1507. ZWrite On
  1508. HLSLPROGRAM
  1509. #pragma multi_compile_instancing
  1510. #define _RECEIVE_SHADOWS_OFF 1
  1511. #define ASE_SRP_VERSION 999999
  1512. #pragma exclude_renderers glcore gles gles3
  1513. #pragma vertex vert
  1514. #pragma fragment frag
  1515. #define ATTRIBUTES_NEED_NORMAL
  1516. #define ATTRIBUTES_NEED_TANGENT
  1517. #define ATTRIBUTES_NEED_TEXCOORD1
  1518. #define VARYINGS_NEED_NORMAL_WS
  1519. #define VARYINGS_NEED_TANGENT_WS
  1520. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1521. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1522. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1523. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1524. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1525. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1526. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1527. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1528. struct VertexInput
  1529. {
  1530. float4 vertex : POSITION;
  1531. float3 ase_normal : NORMAL;
  1532. float4 ase_texcoord : TEXCOORD0;
  1533. float4 ase_texcoord1 : TEXCOORD1;
  1534. float4 ase_color : COLOR;
  1535. UNITY_VERTEX_INPUT_INSTANCE_ID
  1536. };
  1537. struct VertexOutput
  1538. {
  1539. float4 clipPos : SV_POSITION;
  1540. float3 normalWS : TEXCOORD0;
  1541. float4 ase_texcoord1 : TEXCOORD1;
  1542. float4 ase_texcoord2 : TEXCOORD2;
  1543. float4 ase_color : COLOR;
  1544. UNITY_VERTEX_INPUT_INSTANCE_ID
  1545. UNITY_VERTEX_OUTPUT_STEREO
  1546. };
  1547. CBUFFER_START(UnityPerMaterial)
  1548. float4 _MainTex_ST;
  1549. float4 _ColorR;
  1550. float4 _rjTex_ST;
  1551. float4 _ColorG;
  1552. float4 _ColorB;
  1553. float _rjfanxiang;
  1554. float _ca;
  1555. #ifdef TESSELLATION_ON
  1556. float _TessPhongStrength;
  1557. float _TessValue;
  1558. float _TessMin;
  1559. float _TessMax;
  1560. float _TessEdgeLength;
  1561. float _TessMaxDisp;
  1562. #endif
  1563. CBUFFER_END
  1564. sampler2D _MainTex;
  1565. sampler2D _rjTex;
  1566. struct SurfaceDescription
  1567. {
  1568. float Alpha;
  1569. float AlphaClipThreshold;
  1570. };
  1571. VertexOutput VertexFunction(VertexInput v )
  1572. {
  1573. VertexOutput o;
  1574. ZERO_INITIALIZE(VertexOutput, o);
  1575. UNITY_SETUP_INSTANCE_ID(v);
  1576. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1577. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1578. o.ase_texcoord1.xy = v.ase_texcoord.xy;
  1579. o.ase_texcoord2 = v.ase_texcoord1;
  1580. o.ase_color = v.ase_color;
  1581. //setting value to unused interpolator channels and avoid initialization warnings
  1582. o.ase_texcoord1.zw = 0;
  1583. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1584. float3 defaultVertexValue = v.vertex.xyz;
  1585. #else
  1586. float3 defaultVertexValue = float3(0, 0, 0);
  1587. #endif
  1588. float3 vertexValue = defaultVertexValue;
  1589. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1590. v.vertex.xyz = vertexValue;
  1591. #else
  1592. v.vertex.xyz += vertexValue;
  1593. #endif
  1594. v.ase_normal = v.ase_normal;
  1595. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1596. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1597. o.clipPos = TransformWorldToHClip(positionWS);
  1598. o.normalWS.xyz = normalWS;
  1599. return o;
  1600. }
  1601. #if defined(TESSELLATION_ON)
  1602. struct VertexControl
  1603. {
  1604. float4 vertex : INTERNALTESSPOS;
  1605. float3 ase_normal : NORMAL;
  1606. float4 ase_texcoord : TEXCOORD0;
  1607. float4 ase_texcoord1 : TEXCOORD1;
  1608. float4 ase_color : COLOR;
  1609. UNITY_VERTEX_INPUT_INSTANCE_ID
  1610. };
  1611. struct TessellationFactors
  1612. {
  1613. float edge[3] : SV_TessFactor;
  1614. float inside : SV_InsideTessFactor;
  1615. };
  1616. VertexControl vert ( VertexInput v )
  1617. {
  1618. VertexControl o;
  1619. UNITY_SETUP_INSTANCE_ID(v);
  1620. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1621. o.vertex = v.vertex;
  1622. o.ase_normal = v.ase_normal;
  1623. o.ase_texcoord = v.ase_texcoord;
  1624. o.ase_texcoord1 = v.ase_texcoord1;
  1625. o.ase_color = v.ase_color;
  1626. return o;
  1627. }
  1628. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1629. {
  1630. TessellationFactors o;
  1631. float4 tf = 1;
  1632. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1633. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1634. #if defined(ASE_FIXED_TESSELLATION)
  1635. tf = FixedTess( tessValue );
  1636. #elif defined(ASE_DISTANCE_TESSELLATION)
  1637. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1638. #elif defined(ASE_LENGTH_TESSELLATION)
  1639. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1640. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1641. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1642. #endif
  1643. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1644. return o;
  1645. }
  1646. [domain("tri")]
  1647. [partitioning("fractional_odd")]
  1648. [outputtopology("triangle_cw")]
  1649. [patchconstantfunc("TessellationFunction")]
  1650. [outputcontrolpoints(3)]
  1651. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1652. {
  1653. return patch[id];
  1654. }
  1655. [domain("tri")]
  1656. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1657. {
  1658. VertexInput o = (VertexInput) 0;
  1659. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1660. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1661. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  1662. o.ase_texcoord1 = patch[0].ase_texcoord1 * bary.x + patch[1].ase_texcoord1 * bary.y + patch[2].ase_texcoord1 * bary.z;
  1663. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  1664. #if defined(ASE_PHONG_TESSELLATION)
  1665. float3 pp[3];
  1666. for (int i = 0; i < 3; ++i)
  1667. 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));
  1668. float phongStrength = _TessPhongStrength;
  1669. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1670. #endif
  1671. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1672. return VertexFunction(o);
  1673. }
  1674. #else
  1675. VertexOutput vert ( VertexInput v )
  1676. {
  1677. return VertexFunction( v );
  1678. }
  1679. #endif
  1680. half4 frag(VertexOutput IN ) : SV_TARGET
  1681. {
  1682. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1683. float2 uv_MainTex = IN.ase_texcoord1.xy * _MainTex_ST.xy + _MainTex_ST.zw;
  1684. float4 tex2DNode11 = tex2D( _MainTex, uv_MainTex );
  1685. float2 uv_rjTex = IN.ase_texcoord1.xy * _rjTex_ST.xy + _rjTex_ST.zw;
  1686. float4 tex2DNode57 = tex2D( _rjTex, uv_rjTex );
  1687. float temp_output_2_0_g4 = tex2DNode57.r;
  1688. float lerpResult6_g4 = lerp( temp_output_2_0_g4 , ( 1.0 - temp_output_2_0_g4 ) , _rjfanxiang);
  1689. float4 texCoord52 = IN.ase_texcoord2;
  1690. texCoord52.xy = IN.ase_texcoord2.xy * float2( 1,1 ) + float2( 0,0 );
  1691. float temp_output_4_0_g4 = texCoord52.w;
  1692. float4 temp_output_29_0 = ( ( tex2DNode11.r * _ColorR ) * saturate( ( ( ( ( lerpResult6_g4 + 1.0 ) - ( texCoord52.x * ( 1.0 + ( 1.0 - temp_output_4_0_g4 ) ) ) ) - temp_output_4_0_g4 ) / ( 1.0 - temp_output_4_0_g4 ) ) ) );
  1693. float temp_output_2_0_g2 = tex2DNode57.r;
  1694. float lerpResult6_g2 = lerp( temp_output_2_0_g2 , ( 1.0 - temp_output_2_0_g2 ) , _rjfanxiang);
  1695. float temp_output_4_0_g2 = texCoord52.w;
  1696. float4 temp_output_24_0 = ( ( tex2DNode11.g * _ColorG ) * saturate( ( ( ( ( lerpResult6_g2 + 1.0 ) - ( texCoord52.y * ( 1.0 + ( 1.0 - temp_output_4_0_g2 ) ) ) ) - temp_output_4_0_g2 ) / ( 1.0 - temp_output_4_0_g2 ) ) ) );
  1697. float temp_output_2_0_g3 = tex2DNode57.r;
  1698. float lerpResult6_g3 = lerp( temp_output_2_0_g3 , ( 1.0 - temp_output_2_0_g3 ) , _rjfanxiang);
  1699. float temp_output_4_0_g3 = texCoord52.w;
  1700. float4 temp_output_22_0 = ( ( tex2DNode11.b * _ColorB ) * saturate( ( ( ( ( lerpResult6_g3 + 1.0 ) - ( texCoord52.z * ( 1.0 + ( 1.0 - temp_output_4_0_g3 ) ) ) ) - temp_output_4_0_g3 ) / ( 1.0 - temp_output_4_0_g3 ) ) ) );
  1701. float4 temp_output_35_0 = ( float4( (( temp_output_24_0 * (temp_output_24_0).a )).rgb , 0.0 ) + ( temp_output_22_0 * ( 2.0 - (temp_output_22_0).a ) ) );
  1702. float4 temp_output_45_0 = ( float4( (( temp_output_29_0 * (temp_output_29_0).a )).rgb , 0.0 ) + ( temp_output_35_0 * ( 2.0 - (temp_output_35_0).a ) ) );
  1703. surfaceDescription.Alpha = ( ( (temp_output_45_0).a * IN.ase_color.a ) * _ca );
  1704. surfaceDescription.AlphaClipThreshold = 0.5;
  1705. #if _ALPHATEST_ON
  1706. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1707. #endif
  1708. #ifdef LOD_FADE_CROSSFADE
  1709. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1710. #endif
  1711. float3 normalWS = IN.normalWS;
  1712. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1713. }
  1714. ENDHLSL
  1715. }
  1716. }
  1717. CustomEditor "UnityEditor.ShaderGraphUnlitGUI"
  1718. Fallback "Hidden/InternalErrorShader"
  1719. }
  1720. /*ASEBEGIN
  1721. Version=18935
  1722. -209.9999;124.6667;1575.333;794.3334;-1550.649;-15.15318;1;True;False
  1723. Node;AmplifyShaderEditor.CommentaryNode;53;-1777.698,262.5864;Inherit;False;298;254;Comment;1;52;粒子分别控制rgb溶解最后一个是软硬度变化;1,1,1,1;0;0
  1724. Node;AmplifyShaderEditor.ColorNode;18;-830.342,475.5599;Inherit;False;Property;_ColorB;ColorB;3;1;[HDR];Create;True;0;0;0;False;0;False;0.2641509,0.02860036,0,1;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1725. Node;AmplifyShaderEditor.RangedFloatNode;21;-909.6068,918.1845;Inherit;False;Property;_rjfanxiang;溶解反向;9;0;Create;False;0;0;0;False;0;False;0;1;0;1;0;1;FLOAT;0
  1726. Node;AmplifyShaderEditor.SamplerNode;57;-1438.999,1027.225;Inherit;True;Property;_rjTex;溶解贴图;10;0;Create;False;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
  1727. Node;AmplifyShaderEditor.TextureCoordinatesNode;52;-1727.698,312.5864;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
  1728. Node;AmplifyShaderEditor.ColorNode;16;-835.4141,202.2102;Inherit;False;Property;_ColorG;ColorG;2;1;[HDR];Create;True;0;0;0;False;0;False;0.6509434,0.1219102,0,1;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1729. Node;AmplifyShaderEditor.SamplerNode;11;-994.7443,-344.4401;Inherit;True;Property;_MainTex;MainTex;0;0;Create;True;0;0;0;False;0;False;-1;543c0c227927d6845b155fef0fb1acde;543c0c227927d6845b155fef0fb1acde;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
  1730. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;17;-514.1381,508.7428;Inherit;True;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1731. Node;AmplifyShaderEditor.FunctionNode;23;-310.5717,222.0873;Inherit;False;RJ;-1;;2;f401bd3708e35f04c888868fdadda589;0;4;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;1;FLOAT;0
  1732. Node;AmplifyShaderEditor.FunctionNode;10;-298.2923,707.5153;Inherit;False;RJ;-1;;3;f401bd3708e35f04c888868fdadda589;0;4;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;1;FLOAT;0
  1733. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;15;-541.4141,75.21027;Inherit;True;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1734. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;22;-4.348524,593.5463;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1735. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;24;-49.56953,156.6245;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1736. Node;AmplifyShaderEditor.ComponentMaskNode;30;189.3634,241.4413;Inherit;True;False;False;False;True;1;0;COLOR;0,0,0,0;False;1;FLOAT;0
  1737. Node;AmplifyShaderEditor.ComponentMaskNode;38;273.1224,770.3129;Inherit;False;False;False;False;True;1;0;COLOR;0,0,0,0;False;1;FLOAT;0
  1738. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;31;480.923,175.3568;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1739. Node;AmplifyShaderEditor.ColorNode;13;-835.9141,-83.78973;Inherit;False;Property;_ColorR;ColorR;1;1;[HDR];Create;True;0;0;0;False;0;False;0.9433962,0.3101912,0,1;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1740. Node;AmplifyShaderEditor.SimpleSubtractOpNode;33;353.8565,919.3854;Inherit;False;2;0;FLOAT;2;False;1;FLOAT;0;False;1;FLOAT;0
  1741. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;32;527.2787,645.0684;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1742. Node;AmplifyShaderEditor.ComponentMaskNode;37;707.6567,233.4326;Inherit;True;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0
  1743. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;14;-528.9141,-184.7897;Inherit;True;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1744. Node;AmplifyShaderEditor.FunctionNode;27;-297.1303,-70.79679;Inherit;False;RJ;-1;;4;f401bd3708e35f04c888868fdadda589;0;4;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;1;FLOAT;0
  1745. Node;AmplifyShaderEditor.SimpleAddOpNode;35;944.848,458.2614;Inherit;True;2;2;0;FLOAT3;0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1746. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;29;-20.43361,-168.6059;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1747. Node;AmplifyShaderEditor.ComponentMaskNode;39;289.5442,-94.65359;Inherit;True;False;False;False;True;1;0;COLOR;0,0,0,0;False;1;FLOAT;0
  1748. Node;AmplifyShaderEditor.ComponentMaskNode;42;1196.449,564.1771;Inherit;True;False;False;False;True;1;0;COLOR;0,0,0,0;False;1;FLOAT;0
  1749. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;40;546.1252,-203.4795;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1750. Node;AmplifyShaderEditor.SimpleSubtractOpNode;43;1456.723,501.2531;Inherit;False;2;0;FLOAT;2;False;1;FLOAT;0;False;1;FLOAT;0
  1751. Node;AmplifyShaderEditor.ComponentMaskNode;41;846.2894,-206.9005;Inherit;True;True;True;True;False;1;0;COLOR;0,0,0,0;False;1;FLOAT3;0
  1752. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;44;1654.076,325.3527;Inherit;True;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  1753. Node;AmplifyShaderEditor.SimpleAddOpNode;45;1897.569,166.218;Inherit;True;2;2;0;FLOAT3;0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1754. Node;AmplifyShaderEditor.VertexColorNode;55;2227.687,232.8243;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1755. Node;AmplifyShaderEditor.ComponentMaskNode;51;2267.174,678.4935;Inherit;True;False;False;False;True;1;0;COLOR;0,0,0,0;False;1;FLOAT;0
  1756. Node;AmplifyShaderEditor.RangedFloatNode;58;2507.649,540.8198;Inherit;False;Property;_ca;_ca;6;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  1757. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;56;2456.419,440.8293;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1758. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;59;2635.649,443.8198;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  1759. Node;AmplifyShaderEditor.RangedFloatNode;20;-1202.095,783.7334;Inherit;False;Property;_rjsoft;溶解软硬;8;0;Create;False;0;0;0;False;0;False;1;0.4241753;0;1;0;1;FLOAT;0
  1760. Node;AmplifyShaderEditor.RangedFloatNode;26;-1182.962,405.2496;Inherit;False;Property;_rjG;溶解G;5;0;Create;False;0;0;0;False;0;False;0.57564;0.5781973;0;1;0;1;FLOAT;0
  1761. Node;AmplifyShaderEditor.RangedFloatNode;19;-1181.9,646.6004;Inherit;False;Property;_rjB;溶解B;7;0;Create;False;0;0;0;False;0;False;0.2351786;0.5781973;0;1;0;1;FLOAT;0
  1762. Node;AmplifyShaderEditor.RangedFloatNode;28;-1129.795,95.22134;Inherit;False;Property;_rjR;溶解R;4;0;Create;False;0;0;0;False;0;False;0.283518;0.5781973;0;1;0;1;FLOAT;0
  1763. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;54;2348.687,53.82434;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  1764. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;5;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Universal2D;0;5;Universal2D;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-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;0;False;-1;0;False;-1;True;1;LightMode=Universal2D;False;False;0;Hidden/InternalErrorShader;0;0;Standard;0;False;0
  1765. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;6;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;SceneSelectionPass;0;6;SceneSelectionPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-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
  1766. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;4;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;Meta;0;4;Meta;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-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
  1767. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;7;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ScenePickingPass;0;7;ScenePickingPass;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-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
  1768. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;9;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormalsOnly;0;9;DepthNormalsOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-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
  1769. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;3;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthOnly;0;3;DepthOnly;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-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
  1770. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;8;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;DepthNormals;0;8;DepthNormals;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-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
  1771. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;2;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ShadowCaster;0;2;ShadowCaster;0;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-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
  1772. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;0;0,0;Float;False;False;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;1;New Amplify Shader;2992e84f91cbeb14eab234972e07ea9d;True;ExtraPrePass;0;0;ExtraPrePass;5;False;False;False;False;False;False;False;False;False;False;False;False;True;0;False;-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
  1773. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;2765.568,130.5359;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;LT/CartoonBoom01;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=Transparent=RenderType;Queue=Transparent=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;0;False;-1;0;False;-1;True;1;LightMode=UniversalForwardOnly;False;False;0;Hidden/InternalErrorShader;0;0;Standard;22;Surface;1;638008077681079124; Blend;0;0;Two Sided;0;638008077705461022;Cast Shadows;0;638008077720030314; Use Shadow Threshold;0;0;Receive Shadows;0;638008077727721720;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
  1774. WireConnection;17;0;11;3
  1775. WireConnection;17;1;18;0
  1776. WireConnection;23;2;57;1
  1777. WireConnection;23;3;52;2
  1778. WireConnection;23;4;52;4
  1779. WireConnection;23;5;21;0
  1780. WireConnection;10;2;57;1
  1781. WireConnection;10;3;52;3
  1782. WireConnection;10;4;52;4
  1783. WireConnection;10;5;21;0
  1784. WireConnection;15;0;11;2
  1785. WireConnection;15;1;16;0
  1786. WireConnection;22;0;17;0
  1787. WireConnection;22;1;10;0
  1788. WireConnection;24;0;15;0
  1789. WireConnection;24;1;23;0
  1790. WireConnection;30;0;24;0
  1791. WireConnection;38;0;22;0
  1792. WireConnection;31;0;24;0
  1793. WireConnection;31;1;30;0
  1794. WireConnection;33;1;38;0
  1795. WireConnection;32;0;22;0
  1796. WireConnection;32;1;33;0
  1797. WireConnection;37;0;31;0
  1798. WireConnection;14;0;11;1
  1799. WireConnection;14;1;13;0
  1800. WireConnection;27;2;57;1
  1801. WireConnection;27;3;52;1
  1802. WireConnection;27;4;52;4
  1803. WireConnection;27;5;21;0
  1804. WireConnection;35;0;37;0
  1805. WireConnection;35;1;32;0
  1806. WireConnection;29;0;14;0
  1807. WireConnection;29;1;27;0
  1808. WireConnection;39;0;29;0
  1809. WireConnection;42;0;35;0
  1810. WireConnection;40;0;29;0
  1811. WireConnection;40;1;39;0
  1812. WireConnection;43;1;42;0
  1813. WireConnection;41;0;40;0
  1814. WireConnection;44;0;35;0
  1815. WireConnection;44;1;43;0
  1816. WireConnection;45;0;41;0
  1817. WireConnection;45;1;44;0
  1818. WireConnection;51;0;45;0
  1819. WireConnection;56;0;51;0
  1820. WireConnection;56;1;55;4
  1821. WireConnection;59;0;56;0
  1822. WireConnection;59;1;58;0
  1823. WireConnection;54;0;45;0
  1824. WireConnection;54;1;55;0
  1825. WireConnection;1;2;54;0
  1826. WireConnection;1;3;59;0
  1827. ASEEND*/
  1828. //CHKSM=9F70D10560FEB1BB0074EB385C7F8A0C43DEC4ED