ComplexLit.shader 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. // Complex Lit is superset of Lit, but provides
  2. // advanced material properties and is always forward rendered.
  3. // It also has higher hardware and shader model requirements.
  4. Shader "Universal Render Pipeline/Complex Lit"
  5. {
  6. Properties
  7. {
  8. // Specular vs Metallic workflow
  9. _WorkflowMode("WorkflowMode", Float) = 1.0
  10. [MainTexture] _BaseMap("Albedo", 2D) = "white" {}
  11. [MainColor] _BaseColor("Color", Color) = (1,1,1,1)
  12. _Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
  13. _Smoothness("Smoothness", Range(0.0, 1.0)) = 0.5
  14. _SmoothnessTextureChannel("Smoothness texture channel", Float) = 0
  15. _Metallic("Metallic", Range(0.0, 1.0)) = 0.0
  16. _MetallicGlossMap("Metallic", 2D) = "white" {}
  17. _SpecColor("Specular", Color) = (0.2, 0.2, 0.2)
  18. _SpecGlossMap("Specular", 2D) = "white" {}
  19. [ToggleOff] _SpecularHighlights("Specular Highlights", Float) = 1.0
  20. [ToggleOff] _EnvironmentReflections("Environment Reflections", Float) = 1.0
  21. _BumpScale("Scale", Float) = 1.0
  22. _BumpMap("Normal Map", 2D) = "bump" {}
  23. _Parallax("Scale", Range(0.005, 0.08)) = 0.005
  24. _ParallaxMap("Height Map", 2D) = "black" {}
  25. _OcclusionStrength("Strength", Range(0.0, 1.0)) = 1.0
  26. _OcclusionMap("Occlusion", 2D) = "white" {}
  27. [HDR] _EmissionColor("Color", Color) = (0,0,0)
  28. _EmissionMap("Emission", 2D) = "white" {}
  29. _DetailMask("Detail Mask", 2D) = "white" {}
  30. _DetailAlbedoMapScale("Scale", Range(0.0, 2.0)) = 1.0
  31. _DetailAlbedoMap("Detail Albedo x2", 2D) = "linearGrey" {}
  32. _DetailNormalMapScale("Scale", Range(0.0, 2.0)) = 1.0
  33. [Normal] _DetailNormalMap("Normal Map", 2D) = "bump" {}
  34. [ToggleUI] _ClearCoat("Clear Coat", Float) = 0.0
  35. _ClearCoatMap("Clear Coat Map", 2D) = "white" {}
  36. _ClearCoatMask("Clear Coat Mask", Range(0.0, 1.0)) = 0.0
  37. _ClearCoatSmoothness("Clear Coat Smoothness", Range(0.0, 1.0)) = 1.0
  38. // Blending state
  39. _Surface("__surface", Float) = 0.0
  40. _Blend("__mode", Float) = 0.0
  41. _Cull("__cull", Float) = 2.0
  42. [ToggleUI] _AlphaClip("__clip", Float) = 0.0
  43. [HideInInspector] _BlendOp("__blendop", Float) = 0.0
  44. [HideInInspector] _SrcBlend("__src", Float) = 1.0
  45. [HideInInspector] _DstBlend("__dst", Float) = 0.0
  46. [HideInInspector] _ZWrite("__zw", Float) = 1.0
  47. [ToggleUI] _ReceiveShadows("Receive Shadows", Float) = 1.0
  48. // Editmode props
  49. _QueueOffset("Queue offset", Float) = 0.0
  50. [HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
  51. [HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
  52. [HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
  53. }
  54. SubShader
  55. {
  56. // Universal Pipeline tag is required. If Universal render pipeline is not set in the graphics settings
  57. // this Subshader will fail. One can add a subshader below or fallback to Standard built-in to make this
  58. // material work with both Universal Render Pipeline and Builtin Unity Pipeline
  59. Tags{"RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" "UniversalMaterialType" = "ComplexLit" "IgnoreProjector" = "True" "ShaderModel"="4.5"}
  60. LOD 300
  61. // ------------------------------------------------------------------
  62. // Forward only pass.
  63. // Acts also as an opaque forward fallback for deferred rendering.
  64. Pass
  65. {
  66. // Lightmode matches the ShaderPassName set in UniversalRenderPipeline.cs. SRPDefaultUnlit and passes with
  67. // no LightMode tag are also rendered by Universal Render Pipeline
  68. Name "ForwardLit"
  69. Tags{"LightMode" = "UniversalForwardOnly"}
  70. Blend[_SrcBlend][_DstBlend]
  71. ZWrite[_ZWrite]
  72. Cull[_Cull]
  73. HLSLPROGRAM
  74. #pragma exclude_renderers gles gles3 glcore
  75. #pragma target 4.5
  76. // -------------------------------------
  77. // Material Keywords
  78. #pragma shader_feature_local _NORMALMAP
  79. #pragma shader_feature_local _PARALLAXMAP
  80. #pragma shader_feature_local _RECEIVE_SHADOWS_OFF
  81. #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
  82. #pragma shader_feature_local_fragment _SURFACE_TYPE_TRANSPARENT
  83. #pragma shader_feature_local_fragment _ALPHATEST_ON
  84. #pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON
  85. #pragma shader_feature_local_fragment _EMISSION
  86. #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP
  87. #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  88. #pragma shader_feature_local_fragment _OCCLUSIONMAP
  89. #pragma shader_feature_local_fragment _ _CLEARCOAT _CLEARCOATMAP
  90. #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF
  91. #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF
  92. #pragma shader_feature_local_fragment _SPECULAR_SETUP
  93. // -------------------------------------
  94. // Universal Pipeline keywords
  95. #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
  96. #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
  97. #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
  98. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
  99. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION
  100. #pragma multi_compile_fragment _ _SHADOWS_SOFT
  101. #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
  102. #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
  103. #pragma multi_compile_fragment _ _DBUFFER_MRT1 _DBUFFER_MRT2 _DBUFFER_MRT3
  104. #pragma multi_compile_fragment _ _LIGHT_LAYERS
  105. #pragma multi_compile_fragment _ _LIGHT_COOKIES
  106. #pragma multi_compile _ _CLUSTERED_RENDERING
  107. // -------------------------------------
  108. // Unity defined keywords
  109. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  110. #pragma multi_compile _ LIGHTMAP_ON
  111. #pragma multi_compile_fog
  112. #pragma multi_compile_fragment _ DEBUG_DISPLAY
  113. //--------------------------------------
  114. // GPU Instancing
  115. #pragma multi_compile_instancing
  116. #pragma instancing_options renderinglayer
  117. #pragma multi_compile _ DOTS_INSTANCING_ON
  118. #pragma vertex LitPassVertex
  119. #pragma fragment LitPassFragment
  120. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  121. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitForwardPass.hlsl"
  122. ENDHLSL
  123. }
  124. Pass
  125. {
  126. Name "ShadowCaster"
  127. Tags{"LightMode" = "ShadowCaster"}
  128. ZWrite On
  129. ZTest LEqual
  130. ColorMask 0
  131. Cull[_Cull]
  132. HLSLPROGRAM
  133. #pragma exclude_renderers gles gles3 glcore
  134. #pragma target 4.5
  135. // -------------------------------------
  136. // Material Keywords
  137. #pragma shader_feature_local_fragment _ALPHATEST_ON
  138. #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  139. //--------------------------------------
  140. // GPU Instancing
  141. #pragma multi_compile_instancing
  142. #pragma multi_compile _ DOTS_INSTANCING_ON
  143. // -------------------------------------
  144. // Universal Pipeline keywords
  145. // This is used during shadow map generation to differentiate between directional and punctual light shadows, as they use different formulas to apply Normal Bias
  146. #pragma multi_compile_vertex _ _CASTING_PUNCTUAL_LIGHT_SHADOW
  147. #pragma vertex ShadowPassVertex
  148. #pragma fragment ShadowPassFragment
  149. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  150. #include "Packages/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl"
  151. ENDHLSL
  152. }
  153. Pass
  154. {
  155. Name "DepthOnly"
  156. Tags{"LightMode" = "DepthOnly"}
  157. ZWrite On
  158. ColorMask 0
  159. Cull[_Cull]
  160. HLSLPROGRAM
  161. #pragma exclude_renderers gles gles3 glcore
  162. #pragma target 4.5
  163. #pragma vertex DepthOnlyVertex
  164. #pragma fragment DepthOnlyFragment
  165. // -------------------------------------
  166. // Material Keywords
  167. #pragma shader_feature_local_fragment _ALPHATEST_ON
  168. #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  169. //--------------------------------------
  170. // GPU Instancing
  171. #pragma multi_compile_instancing
  172. #pragma multi_compile _ DOTS_INSTANCING_ON
  173. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  174. #include "Packages/com.unity.render-pipelines.universal/Shaders/DepthOnlyPass.hlsl"
  175. ENDHLSL
  176. }
  177. // This pass is used when drawing to a _CameraNormalsTexture texture with the forward renderer or the depthNormal prepass with the deferred renderer.
  178. Pass
  179. {
  180. Name "DepthNormalsOnly"
  181. Tags{"LightMode" = "DepthNormalsOnly"}
  182. ZWrite On
  183. Cull[_Cull]
  184. HLSLPROGRAM
  185. #pragma exclude_renderers gles gles3 glcore
  186. #pragma target 4.5
  187. #pragma vertex DepthNormalsVertex
  188. #pragma fragment DepthNormalsFragment
  189. // -------------------------------------
  190. // Material Keywords
  191. #pragma shader_feature_local _NORMALMAP
  192. #pragma shader_feature_local _PARALLAXMAP
  193. #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
  194. #pragma shader_feature_local_fragment _ALPHATEST_ON
  195. #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  196. // -------------------------------------
  197. // Unity defined keywords
  198. #pragma multi_compile_fragment _ _GBUFFER_NORMALS_OCT // forward-only variant
  199. //--------------------------------------
  200. // GPU Instancing
  201. #pragma multi_compile_instancing
  202. #pragma multi_compile _ DOTS_INSTANCING_ON
  203. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  204. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitDepthNormalsPass.hlsl"
  205. ENDHLSL
  206. }
  207. // This pass it not used during regular rendering, only for lightmap baking.
  208. Pass
  209. {
  210. Name "Meta"
  211. Tags{"LightMode" = "Meta"}
  212. Cull Off
  213. HLSLPROGRAM
  214. #pragma exclude_renderers gles gles3 glcore
  215. #pragma target 4.5
  216. #pragma vertex UniversalVertexMeta
  217. #pragma fragment UniversalFragmentMetaLit
  218. #pragma shader_feature_local_fragment _SPECULAR_SETUP
  219. #pragma shader_feature_local_fragment _EMISSION
  220. #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP
  221. #pragma shader_feature_local_fragment _ALPHATEST_ON
  222. #pragma shader_feature_local_fragment _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  223. #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
  224. #pragma shader_feature EDITOR_VISUALIZATION
  225. #pragma shader_feature_local_fragment _SPECGLOSSMAP
  226. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  227. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitMetaPass.hlsl"
  228. ENDHLSL
  229. }
  230. Pass
  231. {
  232. Name "Universal2D"
  233. Tags{ "LightMode" = "Universal2D" }
  234. Blend[_SrcBlend][_DstBlend]
  235. ZWrite[_ZWrite]
  236. Cull[_Cull]
  237. HLSLPROGRAM
  238. #pragma exclude_renderers gles gles3 glcore
  239. #pragma target 4.5
  240. #pragma vertex vert
  241. #pragma fragment frag
  242. #pragma shader_feature_local_fragment _ALPHATEST_ON
  243. #pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON
  244. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  245. #include "Packages/com.unity.render-pipelines.universal/Shaders/Utils/Universal2D.hlsl"
  246. ENDHLSL
  247. }
  248. }
  249. SubShader
  250. {
  251. // Universal Pipeline tag is required. If Universal render pipeline is not set in the graphics settings
  252. // this Subshader will fail. One can add a subshader below or fallback to Standard built-in to make this
  253. // material work with both Universal Render Pipeline and Builtin Unity Pipeline
  254. Tags{"RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" "UniversalMaterialType" = "Lit" "IgnoreProjector" = "True" "ShaderModel"="2.0"}
  255. LOD 300
  256. Pass
  257. {
  258. // Lightmode matches the ShaderPassName set in UniversalRenderPipeline.cs. SRPDefaultUnlit and passes with
  259. // no LightMode tag are also rendered by Universal Render Pipeline
  260. Name "ForwardLit"
  261. Tags{"LightMode" = "UniversalForwardOnly"}
  262. Blend[_SrcBlend][_DstBlend]
  263. ZWrite[_ZWrite]
  264. Cull[_Cull]
  265. HLSLPROGRAM
  266. #pragma only_renderers gles gles3 glcore d3d11
  267. #pragma target 2.0
  268. // -------------------------------------
  269. // Material Keywords
  270. #pragma shader_feature_local _NORMALMAP
  271. #pragma shader_feature_local _PARALLAXMAP
  272. #pragma shader_feature_local _RECEIVE_SHADOWS_OFF
  273. #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
  274. #pragma shader_feature_local_fragment _SURFACE_TYPE_TRANSPARENT
  275. #pragma shader_feature_local_fragment _ALPHATEST_ON
  276. #pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON
  277. #pragma shader_feature_local_fragment _EMISSION
  278. #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP
  279. #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  280. #pragma shader_feature_local_fragment _OCCLUSIONMAP
  281. #pragma shader_feature_local_fragment _ _CLEARCOAT _CLEARCOATMAP
  282. #pragma shader_feature_local_fragment _SPECULARHIGHLIGHTS_OFF
  283. #pragma shader_feature_local_fragment _ENVIRONMENTREFLECTIONS_OFF
  284. #pragma shader_feature_local_fragment _SPECULAR_SETUP
  285. // -------------------------------------
  286. // Universal Pipeline keywords
  287. #pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN
  288. #pragma multi_compile _ _ADDITIONAL_LIGHTS_VERTEX _ADDITIONAL_LIGHTS
  289. #pragma multi_compile_fragment _ _ADDITIONAL_LIGHT_SHADOWS
  290. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BLENDING
  291. #pragma multi_compile_fragment _ _REFLECTION_PROBE_BOX_PROJECTION
  292. #pragma multi_compile_fragment _ _SHADOWS_SOFT
  293. #pragma multi_compile _ _MIXED_LIGHTING_SUBTRACTIVE
  294. #pragma multi_compile_fragment _ _SCREEN_SPACE_OCCLUSION
  295. #pragma multi_compile_fragment _ _LIGHT_LAYERS
  296. #pragma multi_compile_fragment _ _LIGHT_COOKIES
  297. #pragma multi_compile _ _CLUSTERED_RENDERING
  298. // -------------------------------------
  299. // Unity defined keywords
  300. #pragma multi_compile _ DIRLIGHTMAP_COMBINED
  301. #pragma multi_compile _ LIGHTMAP_ON
  302. #pragma multi_compile_fog
  303. #pragma multi_compile_fragment _ DEBUG_DISPLAY
  304. //--------------------------------------
  305. // GPU Instancing
  306. #pragma multi_compile_instancing
  307. #pragma instancing_options renderinglayer
  308. #pragma vertex LitPassVertex
  309. #pragma fragment LitPassFragment
  310. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  311. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitForwardPass.hlsl"
  312. ENDHLSL
  313. }
  314. Pass
  315. {
  316. Name "ShadowCaster"
  317. Tags{"LightMode" = "ShadowCaster"}
  318. ZWrite On
  319. ZTest LEqual
  320. ColorMask 0
  321. Cull[_Cull]
  322. HLSLPROGRAM
  323. #pragma only_renderers gles gles3 glcore d3d11
  324. #pragma target 2.0
  325. //--------------------------------------
  326. // GPU Instancing
  327. #pragma multi_compile_instancing
  328. // -------------------------------------
  329. // Material Keywords
  330. #pragma shader_feature_local_fragment _ALPHATEST_ON
  331. #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  332. #pragma vertex ShadowPassVertex
  333. #pragma fragment ShadowPassFragment
  334. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  335. #include "Packages/com.unity.render-pipelines.universal/Shaders/ShadowCasterPass.hlsl"
  336. ENDHLSL
  337. }
  338. Pass
  339. {
  340. Name "DepthOnly"
  341. Tags{"LightMode" = "DepthOnly"}
  342. ZWrite On
  343. ColorMask 0
  344. Cull[_Cull]
  345. HLSLPROGRAM
  346. #pragma only_renderers gles gles3 glcore d3d11
  347. #pragma target 2.0
  348. //--------------------------------------
  349. // GPU Instancing
  350. #pragma multi_compile_instancing
  351. #pragma vertex DepthOnlyVertex
  352. #pragma fragment DepthOnlyFragment
  353. // -------------------------------------
  354. // Material Keywords
  355. #pragma shader_feature_local_fragment _ALPHATEST_ON
  356. #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  357. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  358. #include "Packages/com.unity.render-pipelines.universal/Shaders/DepthOnlyPass.hlsl"
  359. ENDHLSL
  360. }
  361. // This pass is used when drawing to a _CameraNormalsTexture texture
  362. Pass
  363. {
  364. Name "DepthNormals"
  365. Tags{"LightMode" = "DepthNormals"}
  366. ZWrite On
  367. Cull[_Cull]
  368. HLSLPROGRAM
  369. #pragma only_renderers gles gles3 glcore d3d11
  370. #pragma target 2.0
  371. #pragma vertex DepthNormalsVertex
  372. #pragma fragment DepthNormalsFragment
  373. // -------------------------------------
  374. // Material Keywords
  375. #pragma shader_feature_local _NORMALMAP
  376. #pragma shader_feature_local _PARALLAXMAP
  377. #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
  378. #pragma shader_feature_local_fragment _ALPHATEST_ON
  379. #pragma shader_feature_local_fragment _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  380. //--------------------------------------
  381. // GPU Instancing
  382. #pragma multi_compile_instancing
  383. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  384. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitDepthNormalsPass.hlsl"
  385. ENDHLSL
  386. }
  387. // This pass it not used during regular rendering, only for lightmap baking.
  388. Pass
  389. {
  390. Name "Meta"
  391. Tags{"LightMode" = "Meta"}
  392. Cull Off
  393. HLSLPROGRAM
  394. #pragma only_renderers gles gles3 glcore d3d11
  395. #pragma target 2.0
  396. #pragma vertex UniversalVertexMeta
  397. #pragma fragment UniversalFragmentMetaLit
  398. #pragma shader_feature_local_fragment _SPECULAR_SETUP
  399. #pragma shader_feature_local_fragment _EMISSION
  400. #pragma shader_feature_local_fragment _METALLICSPECGLOSSMAP
  401. #pragma shader_feature_local_fragment _ALPHATEST_ON
  402. #pragma shader_feature_local_fragment _ _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
  403. #pragma shader_feature_local _ _DETAIL_MULX2 _DETAIL_SCALED
  404. #pragma shader_feature_local_fragment _SPECGLOSSMAP
  405. #pragma shader_feature EDITOR_VISUALIZATION
  406. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  407. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitMetaPass.hlsl"
  408. ENDHLSL
  409. }
  410. Pass
  411. {
  412. Name "Universal2D"
  413. Tags{ "LightMode" = "Universal2D" }
  414. Blend[_SrcBlend][_DstBlend]
  415. ZWrite[_ZWrite]
  416. Cull[_Cull]
  417. HLSLPROGRAM
  418. #pragma only_renderers gles gles3 glcore d3d11
  419. #pragma target 2.0
  420. #pragma vertex vert
  421. #pragma fragment frag
  422. #pragma shader_feature_local_fragment _ALPHATEST_ON
  423. #pragma shader_feature_local_fragment _ALPHAPREMULTIPLY_ON
  424. #include "Packages/com.unity.render-pipelines.universal/Shaders/LitInput.hlsl"
  425. #include "Packages/com.unity.render-pipelines.universal/Shaders/Utils/Universal2D.hlsl"
  426. ENDHLSL
  427. }
  428. }
  429. //////////////////////////////////////////////////////
  430. FallBack "Hidden/Universal Render Pipeline/Lit"
  431. FallBack "Hidden/Universal Render Pipeline/FallbackError"
  432. CustomEditor "UnityEditor.Rendering.Universal.ShaderGUI.LitShader"
  433. }