Add.shader 69 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "LT/Add"
  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]_Color("Color", Color) = (1,1,1,1)
  11. _Intensity("Intensity", Range( 0 , 60)) = 1
  12. _MainTexChannel("通道选择", Vector) = (1,0,0,0)
  13. _MainTexRotation("贴图旋转", Range( 0 , 1)) = 0
  14. [ASEEnd]_ca("_ca", Float) = 1
  15. [HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
  16. [HideInInspector]_QueueControl("_QueueControl", Float) = -1
  17. [HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  18. [HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  19. [HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  20. //_TessPhongStrength( "Tess Phong Strength", Range( 0, 1 ) ) = 0.5
  21. //_TessValue( "Tess Max Tessellation", Range( 1, 32 ) ) = 16
  22. //_TessMin( "Tess Min Distance", Float ) = 10
  23. //_TessMax( "Tess Max Distance", Float ) = 25
  24. //_TessEdgeLength ( "Tess Edge length", Range( 2, 50 ) ) = 16
  25. //_TessMaxDisp( "Tess Max Displacement", Float ) = 25
  26. }
  27. SubShader
  28. {
  29. LOD 0
  30. Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent" }
  31. Cull Off
  32. AlphaToMask Off
  33. HLSLINCLUDE
  34. #pragma target 3.0
  35. #pragma prefer_hlslcc gles
  36. #pragma only_renderers d3d9 d3d11 glcore gles gles3 metal vulkan nomrt
  37. #ifndef ASE_TESS_FUNCS
  38. #define ASE_TESS_FUNCS
  39. float4 FixedTess( float tessValue )
  40. {
  41. return tessValue;
  42. }
  43. float CalcDistanceTessFactor (float4 vertex, float minDist, float maxDist, float tess, float4x4 o2w, float3 cameraPos )
  44. {
  45. float3 wpos = mul(o2w,vertex).xyz;
  46. float dist = distance (wpos, cameraPos);
  47. float f = clamp(1.0 - (dist - minDist) / (maxDist - minDist), 0.01, 1.0) * tess;
  48. return f;
  49. }
  50. float4 CalcTriEdgeTessFactors (float3 triVertexFactors)
  51. {
  52. float4 tess;
  53. tess.x = 0.5 * (triVertexFactors.y + triVertexFactors.z);
  54. tess.y = 0.5 * (triVertexFactors.x + triVertexFactors.z);
  55. tess.z = 0.5 * (triVertexFactors.x + triVertexFactors.y);
  56. tess.w = (triVertexFactors.x + triVertexFactors.y + triVertexFactors.z) / 3.0f;
  57. return tess;
  58. }
  59. float CalcEdgeTessFactor (float3 wpos0, float3 wpos1, float edgeLen, float3 cameraPos, float4 scParams )
  60. {
  61. float dist = distance (0.5 * (wpos0+wpos1), cameraPos);
  62. float len = distance(wpos0, wpos1);
  63. float f = max(len * scParams.y / (edgeLen * dist), 1.0);
  64. return f;
  65. }
  66. float DistanceFromPlane (float3 pos, float4 plane)
  67. {
  68. float d = dot (float4(pos,1.0f), plane);
  69. return d;
  70. }
  71. bool WorldViewFrustumCull (float3 wpos0, float3 wpos1, float3 wpos2, float cullEps, float4 planes[6] )
  72. {
  73. float4 planeTest;
  74. planeTest.x = (( DistanceFromPlane(wpos0, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  75. (( DistanceFromPlane(wpos1, planes[0]) > -cullEps) ? 1.0f : 0.0f ) +
  76. (( DistanceFromPlane(wpos2, planes[0]) > -cullEps) ? 1.0f : 0.0f );
  77. planeTest.y = (( DistanceFromPlane(wpos0, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  78. (( DistanceFromPlane(wpos1, planes[1]) > -cullEps) ? 1.0f : 0.0f ) +
  79. (( DistanceFromPlane(wpos2, planes[1]) > -cullEps) ? 1.0f : 0.0f );
  80. planeTest.z = (( DistanceFromPlane(wpos0, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  81. (( DistanceFromPlane(wpos1, planes[2]) > -cullEps) ? 1.0f : 0.0f ) +
  82. (( DistanceFromPlane(wpos2, planes[2]) > -cullEps) ? 1.0f : 0.0f );
  83. planeTest.w = (( DistanceFromPlane(wpos0, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  84. (( DistanceFromPlane(wpos1, planes[3]) > -cullEps) ? 1.0f : 0.0f ) +
  85. (( DistanceFromPlane(wpos2, planes[3]) > -cullEps) ? 1.0f : 0.0f );
  86. return !all (planeTest);
  87. }
  88. float4 DistanceBasedTess( float4 v0, float4 v1, float4 v2, float tess, float minDist, float maxDist, float4x4 o2w, float3 cameraPos )
  89. {
  90. float3 f;
  91. f.x = CalcDistanceTessFactor (v0,minDist,maxDist,tess,o2w,cameraPos);
  92. f.y = CalcDistanceTessFactor (v1,minDist,maxDist,tess,o2w,cameraPos);
  93. f.z = CalcDistanceTessFactor (v2,minDist,maxDist,tess,o2w,cameraPos);
  94. return CalcTriEdgeTessFactors (f);
  95. }
  96. float4 EdgeLengthBasedTess( float4 v0, float4 v1, float4 v2, float edgeLength, float4x4 o2w, float3 cameraPos, float4 scParams )
  97. {
  98. float3 pos0 = mul(o2w,v0).xyz;
  99. float3 pos1 = mul(o2w,v1).xyz;
  100. float3 pos2 = mul(o2w,v2).xyz;
  101. float4 tess;
  102. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  103. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  104. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  105. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  106. return tess;
  107. }
  108. float4 EdgeLengthBasedTessCull( float4 v0, float4 v1, float4 v2, float edgeLength, float maxDisplacement, float4x4 o2w, float3 cameraPos, float4 scParams, float4 planes[6] )
  109. {
  110. float3 pos0 = mul(o2w,v0).xyz;
  111. float3 pos1 = mul(o2w,v1).xyz;
  112. float3 pos2 = mul(o2w,v2).xyz;
  113. float4 tess;
  114. if (WorldViewFrustumCull(pos0, pos1, pos2, maxDisplacement, planes))
  115. {
  116. tess = 0.0f;
  117. }
  118. else
  119. {
  120. tess.x = CalcEdgeTessFactor (pos1, pos2, edgeLength, cameraPos, scParams);
  121. tess.y = CalcEdgeTessFactor (pos2, pos0, edgeLength, cameraPos, scParams);
  122. tess.z = CalcEdgeTessFactor (pos0, pos1, edgeLength, cameraPos, scParams);
  123. tess.w = (tess.x + tess.y + tess.z) / 3.0f;
  124. }
  125. return tess;
  126. }
  127. #endif //ASE_TESS_FUNCS
  128. ENDHLSL
  129. Pass
  130. {
  131. Name "Forward"
  132. Tags { "LightMode"="UniversalForwardOnly" }
  133. Blend One One, One OneMinusSrcAlpha
  134. ZWrite Off
  135. ZTest LEqual
  136. Offset 0 , 0
  137. ColorMask RGBA
  138. HLSLPROGRAM
  139. #pragma multi_compile_instancing
  140. #define _RECEIVE_SHADOWS_OFF 1
  141. #define ASE_SRP_VERSION 999999
  142. #pragma multi_compile _ LIGHTMAP_ON
  143. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  144. #pragma shader_feature _ _SAMPLE_GI
  145. #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  146. #pragma multi_compile _ DEBUG_DISPLAY
  147. #define SHADERPASS SHADERPASS_UNLIT
  148. #pragma vertex vert
  149. #pragma fragment frag
  150. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  151. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  152. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  153. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  154. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  155. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  156. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  157. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  158. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  159. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  160. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  161. struct VertexInput
  162. {
  163. float4 vertex : POSITION;
  164. float3 ase_normal : NORMAL;
  165. float4 ase_texcoord : TEXCOORD0;
  166. float4 ase_color : COLOR;
  167. UNITY_VERTEX_INPUT_INSTANCE_ID
  168. };
  169. struct VertexOutput
  170. {
  171. float4 clipPos : SV_POSITION;
  172. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  173. float3 worldPos : TEXCOORD0;
  174. #endif
  175. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  176. float4 shadowCoord : TEXCOORD1;
  177. #endif
  178. #ifdef ASE_FOG
  179. float fogFactor : TEXCOORD2;
  180. #endif
  181. float4 ase_texcoord3 : TEXCOORD3;
  182. float4 ase_color : COLOR;
  183. UNITY_VERTEX_INPUT_INSTANCE_ID
  184. UNITY_VERTEX_OUTPUT_STEREO
  185. };
  186. CBUFFER_START(UnityPerMaterial)
  187. float4 _MainTexChannel;
  188. float4 _Color;
  189. float _MainTexRotation;
  190. float _Intensity;
  191. float _ca;
  192. #ifdef TESSELLATION_ON
  193. float _TessPhongStrength;
  194. float _TessValue;
  195. float _TessMin;
  196. float _TessMax;
  197. float _TessEdgeLength;
  198. float _TessMaxDisp;
  199. #endif
  200. CBUFFER_END
  201. sampler2D _MainTex;
  202. VertexOutput VertexFunction ( VertexInput v )
  203. {
  204. VertexOutput o = (VertexOutput)0;
  205. UNITY_SETUP_INSTANCE_ID(v);
  206. UNITY_TRANSFER_INSTANCE_ID(v, o);
  207. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  208. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  209. o.ase_color = v.ase_color;
  210. //setting value to unused interpolator channels and avoid initialization warnings
  211. o.ase_texcoord3.zw = 0;
  212. #ifdef ASE_ABSOLUTE_VERTEX_POS
  213. float3 defaultVertexValue = v.vertex.xyz;
  214. #else
  215. float3 defaultVertexValue = float3(0, 0, 0);
  216. #endif
  217. float3 vertexValue = defaultVertexValue;
  218. #ifdef ASE_ABSOLUTE_VERTEX_POS
  219. v.vertex.xyz = vertexValue;
  220. #else
  221. v.vertex.xyz += vertexValue;
  222. #endif
  223. v.ase_normal = v.ase_normal;
  224. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  225. float4 positionCS = TransformWorldToHClip( positionWS );
  226. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  227. o.worldPos = positionWS;
  228. #endif
  229. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  230. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  231. vertexInput.positionWS = positionWS;
  232. vertexInput.positionCS = positionCS;
  233. o.shadowCoord = GetShadowCoord( vertexInput );
  234. #endif
  235. #ifdef ASE_FOG
  236. o.fogFactor = ComputeFogFactor( positionCS.z );
  237. #endif
  238. o.clipPos = positionCS;
  239. return o;
  240. }
  241. #if defined(TESSELLATION_ON)
  242. struct VertexControl
  243. {
  244. float4 vertex : INTERNALTESSPOS;
  245. float3 ase_normal : NORMAL;
  246. float4 ase_texcoord : TEXCOORD0;
  247. float4 ase_color : COLOR;
  248. UNITY_VERTEX_INPUT_INSTANCE_ID
  249. };
  250. struct TessellationFactors
  251. {
  252. float edge[3] : SV_TessFactor;
  253. float inside : SV_InsideTessFactor;
  254. };
  255. VertexControl vert ( VertexInput v )
  256. {
  257. VertexControl o;
  258. UNITY_SETUP_INSTANCE_ID(v);
  259. UNITY_TRANSFER_INSTANCE_ID(v, o);
  260. o.vertex = v.vertex;
  261. o.ase_normal = v.ase_normal;
  262. o.ase_texcoord = v.ase_texcoord;
  263. o.ase_color = v.ase_color;
  264. return o;
  265. }
  266. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  267. {
  268. TessellationFactors o;
  269. float4 tf = 1;
  270. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  271. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  272. #if defined(ASE_FIXED_TESSELLATION)
  273. tf = FixedTess( tessValue );
  274. #elif defined(ASE_DISTANCE_TESSELLATION)
  275. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  276. #elif defined(ASE_LENGTH_TESSELLATION)
  277. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  278. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  279. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  280. #endif
  281. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  282. return o;
  283. }
  284. [domain("tri")]
  285. [partitioning("fractional_odd")]
  286. [outputtopology("triangle_cw")]
  287. [patchconstantfunc("TessellationFunction")]
  288. [outputcontrolpoints(3)]
  289. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  290. {
  291. return patch[id];
  292. }
  293. [domain("tri")]
  294. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  295. {
  296. VertexInput o = (VertexInput) 0;
  297. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  298. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  299. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  300. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  301. #if defined(ASE_PHONG_TESSELLATION)
  302. float3 pp[3];
  303. for (int i = 0; i < 3; ++i)
  304. 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));
  305. float phongStrength = _TessPhongStrength;
  306. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  307. #endif
  308. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  309. return VertexFunction(o);
  310. }
  311. #else
  312. VertexOutput vert ( VertexInput v )
  313. {
  314. return VertexFunction( v );
  315. }
  316. #endif
  317. half4 frag ( VertexOutput IN ) : SV_Target
  318. {
  319. UNITY_SETUP_INSTANCE_ID( IN );
  320. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  321. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  322. float3 WorldPosition = IN.worldPos;
  323. #endif
  324. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  325. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  326. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  327. ShadowCoords = IN.shadowCoord;
  328. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  329. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  330. #endif
  331. #endif
  332. float cos25 = cos( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  333. float sin25 = sin( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  334. float2 rotator25 = mul( IN.ase_texcoord3.xy - float2( 0.5,0.5 ) , float2x2( cos25 , -sin25 , sin25 , cos25 )) + float2( 0.5,0.5 );
  335. float4 break18 = ( tex2D( _MainTex, rotator25 ) * _MainTexChannel );
  336. float clampResult20 = clamp( ( break18.r + break18.g + break18.b + break18.a ) , 0.0 , 1.0 );
  337. float3 BakedAlbedo = 0;
  338. float3 BakedEmission = 0;
  339. float3 Color = ( clampResult20 * IN.ase_color * _Color * _Intensity * _ca ).rgb;
  340. float Alpha = 1;
  341. float AlphaClipThreshold = 0.5;
  342. float AlphaClipThresholdShadow = 0.5;
  343. #ifdef _ALPHATEST_ON
  344. clip( Alpha - AlphaClipThreshold );
  345. #endif
  346. #if defined(_DBUFFER)
  347. ApplyDecalToBaseColor(IN.clipPos, Color);
  348. #endif
  349. #if defined(_ALPHAPREMULTIPLY_ON)
  350. Color *= Alpha;
  351. #endif
  352. #ifdef LOD_FADE_CROSSFADE
  353. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  354. #endif
  355. #ifdef ASE_FOG
  356. Color = MixFog( Color, IN.fogFactor );
  357. #endif
  358. return half4( Color, Alpha );
  359. }
  360. ENDHLSL
  361. }
  362. Pass
  363. {
  364. Name "DepthOnly"
  365. Tags { "LightMode"="DepthOnly" }
  366. ZWrite On
  367. ColorMask 0
  368. AlphaToMask Off
  369. HLSLPROGRAM
  370. #pragma multi_compile_instancing
  371. #define _RECEIVE_SHADOWS_OFF 1
  372. #define ASE_SRP_VERSION 999999
  373. #pragma vertex vert
  374. #pragma fragment frag
  375. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  376. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  377. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  378. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  379. struct VertexInput
  380. {
  381. float4 vertex : POSITION;
  382. float3 ase_normal : NORMAL;
  383. UNITY_VERTEX_INPUT_INSTANCE_ID
  384. };
  385. struct VertexOutput
  386. {
  387. float4 clipPos : SV_POSITION;
  388. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  389. float3 worldPos : TEXCOORD0;
  390. #endif
  391. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  392. float4 shadowCoord : TEXCOORD1;
  393. #endif
  394. UNITY_VERTEX_INPUT_INSTANCE_ID
  395. UNITY_VERTEX_OUTPUT_STEREO
  396. };
  397. CBUFFER_START(UnityPerMaterial)
  398. float4 _MainTexChannel;
  399. float4 _Color;
  400. float _MainTexRotation;
  401. float _Intensity;
  402. float _ca;
  403. #ifdef TESSELLATION_ON
  404. float _TessPhongStrength;
  405. float _TessValue;
  406. float _TessMin;
  407. float _TessMax;
  408. float _TessEdgeLength;
  409. float _TessMaxDisp;
  410. #endif
  411. CBUFFER_END
  412. VertexOutput VertexFunction( VertexInput v )
  413. {
  414. VertexOutput o = (VertexOutput)0;
  415. UNITY_SETUP_INSTANCE_ID(v);
  416. UNITY_TRANSFER_INSTANCE_ID(v, o);
  417. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  418. #ifdef ASE_ABSOLUTE_VERTEX_POS
  419. float3 defaultVertexValue = v.vertex.xyz;
  420. #else
  421. float3 defaultVertexValue = float3(0, 0, 0);
  422. #endif
  423. float3 vertexValue = defaultVertexValue;
  424. #ifdef ASE_ABSOLUTE_VERTEX_POS
  425. v.vertex.xyz = vertexValue;
  426. #else
  427. v.vertex.xyz += vertexValue;
  428. #endif
  429. v.ase_normal = v.ase_normal;
  430. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  431. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  432. o.worldPos = positionWS;
  433. #endif
  434. o.clipPos = TransformWorldToHClip( positionWS );
  435. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  436. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  437. vertexInput.positionWS = positionWS;
  438. vertexInput.positionCS = o.clipPos;
  439. o.shadowCoord = GetShadowCoord( vertexInput );
  440. #endif
  441. return o;
  442. }
  443. #if defined(TESSELLATION_ON)
  444. struct VertexControl
  445. {
  446. float4 vertex : INTERNALTESSPOS;
  447. float3 ase_normal : NORMAL;
  448. UNITY_VERTEX_INPUT_INSTANCE_ID
  449. };
  450. struct TessellationFactors
  451. {
  452. float edge[3] : SV_TessFactor;
  453. float inside : SV_InsideTessFactor;
  454. };
  455. VertexControl vert ( VertexInput v )
  456. {
  457. VertexControl o;
  458. UNITY_SETUP_INSTANCE_ID(v);
  459. UNITY_TRANSFER_INSTANCE_ID(v, o);
  460. o.vertex = v.vertex;
  461. o.ase_normal = v.ase_normal;
  462. return o;
  463. }
  464. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  465. {
  466. TessellationFactors o;
  467. float4 tf = 1;
  468. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  469. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  470. #if defined(ASE_FIXED_TESSELLATION)
  471. tf = FixedTess( tessValue );
  472. #elif defined(ASE_DISTANCE_TESSELLATION)
  473. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  474. #elif defined(ASE_LENGTH_TESSELLATION)
  475. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  476. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  477. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  478. #endif
  479. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  480. return o;
  481. }
  482. [domain("tri")]
  483. [partitioning("fractional_odd")]
  484. [outputtopology("triangle_cw")]
  485. [patchconstantfunc("TessellationFunction")]
  486. [outputcontrolpoints(3)]
  487. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  488. {
  489. return patch[id];
  490. }
  491. [domain("tri")]
  492. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  493. {
  494. VertexInput o = (VertexInput) 0;
  495. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  496. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  497. #if defined(ASE_PHONG_TESSELLATION)
  498. float3 pp[3];
  499. for (int i = 0; i < 3; ++i)
  500. 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));
  501. float phongStrength = _TessPhongStrength;
  502. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  503. #endif
  504. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  505. return VertexFunction(o);
  506. }
  507. #else
  508. VertexOutput vert ( VertexInput v )
  509. {
  510. return VertexFunction( v );
  511. }
  512. #endif
  513. half4 frag(VertexOutput IN ) : SV_TARGET
  514. {
  515. UNITY_SETUP_INSTANCE_ID(IN);
  516. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  517. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  518. float3 WorldPosition = IN.worldPos;
  519. #endif
  520. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  521. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  522. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  523. ShadowCoords = IN.shadowCoord;
  524. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  525. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  526. #endif
  527. #endif
  528. float Alpha = 1;
  529. float AlphaClipThreshold = 0.5;
  530. #ifdef _ALPHATEST_ON
  531. clip(Alpha - AlphaClipThreshold);
  532. #endif
  533. #ifdef LOD_FADE_CROSSFADE
  534. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  535. #endif
  536. return 0;
  537. }
  538. ENDHLSL
  539. }
  540. Pass
  541. {
  542. Name "Universal2D"
  543. Tags { "LightMode"="Universal2D" }
  544. Blend One One, One OneMinusSrcAlpha
  545. ZWrite Off
  546. ZTest LEqual
  547. Offset 0 , 0
  548. ColorMask RGBA
  549. HLSLPROGRAM
  550. #pragma multi_compile_instancing
  551. #define _RECEIVE_SHADOWS_OFF 1
  552. #define ASE_SRP_VERSION 999999
  553. #pragma multi_compile _ LIGHTMAP_ON
  554. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  555. #pragma shader_feature _ _SAMPLE_GI
  556. #pragma multi_compile _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  557. #pragma multi_compile _ DEBUG_DISPLAY
  558. #define SHADERPASS SHADERPASS_UNLIT
  559. #pragma vertex vert
  560. #pragma fragment frag
  561. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  562. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  563. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  564. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  565. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  566. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  567. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
  568. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  569. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
  570. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
  571. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
  572. struct VertexInput
  573. {
  574. float4 vertex : POSITION;
  575. float3 ase_normal : NORMAL;
  576. float4 ase_texcoord : TEXCOORD0;
  577. float4 ase_color : COLOR;
  578. UNITY_VERTEX_INPUT_INSTANCE_ID
  579. };
  580. struct VertexOutput
  581. {
  582. float4 clipPos : SV_POSITION;
  583. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  584. float3 worldPos : TEXCOORD0;
  585. #endif
  586. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  587. float4 shadowCoord : TEXCOORD1;
  588. #endif
  589. #ifdef ASE_FOG
  590. float fogFactor : TEXCOORD2;
  591. #endif
  592. float4 ase_texcoord3 : TEXCOORD3;
  593. float4 ase_color : COLOR;
  594. UNITY_VERTEX_INPUT_INSTANCE_ID
  595. UNITY_VERTEX_OUTPUT_STEREO
  596. };
  597. CBUFFER_START(UnityPerMaterial)
  598. float4 _MainTexChannel;
  599. float4 _Color;
  600. float _MainTexRotation;
  601. float _Intensity;
  602. float _ca;
  603. #ifdef TESSELLATION_ON
  604. float _TessPhongStrength;
  605. float _TessValue;
  606. float _TessMin;
  607. float _TessMax;
  608. float _TessEdgeLength;
  609. float _TessMaxDisp;
  610. #endif
  611. CBUFFER_END
  612. sampler2D _MainTex;
  613. VertexOutput VertexFunction ( VertexInput v )
  614. {
  615. VertexOutput o = (VertexOutput)0;
  616. UNITY_SETUP_INSTANCE_ID(v);
  617. UNITY_TRANSFER_INSTANCE_ID(v, o);
  618. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  619. o.ase_texcoord3.xy = v.ase_texcoord.xy;
  620. o.ase_color = v.ase_color;
  621. //setting value to unused interpolator channels and avoid initialization warnings
  622. o.ase_texcoord3.zw = 0;
  623. #ifdef ASE_ABSOLUTE_VERTEX_POS
  624. float3 defaultVertexValue = v.vertex.xyz;
  625. #else
  626. float3 defaultVertexValue = float3(0, 0, 0);
  627. #endif
  628. float3 vertexValue = defaultVertexValue;
  629. #ifdef ASE_ABSOLUTE_VERTEX_POS
  630. v.vertex.xyz = vertexValue;
  631. #else
  632. v.vertex.xyz += vertexValue;
  633. #endif
  634. v.ase_normal = v.ase_normal;
  635. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  636. float4 positionCS = TransformWorldToHClip( positionWS );
  637. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  638. o.worldPos = positionWS;
  639. #endif
  640. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR) && defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  641. VertexPositionInputs vertexInput = (VertexPositionInputs)0;
  642. vertexInput.positionWS = positionWS;
  643. vertexInput.positionCS = positionCS;
  644. o.shadowCoord = GetShadowCoord( vertexInput );
  645. #endif
  646. #ifdef ASE_FOG
  647. o.fogFactor = ComputeFogFactor( positionCS.z );
  648. #endif
  649. o.clipPos = positionCS;
  650. return o;
  651. }
  652. #if defined(TESSELLATION_ON)
  653. struct VertexControl
  654. {
  655. float4 vertex : INTERNALTESSPOS;
  656. float3 ase_normal : NORMAL;
  657. float4 ase_texcoord : TEXCOORD0;
  658. float4 ase_color : COLOR;
  659. UNITY_VERTEX_INPUT_INSTANCE_ID
  660. };
  661. struct TessellationFactors
  662. {
  663. float edge[3] : SV_TessFactor;
  664. float inside : SV_InsideTessFactor;
  665. };
  666. VertexControl vert ( VertexInput v )
  667. {
  668. VertexControl o;
  669. UNITY_SETUP_INSTANCE_ID(v);
  670. UNITY_TRANSFER_INSTANCE_ID(v, o);
  671. o.vertex = v.vertex;
  672. o.ase_normal = v.ase_normal;
  673. o.ase_texcoord = v.ase_texcoord;
  674. o.ase_color = v.ase_color;
  675. return o;
  676. }
  677. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  678. {
  679. TessellationFactors o;
  680. float4 tf = 1;
  681. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  682. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  683. #if defined(ASE_FIXED_TESSELLATION)
  684. tf = FixedTess( tessValue );
  685. #elif defined(ASE_DISTANCE_TESSELLATION)
  686. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  687. #elif defined(ASE_LENGTH_TESSELLATION)
  688. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  689. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  690. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  691. #endif
  692. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  693. return o;
  694. }
  695. [domain("tri")]
  696. [partitioning("fractional_odd")]
  697. [outputtopology("triangle_cw")]
  698. [patchconstantfunc("TessellationFunction")]
  699. [outputcontrolpoints(3)]
  700. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  701. {
  702. return patch[id];
  703. }
  704. [domain("tri")]
  705. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  706. {
  707. VertexInput o = (VertexInput) 0;
  708. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  709. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  710. o.ase_texcoord = patch[0].ase_texcoord * bary.x + patch[1].ase_texcoord * bary.y + patch[2].ase_texcoord * bary.z;
  711. o.ase_color = patch[0].ase_color * bary.x + patch[1].ase_color * bary.y + patch[2].ase_color * bary.z;
  712. #if defined(ASE_PHONG_TESSELLATION)
  713. float3 pp[3];
  714. for (int i = 0; i < 3; ++i)
  715. 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));
  716. float phongStrength = _TessPhongStrength;
  717. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  718. #endif
  719. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  720. return VertexFunction(o);
  721. }
  722. #else
  723. VertexOutput vert ( VertexInput v )
  724. {
  725. return VertexFunction( v );
  726. }
  727. #endif
  728. half4 frag ( VertexOutput IN ) : SV_Target
  729. {
  730. UNITY_SETUP_INSTANCE_ID( IN );
  731. UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
  732. #if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
  733. float3 WorldPosition = IN.worldPos;
  734. #endif
  735. float4 ShadowCoords = float4( 0, 0, 0, 0 );
  736. #if defined(ASE_NEEDS_FRAG_SHADOWCOORDS)
  737. #if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
  738. ShadowCoords = IN.shadowCoord;
  739. #elif defined(MAIN_LIGHT_CALCULATE_SHADOWS)
  740. ShadowCoords = TransformWorldToShadowCoord( WorldPosition );
  741. #endif
  742. #endif
  743. float cos25 = cos( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  744. float sin25 = sin( (0.0 + (_MainTexRotation - 0.0) * (( 2.0 * PI ) - 0.0) / (1.0 - 0.0)) );
  745. float2 rotator25 = mul( IN.ase_texcoord3.xy - float2( 0.5,0.5 ) , float2x2( cos25 , -sin25 , sin25 , cos25 )) + float2( 0.5,0.5 );
  746. float4 break18 = ( tex2D( _MainTex, rotator25 ) * _MainTexChannel );
  747. float clampResult20 = clamp( ( break18.r + break18.g + break18.b + break18.a ) , 0.0 , 1.0 );
  748. float3 BakedAlbedo = 0;
  749. float3 BakedEmission = 0;
  750. float3 Color = ( clampResult20 * IN.ase_color * _Color * _Intensity * _ca ).rgb;
  751. float Alpha = 1;
  752. float AlphaClipThreshold = 0.5;
  753. float AlphaClipThresholdShadow = 0.5;
  754. #ifdef _ALPHATEST_ON
  755. clip( Alpha - AlphaClipThreshold );
  756. #endif
  757. #if defined(_DBUFFER)
  758. ApplyDecalToBaseColor(IN.clipPos, Color);
  759. #endif
  760. #if defined(_ALPHAPREMULTIPLY_ON)
  761. Color *= Alpha;
  762. #endif
  763. #ifdef LOD_FADE_CROSSFADE
  764. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  765. #endif
  766. #ifdef ASE_FOG
  767. Color = MixFog( Color, IN.fogFactor );
  768. #endif
  769. return half4( Color, Alpha );
  770. }
  771. ENDHLSL
  772. }
  773. Pass
  774. {
  775. Name "SceneSelectionPass"
  776. Tags { "LightMode"="SceneSelectionPass" }
  777. Cull Off
  778. HLSLPROGRAM
  779. #pragma multi_compile_instancing
  780. #define _RECEIVE_SHADOWS_OFF 1
  781. #define ASE_SRP_VERSION 999999
  782. #pragma only_renderers d3d11 glcore gles gles3
  783. #pragma vertex vert
  784. #pragma fragment frag
  785. #define ATTRIBUTES_NEED_NORMAL
  786. #define ATTRIBUTES_NEED_TANGENT
  787. #define SHADERPASS SHADERPASS_DEPTHONLY
  788. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  789. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  790. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  791. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  792. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  793. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  794. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  795. struct VertexInput
  796. {
  797. float4 vertex : POSITION;
  798. float3 ase_normal : NORMAL;
  799. UNITY_VERTEX_INPUT_INSTANCE_ID
  800. };
  801. struct VertexOutput
  802. {
  803. float4 clipPos : SV_POSITION;
  804. UNITY_VERTEX_INPUT_INSTANCE_ID
  805. UNITY_VERTEX_OUTPUT_STEREO
  806. };
  807. CBUFFER_START(UnityPerMaterial)
  808. float4 _MainTexChannel;
  809. float4 _Color;
  810. float _MainTexRotation;
  811. float _Intensity;
  812. float _ca;
  813. #ifdef TESSELLATION_ON
  814. float _TessPhongStrength;
  815. float _TessValue;
  816. float _TessMin;
  817. float _TessMax;
  818. float _TessEdgeLength;
  819. float _TessMaxDisp;
  820. #endif
  821. CBUFFER_END
  822. int _ObjectId;
  823. int _PassValue;
  824. struct SurfaceDescription
  825. {
  826. float Alpha;
  827. float AlphaClipThreshold;
  828. };
  829. VertexOutput VertexFunction(VertexInput v )
  830. {
  831. VertexOutput o;
  832. ZERO_INITIALIZE(VertexOutput, o);
  833. UNITY_SETUP_INSTANCE_ID(v);
  834. UNITY_TRANSFER_INSTANCE_ID(v, o);
  835. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  836. #ifdef ASE_ABSOLUTE_VERTEX_POS
  837. float3 defaultVertexValue = v.vertex.xyz;
  838. #else
  839. float3 defaultVertexValue = float3(0, 0, 0);
  840. #endif
  841. float3 vertexValue = defaultVertexValue;
  842. #ifdef ASE_ABSOLUTE_VERTEX_POS
  843. v.vertex.xyz = vertexValue;
  844. #else
  845. v.vertex.xyz += vertexValue;
  846. #endif
  847. v.ase_normal = v.ase_normal;
  848. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  849. o.clipPos = TransformWorldToHClip(positionWS);
  850. return o;
  851. }
  852. #if defined(TESSELLATION_ON)
  853. struct VertexControl
  854. {
  855. float4 vertex : INTERNALTESSPOS;
  856. float3 ase_normal : NORMAL;
  857. UNITY_VERTEX_INPUT_INSTANCE_ID
  858. };
  859. struct TessellationFactors
  860. {
  861. float edge[3] : SV_TessFactor;
  862. float inside : SV_InsideTessFactor;
  863. };
  864. VertexControl vert ( VertexInput v )
  865. {
  866. VertexControl o;
  867. UNITY_SETUP_INSTANCE_ID(v);
  868. UNITY_TRANSFER_INSTANCE_ID(v, o);
  869. o.vertex = v.vertex;
  870. o.ase_normal = v.ase_normal;
  871. return o;
  872. }
  873. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  874. {
  875. TessellationFactors o;
  876. float4 tf = 1;
  877. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  878. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  879. #if defined(ASE_FIXED_TESSELLATION)
  880. tf = FixedTess( tessValue );
  881. #elif defined(ASE_DISTANCE_TESSELLATION)
  882. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  883. #elif defined(ASE_LENGTH_TESSELLATION)
  884. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  885. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  886. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  887. #endif
  888. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  889. return o;
  890. }
  891. [domain("tri")]
  892. [partitioning("fractional_odd")]
  893. [outputtopology("triangle_cw")]
  894. [patchconstantfunc("TessellationFunction")]
  895. [outputcontrolpoints(3)]
  896. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  897. {
  898. return patch[id];
  899. }
  900. [domain("tri")]
  901. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  902. {
  903. VertexInput o = (VertexInput) 0;
  904. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  905. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  906. #if defined(ASE_PHONG_TESSELLATION)
  907. float3 pp[3];
  908. for (int i = 0; i < 3; ++i)
  909. 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));
  910. float phongStrength = _TessPhongStrength;
  911. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  912. #endif
  913. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  914. return VertexFunction(o);
  915. }
  916. #else
  917. VertexOutput vert ( VertexInput v )
  918. {
  919. return VertexFunction( v );
  920. }
  921. #endif
  922. half4 frag(VertexOutput IN ) : SV_TARGET
  923. {
  924. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  925. surfaceDescription.Alpha = 1;
  926. surfaceDescription.AlphaClipThreshold = 0.5;
  927. #if _ALPHATEST_ON
  928. float alphaClipThreshold = 0.01f;
  929. #if ALPHA_CLIP_THRESHOLD
  930. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  931. #endif
  932. clip(surfaceDescription.Alpha - alphaClipThreshold);
  933. #endif
  934. half4 outColor = half4(_ObjectId, _PassValue, 1.0, 1.0);
  935. return outColor;
  936. }
  937. ENDHLSL
  938. }
  939. Pass
  940. {
  941. Name "ScenePickingPass"
  942. Tags { "LightMode"="Picking" }
  943. HLSLPROGRAM
  944. #pragma multi_compile_instancing
  945. #define _RECEIVE_SHADOWS_OFF 1
  946. #define ASE_SRP_VERSION 999999
  947. #pragma only_renderers d3d11 glcore gles gles3
  948. #pragma vertex vert
  949. #pragma fragment frag
  950. #define ATTRIBUTES_NEED_NORMAL
  951. #define ATTRIBUTES_NEED_TANGENT
  952. #define SHADERPASS SHADERPASS_DEPTHONLY
  953. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  954. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  955. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  956. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  957. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  958. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  959. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  960. struct VertexInput
  961. {
  962. float4 vertex : POSITION;
  963. float3 ase_normal : NORMAL;
  964. UNITY_VERTEX_INPUT_INSTANCE_ID
  965. };
  966. struct VertexOutput
  967. {
  968. float4 clipPos : SV_POSITION;
  969. UNITY_VERTEX_INPUT_INSTANCE_ID
  970. UNITY_VERTEX_OUTPUT_STEREO
  971. };
  972. CBUFFER_START(UnityPerMaterial)
  973. float4 _MainTexChannel;
  974. float4 _Color;
  975. float _MainTexRotation;
  976. float _Intensity;
  977. float _ca;
  978. #ifdef TESSELLATION_ON
  979. float _TessPhongStrength;
  980. float _TessValue;
  981. float _TessMin;
  982. float _TessMax;
  983. float _TessEdgeLength;
  984. float _TessMaxDisp;
  985. #endif
  986. CBUFFER_END
  987. float4 _SelectionID;
  988. struct SurfaceDescription
  989. {
  990. float Alpha;
  991. float AlphaClipThreshold;
  992. };
  993. VertexOutput VertexFunction(VertexInput v )
  994. {
  995. VertexOutput o;
  996. ZERO_INITIALIZE(VertexOutput, o);
  997. UNITY_SETUP_INSTANCE_ID(v);
  998. UNITY_TRANSFER_INSTANCE_ID(v, o);
  999. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1000. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1001. float3 defaultVertexValue = v.vertex.xyz;
  1002. #else
  1003. float3 defaultVertexValue = float3(0, 0, 0);
  1004. #endif
  1005. float3 vertexValue = defaultVertexValue;
  1006. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1007. v.vertex.xyz = vertexValue;
  1008. #else
  1009. v.vertex.xyz += vertexValue;
  1010. #endif
  1011. v.ase_normal = v.ase_normal;
  1012. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1013. o.clipPos = TransformWorldToHClip(positionWS);
  1014. return o;
  1015. }
  1016. #if defined(TESSELLATION_ON)
  1017. struct VertexControl
  1018. {
  1019. float4 vertex : INTERNALTESSPOS;
  1020. float3 ase_normal : NORMAL;
  1021. UNITY_VERTEX_INPUT_INSTANCE_ID
  1022. };
  1023. struct TessellationFactors
  1024. {
  1025. float edge[3] : SV_TessFactor;
  1026. float inside : SV_InsideTessFactor;
  1027. };
  1028. VertexControl vert ( VertexInput v )
  1029. {
  1030. VertexControl o;
  1031. UNITY_SETUP_INSTANCE_ID(v);
  1032. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1033. o.vertex = v.vertex;
  1034. o.ase_normal = v.ase_normal;
  1035. return o;
  1036. }
  1037. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1038. {
  1039. TessellationFactors o;
  1040. float4 tf = 1;
  1041. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1042. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1043. #if defined(ASE_FIXED_TESSELLATION)
  1044. tf = FixedTess( tessValue );
  1045. #elif defined(ASE_DISTANCE_TESSELLATION)
  1046. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1047. #elif defined(ASE_LENGTH_TESSELLATION)
  1048. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1049. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1050. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1051. #endif
  1052. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1053. return o;
  1054. }
  1055. [domain("tri")]
  1056. [partitioning("fractional_odd")]
  1057. [outputtopology("triangle_cw")]
  1058. [patchconstantfunc("TessellationFunction")]
  1059. [outputcontrolpoints(3)]
  1060. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1061. {
  1062. return patch[id];
  1063. }
  1064. [domain("tri")]
  1065. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1066. {
  1067. VertexInput o = (VertexInput) 0;
  1068. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1069. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1070. #if defined(ASE_PHONG_TESSELLATION)
  1071. float3 pp[3];
  1072. for (int i = 0; i < 3; ++i)
  1073. 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));
  1074. float phongStrength = _TessPhongStrength;
  1075. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1076. #endif
  1077. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1078. return VertexFunction(o);
  1079. }
  1080. #else
  1081. VertexOutput vert ( VertexInput v )
  1082. {
  1083. return VertexFunction( v );
  1084. }
  1085. #endif
  1086. half4 frag(VertexOutput IN ) : SV_TARGET
  1087. {
  1088. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1089. surfaceDescription.Alpha = 1;
  1090. surfaceDescription.AlphaClipThreshold = 0.5;
  1091. #if _ALPHATEST_ON
  1092. float alphaClipThreshold = 0.01f;
  1093. #if ALPHA_CLIP_THRESHOLD
  1094. alphaClipThreshold = surfaceDescription.AlphaClipThreshold;
  1095. #endif
  1096. clip(surfaceDescription.Alpha - alphaClipThreshold);
  1097. #endif
  1098. half4 outColor = 0;
  1099. outColor = _SelectionID;
  1100. return outColor;
  1101. }
  1102. ENDHLSL
  1103. }
  1104. Pass
  1105. {
  1106. Name "DepthNormals"
  1107. Tags { "LightMode"="DepthNormalsOnly" }
  1108. ZTest LEqual
  1109. ZWrite On
  1110. HLSLPROGRAM
  1111. #pragma multi_compile_instancing
  1112. #define _RECEIVE_SHADOWS_OFF 1
  1113. #define ASE_SRP_VERSION 999999
  1114. #pragma only_renderers d3d11 glcore gles gles3
  1115. #pragma multi_compile_fog
  1116. #pragma instancing_options renderinglayer
  1117. #pragma vertex vert
  1118. #pragma fragment frag
  1119. #define ATTRIBUTES_NEED_NORMAL
  1120. #define ATTRIBUTES_NEED_TANGENT
  1121. #define VARYINGS_NEED_NORMAL_WS
  1122. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1123. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1124. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1125. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1126. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1127. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1128. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1129. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1130. struct VertexInput
  1131. {
  1132. float4 vertex : POSITION;
  1133. float3 ase_normal : NORMAL;
  1134. UNITY_VERTEX_INPUT_INSTANCE_ID
  1135. };
  1136. struct VertexOutput
  1137. {
  1138. float4 clipPos : SV_POSITION;
  1139. float3 normalWS : TEXCOORD0;
  1140. UNITY_VERTEX_INPUT_INSTANCE_ID
  1141. UNITY_VERTEX_OUTPUT_STEREO
  1142. };
  1143. CBUFFER_START(UnityPerMaterial)
  1144. float4 _MainTexChannel;
  1145. float4 _Color;
  1146. float _MainTexRotation;
  1147. float _Intensity;
  1148. float _ca;
  1149. #ifdef TESSELLATION_ON
  1150. float _TessPhongStrength;
  1151. float _TessValue;
  1152. float _TessMin;
  1153. float _TessMax;
  1154. float _TessEdgeLength;
  1155. float _TessMaxDisp;
  1156. #endif
  1157. CBUFFER_END
  1158. struct SurfaceDescription
  1159. {
  1160. float Alpha;
  1161. float AlphaClipThreshold;
  1162. };
  1163. VertexOutput VertexFunction(VertexInput v )
  1164. {
  1165. VertexOutput o;
  1166. ZERO_INITIALIZE(VertexOutput, o);
  1167. UNITY_SETUP_INSTANCE_ID(v);
  1168. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1169. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1170. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1171. float3 defaultVertexValue = v.vertex.xyz;
  1172. #else
  1173. float3 defaultVertexValue = float3(0, 0, 0);
  1174. #endif
  1175. float3 vertexValue = defaultVertexValue;
  1176. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1177. v.vertex.xyz = vertexValue;
  1178. #else
  1179. v.vertex.xyz += vertexValue;
  1180. #endif
  1181. v.ase_normal = v.ase_normal;
  1182. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1183. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1184. o.clipPos = TransformWorldToHClip(positionWS);
  1185. o.normalWS.xyz = normalWS;
  1186. return o;
  1187. }
  1188. #if defined(TESSELLATION_ON)
  1189. struct VertexControl
  1190. {
  1191. float4 vertex : INTERNALTESSPOS;
  1192. float3 ase_normal : NORMAL;
  1193. UNITY_VERTEX_INPUT_INSTANCE_ID
  1194. };
  1195. struct TessellationFactors
  1196. {
  1197. float edge[3] : SV_TessFactor;
  1198. float inside : SV_InsideTessFactor;
  1199. };
  1200. VertexControl vert ( VertexInput v )
  1201. {
  1202. VertexControl o;
  1203. UNITY_SETUP_INSTANCE_ID(v);
  1204. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1205. o.vertex = v.vertex;
  1206. o.ase_normal = v.ase_normal;
  1207. return o;
  1208. }
  1209. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1210. {
  1211. TessellationFactors o;
  1212. float4 tf = 1;
  1213. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1214. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1215. #if defined(ASE_FIXED_TESSELLATION)
  1216. tf = FixedTess( tessValue );
  1217. #elif defined(ASE_DISTANCE_TESSELLATION)
  1218. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1219. #elif defined(ASE_LENGTH_TESSELLATION)
  1220. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1221. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1222. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1223. #endif
  1224. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1225. return o;
  1226. }
  1227. [domain("tri")]
  1228. [partitioning("fractional_odd")]
  1229. [outputtopology("triangle_cw")]
  1230. [patchconstantfunc("TessellationFunction")]
  1231. [outputcontrolpoints(3)]
  1232. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1233. {
  1234. return patch[id];
  1235. }
  1236. [domain("tri")]
  1237. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1238. {
  1239. VertexInput o = (VertexInput) 0;
  1240. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1241. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1242. #if defined(ASE_PHONG_TESSELLATION)
  1243. float3 pp[3];
  1244. for (int i = 0; i < 3; ++i)
  1245. 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));
  1246. float phongStrength = _TessPhongStrength;
  1247. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1248. #endif
  1249. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1250. return VertexFunction(o);
  1251. }
  1252. #else
  1253. VertexOutput vert ( VertexInput v )
  1254. {
  1255. return VertexFunction( v );
  1256. }
  1257. #endif
  1258. half4 frag(VertexOutput IN ) : SV_TARGET
  1259. {
  1260. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1261. surfaceDescription.Alpha = 1;
  1262. surfaceDescription.AlphaClipThreshold = 0.5;
  1263. #if _ALPHATEST_ON
  1264. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1265. #endif
  1266. #ifdef LOD_FADE_CROSSFADE
  1267. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1268. #endif
  1269. float3 normalWS = IN.normalWS;
  1270. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1271. }
  1272. ENDHLSL
  1273. }
  1274. Pass
  1275. {
  1276. Name "DepthNormalsOnly"
  1277. Tags { "LightMode"="DepthNormalsOnly" }
  1278. ZTest LEqual
  1279. ZWrite On
  1280. HLSLPROGRAM
  1281. #pragma multi_compile_instancing
  1282. #define _RECEIVE_SHADOWS_OFF 1
  1283. #define ASE_SRP_VERSION 999999
  1284. #pragma exclude_renderers glcore gles gles3
  1285. #pragma vertex vert
  1286. #pragma fragment frag
  1287. #define ATTRIBUTES_NEED_NORMAL
  1288. #define ATTRIBUTES_NEED_TANGENT
  1289. #define ATTRIBUTES_NEED_TEXCOORD1
  1290. #define VARYINGS_NEED_NORMAL_WS
  1291. #define VARYINGS_NEED_TANGENT_WS
  1292. #define SHADERPASS SHADERPASS_DEPTHNORMALSONLY
  1293. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
  1294. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
  1295. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
  1296. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
  1297. #include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
  1298. #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
  1299. #include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
  1300. struct VertexInput
  1301. {
  1302. float4 vertex : POSITION;
  1303. float3 ase_normal : NORMAL;
  1304. UNITY_VERTEX_INPUT_INSTANCE_ID
  1305. };
  1306. struct VertexOutput
  1307. {
  1308. float4 clipPos : SV_POSITION;
  1309. float3 normalWS : TEXCOORD0;
  1310. UNITY_VERTEX_INPUT_INSTANCE_ID
  1311. UNITY_VERTEX_OUTPUT_STEREO
  1312. };
  1313. CBUFFER_START(UnityPerMaterial)
  1314. float4 _MainTexChannel;
  1315. float4 _Color;
  1316. float _MainTexRotation;
  1317. float _Intensity;
  1318. float _ca;
  1319. #ifdef TESSELLATION_ON
  1320. float _TessPhongStrength;
  1321. float _TessValue;
  1322. float _TessMin;
  1323. float _TessMax;
  1324. float _TessEdgeLength;
  1325. float _TessMaxDisp;
  1326. #endif
  1327. CBUFFER_END
  1328. struct SurfaceDescription
  1329. {
  1330. float Alpha;
  1331. float AlphaClipThreshold;
  1332. };
  1333. VertexOutput VertexFunction(VertexInput v )
  1334. {
  1335. VertexOutput o;
  1336. ZERO_INITIALIZE(VertexOutput, o);
  1337. UNITY_SETUP_INSTANCE_ID(v);
  1338. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1339. UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
  1340. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1341. float3 defaultVertexValue = v.vertex.xyz;
  1342. #else
  1343. float3 defaultVertexValue = float3(0, 0, 0);
  1344. #endif
  1345. float3 vertexValue = defaultVertexValue;
  1346. #ifdef ASE_ABSOLUTE_VERTEX_POS
  1347. v.vertex.xyz = vertexValue;
  1348. #else
  1349. v.vertex.xyz += vertexValue;
  1350. #endif
  1351. v.ase_normal = v.ase_normal;
  1352. float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
  1353. float3 normalWS = TransformObjectToWorldNormal(v.ase_normal);
  1354. o.clipPos = TransformWorldToHClip(positionWS);
  1355. o.normalWS.xyz = normalWS;
  1356. return o;
  1357. }
  1358. #if defined(TESSELLATION_ON)
  1359. struct VertexControl
  1360. {
  1361. float4 vertex : INTERNALTESSPOS;
  1362. float3 ase_normal : NORMAL;
  1363. UNITY_VERTEX_INPUT_INSTANCE_ID
  1364. };
  1365. struct TessellationFactors
  1366. {
  1367. float edge[3] : SV_TessFactor;
  1368. float inside : SV_InsideTessFactor;
  1369. };
  1370. VertexControl vert ( VertexInput v )
  1371. {
  1372. VertexControl o;
  1373. UNITY_SETUP_INSTANCE_ID(v);
  1374. UNITY_TRANSFER_INSTANCE_ID(v, o);
  1375. o.vertex = v.vertex;
  1376. o.ase_normal = v.ase_normal;
  1377. return o;
  1378. }
  1379. TessellationFactors TessellationFunction (InputPatch<VertexControl,3> v)
  1380. {
  1381. TessellationFactors o;
  1382. float4 tf = 1;
  1383. float tessValue = _TessValue; float tessMin = _TessMin; float tessMax = _TessMax;
  1384. float edgeLength = _TessEdgeLength; float tessMaxDisp = _TessMaxDisp;
  1385. #if defined(ASE_FIXED_TESSELLATION)
  1386. tf = FixedTess( tessValue );
  1387. #elif defined(ASE_DISTANCE_TESSELLATION)
  1388. tf = DistanceBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, tessValue, tessMin, tessMax, GetObjectToWorldMatrix(), _WorldSpaceCameraPos );
  1389. #elif defined(ASE_LENGTH_TESSELLATION)
  1390. tf = EdgeLengthBasedTess(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams );
  1391. #elif defined(ASE_LENGTH_CULL_TESSELLATION)
  1392. tf = EdgeLengthBasedTessCull(v[0].vertex, v[1].vertex, v[2].vertex, edgeLength, tessMaxDisp, GetObjectToWorldMatrix(), _WorldSpaceCameraPos, _ScreenParams, unity_CameraWorldClipPlanes );
  1393. #endif
  1394. o.edge[0] = tf.x; o.edge[1] = tf.y; o.edge[2] = tf.z; o.inside = tf.w;
  1395. return o;
  1396. }
  1397. [domain("tri")]
  1398. [partitioning("fractional_odd")]
  1399. [outputtopology("triangle_cw")]
  1400. [patchconstantfunc("TessellationFunction")]
  1401. [outputcontrolpoints(3)]
  1402. VertexControl HullFunction(InputPatch<VertexControl, 3> patch, uint id : SV_OutputControlPointID)
  1403. {
  1404. return patch[id];
  1405. }
  1406. [domain("tri")]
  1407. VertexOutput DomainFunction(TessellationFactors factors, OutputPatch<VertexControl, 3> patch, float3 bary : SV_DomainLocation)
  1408. {
  1409. VertexInput o = (VertexInput) 0;
  1410. o.vertex = patch[0].vertex * bary.x + patch[1].vertex * bary.y + patch[2].vertex * bary.z;
  1411. o.ase_normal = patch[0].ase_normal * bary.x + patch[1].ase_normal * bary.y + patch[2].ase_normal * bary.z;
  1412. #if defined(ASE_PHONG_TESSELLATION)
  1413. float3 pp[3];
  1414. for (int i = 0; i < 3; ++i)
  1415. 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));
  1416. float phongStrength = _TessPhongStrength;
  1417. o.vertex.xyz = phongStrength * (pp[0]*bary.x + pp[1]*bary.y + pp[2]*bary.z) + (1.0f-phongStrength) * o.vertex.xyz;
  1418. #endif
  1419. UNITY_TRANSFER_INSTANCE_ID(patch[0], o);
  1420. return VertexFunction(o);
  1421. }
  1422. #else
  1423. VertexOutput vert ( VertexInput v )
  1424. {
  1425. return VertexFunction( v );
  1426. }
  1427. #endif
  1428. half4 frag(VertexOutput IN ) : SV_TARGET
  1429. {
  1430. SurfaceDescription surfaceDescription = (SurfaceDescription)0;
  1431. surfaceDescription.Alpha = 1;
  1432. surfaceDescription.AlphaClipThreshold = 0.5;
  1433. #if _ALPHATEST_ON
  1434. clip(surfaceDescription.Alpha - surfaceDescription.AlphaClipThreshold);
  1435. #endif
  1436. #ifdef LOD_FADE_CROSSFADE
  1437. LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
  1438. #endif
  1439. float3 normalWS = IN.normalWS;
  1440. return half4(NormalizeNormalPerPixel(normalWS), 0.0);
  1441. }
  1442. ENDHLSL
  1443. }
  1444. }
  1445. CustomEditor "UnityEditor.ShaderGraphUnlitGUI"
  1446. Fallback "Hidden/InternalErrorShader"
  1447. }
  1448. /*ASEBEGIN
  1449. Version=18935
  1450. -209.9999;124.6667;1575.333;794.3334;1018.547;73.18286;1.283052;True;False
  1451. Node;AmplifyShaderEditor.PiNode;22;-2059.538,-69.38517;Inherit;False;1;0;FLOAT;2;False;1;FLOAT;0
  1452. Node;AmplifyShaderEditor.TFHCRemapNode;24;-1819.537,-239.3852;Inherit;True;5;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;4;FLOAT;1;False;1;FLOAT;0
  1453. Node;AmplifyShaderEditor.RotatorNode;25;-1533.436,-422.9713;Inherit;True;3;0;FLOAT2;0,0;False;1;FLOAT2;0.5,0.5;False;2;FLOAT;0;False;1;FLOAT2;0
  1454. Node;AmplifyShaderEditor.ColorNode;14;-365.1757,388.8043;Inherit;False;Property;_Color;Color;1;1;[HDR];Create;True;0;0;0;False;0;False;1,1,1,1;1,1,1,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1455. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;17;-705.1556,-214.0969;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT4;0,0,0,0;False;1;COLOR;0
  1456. Node;AmplifyShaderEditor.RangedFloatNode;21;-2149.464,-229.4133;Inherit;False;Property;_MainTexRotation;贴图旋转;4;0;Create;False;0;0;0;False;0;False;0;0;0;1;0;1;FLOAT;0
  1457. Node;AmplifyShaderEditor.Vector4Node;16;-1052.143,-114.9548;Inherit;False;Property;_MainTexChannel;通道选择;3;0;Create;False;0;0;0;False;0;False;1,0,0,0;1,0,0,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1458. Node;AmplifyShaderEditor.TexCoordVertexDataNode;23;-1888.537,-452.3852;Inherit;False;0;2;0;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1459. Node;AmplifyShaderEditor.BreakToComponentsNode;18;-551.9884,-222.7139;Inherit;False;COLOR;1;0;COLOR;0,0,0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15
  1460. Node;AmplifyShaderEditor.ClampOpNode;20;-228.7734,-228.5658;Inherit;False;3;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;1;FLOAT;0
  1461. Node;AmplifyShaderEditor.RangedFloatNode;15;-408.007,583.7358;Inherit;False;Property;_Intensity;Intensity;2;0;Create;True;0;0;0;False;0;False;1;0;0;60;0;1;FLOAT;0
  1462. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;11;15.79317,228.2661;Inherit;False;5;5;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;FLOAT;0;False;4;FLOAT;0;False;1;COLOR;0
  1463. Node;AmplifyShaderEditor.RangedFloatNode;26;-258.98,766.7886;Inherit;False;Property;_ca;_ca;5;0;Create;True;0;0;0;False;0;False;1;1;0;0;0;1;FLOAT;0
  1464. Node;AmplifyShaderEditor.SamplerNode;10;-1181.7,-357.9;Inherit;True;Property;_MainTex;MainTex;0;0;Create;True;0;0;0;False;0;False;-1;7211a0f9fb965394c9b04af1d9382b87;7211a0f9fb965394c9b04af1d9382b87;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1465. Node;AmplifyShaderEditor.VertexColorNode;12;-400.4069,196.066;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  1466. Node;AmplifyShaderEditor.SimpleAddOpNode;19;-392.8384,-239.962;Inherit;False;4;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT;0
  1467. 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
  1468. 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
  1469. 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
  1470. 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
  1471. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;1;781.2789,202.7687;Float;False;True;-1;2;UnityEditor.ShaderGraphUnlitGUI;0;3;LT/Add;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;8;d3d9;d3d11;glcore;gles;gles3;metal;vulkan;nomrt;0;False;True;1;1;False;-1;1;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;637813831633152730; Blend;2;637813831651146071;Two Sided;0;637813845495875074;Cast Shadows;0;637813831606789609; Use Shadow Threshold;0;0;Receive Shadows;0;637813831601474036;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
  1472. 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
  1473. 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
  1474. 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
  1475. 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
  1476. 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;1;False;-1;1;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
  1477. WireConnection;24;0;21;0
  1478. WireConnection;24;4;22;0
  1479. WireConnection;25;0;23;0
  1480. WireConnection;25;2;24;0
  1481. WireConnection;17;0;10;0
  1482. WireConnection;17;1;16;0
  1483. WireConnection;18;0;17;0
  1484. WireConnection;20;0;19;0
  1485. WireConnection;11;0;20;0
  1486. WireConnection;11;1;12;0
  1487. WireConnection;11;2;14;0
  1488. WireConnection;11;3;15;0
  1489. WireConnection;11;4;26;0
  1490. WireConnection;10;1;25;0
  1491. WireConnection;19;0;18;0
  1492. WireConnection;19;1;18;1
  1493. WireConnection;19;2;18;2
  1494. WireConnection;19;3;18;3
  1495. WireConnection;1;2;11;0
  1496. ASEEND*/
  1497. //CHKSM=EE3658B85265F03029825D8FC0AE5A77A3E0C212