jme3_shadernodes.html 75 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1">
  6. <title>Shader Nodes :: jMonkeyEngine Docs</title>
  7. <link rel="canonical" href="https://wiki.jmonkeyengine.org/docs/3.8/core/shader/jme3_shadernodes.html">
  8. <link rel="prev" href="jme3_shaders.html">
  9. <link rel="next" href="shader_video_tutorials.html">
  10. <meta name="generator" content="Antora 3.0.1">
  11. <link rel="stylesheet" href="../../../../_/css/site.css">
  12. <meta property="og:image" content="https://wiki.jmonkeyengine.org/_/img/iconx128.png">
  13. <meta property="og:description" content="Shader Nodes">
  14. <meta property="og:title" content="jMonkeyEngine Docs">
  15. <link rel="stylesheet" href="../../../../_/css/site-extra.css">
  16. <link rel="stylesheet" href="../../../../_/css/vendor/docsearch.min.css">
  17. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css -->
  18. <link rel="icon" href="../../../../_/img/favicon.ico" type="image/x-icon">
  19. </head>
  20. <body class="article">
  21. <header class="header">
  22. <nav class="navbar">
  23. <div class="navbar-brand">
  24. <a class="navbar-item" href="https://wiki.jmonkeyengine.org">
  25. <img alt="" src="../../../../_/img/jme-logo.png" height="32" type="image/x-icon">
  26. </a>
  27. <div class="navbar-item hide-for-print">
  28. <input id="search-input" type="text" placeholder="Search docs">
  29. </div>
  30. <button class="navbar-burger" data-target="topbar-nav">
  31. <span></span>
  32. <span></span>
  33. <span></span>
  34. </button>
  35. </div>
  36. <div id="topbar-nav" class="navbar-menu">
  37. <div class="navbar-end">
  38. <div class="navbar-item theme-switch-wrapper">
  39. <label class="theme-switch" for="checkbox">
  40. <input type="checkbox" id="checkbox" />
  41. <div class="slider round"></div>
  42. </label>
  43. </div>
  44. <a class="navbar-item" href="https://github.com/jmonkeyengine/wiki">Github</a>
  45. </div>
  46. </div>
  47. </nav>
  48. </header>
  49. <div class="body">
  50. <div class="nav-container" data-component="docs" data-version="3.8">
  51. <aside class="nav">
  52. <div class="panels">
  53. <div class="nav-panel-menu is-active" data-panel="menu">
  54. <nav class="nav-menu">
  55. <h3 class="title"><a href="../../documentation.html">JME</a></h3>
  56. <ul class="nav-list">
  57. <li class="nav-item" data-depth="0">
  58. <ul class="nav-list">
  59. <li class="nav-item" data-depth="1">
  60. <a class="nav-link" href="../../documentation.html">Getting Started</a>
  61. </li>
  62. <li class="nav-item" data-depth="1">
  63. <a class="nav-link" href="https://javadoc.jmonkeyengine.org/v3.4.1-stable">JavaDoc</a>
  64. </li>
  65. <li class="nav-item" data-depth="1">
  66. <a class="nav-link" href="../../release.html">Release Guide</a>
  67. </li>
  68. </ul>
  69. </li>
  70. <li class="nav-item" data-depth="0">
  71. <ul class="nav-list">
  72. <li class="nav-item" data-depth="1">
  73. <button class="nav-item-toggle"></button>
  74. <a class="nav-link" href="../../tutorials/beginner/beginner.html">Beginner Tutorials</a>
  75. <ul class="nav-list">
  76. <li class="nav-item" data-depth="2">
  77. <a class="nav-link" href="../../tutorials/beginner/hello_simpleapplication.html">Hello SimpleApplication</a>
  78. </li>
  79. <li class="nav-item" data-depth="2">
  80. <a class="nav-link" href="../../tutorials/beginner/hello_node.html">Hello Node</a>
  81. </li>
  82. <li class="nav-item" data-depth="2">
  83. <a class="nav-link" href="../../tutorials/beginner/hello_asset.html">Hello Asset</a>
  84. </li>
  85. <li class="nav-item" data-depth="2">
  86. <a class="nav-link" href="../../tutorials/beginner/hello_main_event_loop.html">Hello Update Loop</a>
  87. </li>
  88. <li class="nav-item" data-depth="2">
  89. <a class="nav-link" href="../../tutorials/beginner/hello_input_system.html">Hello Input System</a>
  90. </li>
  91. <li class="nav-item" data-depth="2">
  92. <a class="nav-link" href="../../tutorials/beginner/hello_material.html">Hello Material</a>
  93. </li>
  94. <li class="nav-item" data-depth="2">
  95. <a class="nav-link" href="../../tutorials/beginner/hello_animation.html">Hello Animation</a>
  96. </li>
  97. <li class="nav-item" data-depth="2">
  98. <a class="nav-link" href="../../tutorials/beginner/hello_picking.html">Hello Picking</a>
  99. </li>
  100. <li class="nav-item" data-depth="2">
  101. <a class="nav-link" href="../../tutorials/beginner/hello_collision.html">Hello Collision</a>
  102. </li>
  103. <li class="nav-item" data-depth="2">
  104. <a class="nav-link" href="../../tutorials/beginner/hello_terrain.html">Hello Terrain</a>
  105. </li>
  106. <li class="nav-item" data-depth="2">
  107. <a class="nav-link" href="../../tutorials/beginner/hello_audio.html">Hello Audio</a>
  108. </li>
  109. <li class="nav-item" data-depth="2">
  110. <a class="nav-link" href="../../tutorials/beginner/hello_effects.html">Hello Effects</a>
  111. </li>
  112. <li class="nav-item" data-depth="2">
  113. <a class="nav-link" href="../../tutorials/beginner/hello_physics.html">Hello Physics</a>
  114. </li>
  115. </ul>
  116. </li>
  117. <li class="nav-item" data-depth="1">
  118. <button class="nav-item-toggle"></button>
  119. <span class="nav-text">Key Concepts</span>
  120. <ul class="nav-list">
  121. <li class="nav-item" data-depth="2">
  122. <a class="nav-link" href="../../tutorials/concepts/best_practices.html">Best Practices</a>
  123. </li>
  124. <li class="nav-item" data-depth="2">
  125. <a class="nav-link" href="../../tutorials/concepts/optimization.html">Optimization</a>
  126. </li>
  127. <li class="nav-item" data-depth="2">
  128. <a class="nav-link" href="../../tutorials/concepts/faq.html">Frequently Asked Questions</a>
  129. </li>
  130. <li class="nav-item" data-depth="2">
  131. <a class="nav-link" href="../../tutorials/concepts/math_for_dummies.html">Math for Dummies</a>
  132. </li>
  133. <li class="nav-item" data-depth="2">
  134. <a class="nav-link" href="../../tutorials/concepts/math.html">Math overview</a>
  135. </li>
  136. <li class="nav-item" data-depth="2">
  137. <a class="nav-link" href="../../tutorials/concepts/math_cheet_sheet.html">3D math "cheat sheet"</a>
  138. </li>
  139. <li class="nav-item" data-depth="2">
  140. <a class="nav-link" href="../../tutorials/concepts/rotate.html">3-D Rotation</a>
  141. </li>
  142. <li class="nav-item" data-depth="2">
  143. <a class="nav-link" href="../../tutorials/concepts/math_video_tutorials.html">Math video tutorial series</a>
  144. </li>
  145. <li class="nav-item" data-depth="2">
  146. <a class="nav-link" href="../../tutorials/concepts/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a>
  147. </li>
  148. <li class="nav-item" data-depth="2">
  149. <a class="nav-link" href="../../tutorials/concepts/the_scene_graph.html">The Scene Graph</a>
  150. </li>
  151. <li class="nav-item" data-depth="2">
  152. <a class="nav-link" href="../../tutorials/concepts/scenegraph_for_dummies.html">Scene Graph for Dummies</a>
  153. </li>
  154. <li class="nav-item" data-depth="2">
  155. <a class="nav-link" href="../../tutorials/concepts/terminology.html">3D Graphics Terminology</a>
  156. </li>
  157. <li class="nav-item" data-depth="2">
  158. <a class="nav-link" href="../../tutorials/concepts/transparency_sorting.html">Transparency Sorting</a>
  159. </li>
  160. </ul>
  161. </li>
  162. <li class="nav-item" data-depth="1">
  163. <button class="nav-item-toggle"></button>
  164. <span class="nav-text">Articles and How-to&#8217;s</span>
  165. <ul class="nav-list">
  166. <li class="nav-item" data-depth="2">
  167. <button class="nav-item-toggle"></button>
  168. <span class="nav-text">How to Model</span>
  169. <ul class="nav-list">
  170. <li class="nav-item" data-depth="3">
  171. <a class="nav-link" href="../../tutorials/how-to/modeling/3dsmax/3dsmax.html">3dsmax</a>
  172. </li>
  173. <li class="nav-item" data-depth="3">
  174. <button class="nav-item-toggle"></button>
  175. <a class="nav-link" href="../../tutorials/how-to/modeling/blender/blender.html">Blender</a>
  176. <ul class="nav-list">
  177. <li class="nav-item" data-depth="4">
  178. <a class="nav-link" href="../../tutorials/how-to/modeling/blender/blender_buffer_clearing.html">Buffer Clearing</a>
  179. </li>
  180. <li class="nav-item" data-depth="4">
  181. <a class="nav-link" href="../../tutorials/how-to/modeling/blender/blender_gltf.html">Export as GlTF</a>
  182. </li>
  183. <li class="nav-item" data-depth="4">
  184. <a class="nav-link" href="../../tutorials/how-to/modeling/blender/blender_ogre_export.html">Export as Ogre XML</a>
  185. </li>
  186. <li class="nav-item" data-depth="4">
  187. <a class="nav-link" href="../../tutorials/how-to/modeling/blender/blender_ogre_compatibility.html">Ogre Compatibility</a>
  188. </li>
  189. <li class="nav-item" data-depth="4">
  190. <a class="nav-link" href="../../tutorials/how-to/modeling/blender/makehuman.html">MakeHuman</a>
  191. </li>
  192. <li class="nav-item" data-depth="4">
  193. <a class="nav-link" href="../../tutorials/how-to/modeling/blender/makehuman_blender_ogrexml_toolchain.html">MakeHuman toolchain</a>
  194. </li>
  195. </ul>
  196. </li>
  197. </ul>
  198. </li>
  199. <li class="nav-item" data-depth="2">
  200. <button class="nav-item-toggle"></button>
  201. <span class="nav-text">How to Animate</span>
  202. <ul class="nav-list">
  203. <li class="nav-item" data-depth="3">
  204. <button class="nav-item-toggle"></button>
  205. <span class="nav-text">Mixamo</span>
  206. <ul class="nav-list">
  207. <li class="nav-item" data-depth="4">
  208. <a class="nav-link" href="../../tutorials/how-to/modeling/blender/mixamo.html">Blender Models</a>
  209. </li>
  210. </ul>
  211. </li>
  212. </ul>
  213. </li>
  214. <li class="nav-item" data-depth="2">
  215. <a class="nav-link" href="../../tutorials/how-to/debugging.html">Debugging with Wireframes</a>
  216. </li>
  217. <li class="nav-item" data-depth="2">
  218. <a class="nav-link" href="../../tutorials/how-to/util/free_skymaps.html">How to create free skymaps</a>
  219. </li>
  220. <li class="nav-item" data-depth="2">
  221. <button class="nav-item-toggle"></button>
  222. <span class="nav-text">Java Tips</span>
  223. <ul class="nav-list">
  224. <li class="nav-item" data-depth="3">
  225. <a class="nav-link" href="../../tutorials/how-to/java/localization.html">Localization</a>
  226. </li>
  227. <li class="nav-item" data-depth="3">
  228. <a class="nav-link" href="../../tutorials/how-to/java/swing_canvas.html">Swing Canvas</a>
  229. </li>
  230. <li class="nav-item" data-depth="3">
  231. <a class="nav-link" href="../../tutorials/how-to/java/logging.html">Logging</a>
  232. </li>
  233. <li class="nav-item" data-depth="3">
  234. <a class="nav-link" href="../../tutorials/how-to/java/read_graphic_card_capabilites.html">Read Graphics Capabilities</a>
  235. </li>
  236. </ul>
  237. </li>
  238. <li class="nav-item" data-depth="2">
  239. <button class="nav-item-toggle"></button>
  240. <span class="nav-text">Articles</span>
  241. <ul class="nav-list">
  242. <li class="nav-item" data-depth="3">
  243. <button class="nav-item-toggle"></button>
  244. <span class="nav-text">Physically Based Rendering</span>
  245. <ul class="nav-list">
  246. <li class="nav-item" data-depth="4">
  247. <a class="nav-link" href="../../tutorials/how-to/articles/pbr/pbr_part1.html">PBR – Part one</a>
  248. </li>
  249. <li class="nav-item" data-depth="4">
  250. <a class="nav-link" href="../../tutorials/how-to/articles/pbr/pbr_part2.html">PBR – Part two</a>
  251. </li>
  252. <li class="nav-item" data-depth="4">
  253. <a class="nav-link" href="../../tutorials/how-to/articles/pbr/pbr_part3.html">PBR – Part three</a>
  254. </li>
  255. </ul>
  256. </li>
  257. </ul>
  258. </li>
  259. </ul>
  260. </li>
  261. </ul>
  262. </li>
  263. <li class="nav-item" data-depth="0">
  264. <ul class="nav-list">
  265. <li class="nav-item" data-depth="1">
  266. <button class="nav-item-toggle"></button>
  267. <span class="nav-text">Core Engine</span>
  268. <ul class="nav-list">
  269. <li class="nav-item" data-depth="2">
  270. <a class="nav-link" href="../app/simpleapplication.html">SimpleApplication</a>
  271. </li>
  272. <li class="nav-item" data-depth="2">
  273. <a class="nav-link" href="../system/appsettings.html">AppSettings</a>
  274. </li>
  275. </ul>
  276. </li>
  277. <li class="nav-item" data-depth="1">
  278. <button class="nav-item-toggle"></button>
  279. <span class="nav-text">Controlling Game Logic</span>
  280. <ul class="nav-list">
  281. <li class="nav-item" data-depth="2">
  282. <a class="nav-link" href="../app/update_loop.html">Update Loop</a>
  283. </li>
  284. <li class="nav-item" data-depth="2">
  285. <a class="nav-link" href="../app/state/application_states.html">Application States</a>
  286. </li>
  287. <li class="nav-item" data-depth="2">
  288. <button class="nav-item-toggle"></button>
  289. <a class="nav-link" href="../scene/control/custom_controls.html">Custom Controls</a>
  290. <ul class="nav-list">
  291. <li class="nav-item" data-depth="3">
  292. <button class="nav-item-toggle"></button>
  293. <span class="nav-text">Video</span>
  294. <ul class="nav-list">
  295. <li class="nav-item" data-depth="4">
  296. <a class="nav-link" href="https://www.youtube.com/watch?v=MNDiZ9YHIpM">Control any scene node</a>
  297. </li>
  298. <li class="nav-item" data-depth="4">
  299. <a class="nav-link" href="https://www.youtube.com/watch?v=-OzRZscLlHY">Control a character</a>
  300. </li>
  301. <li class="nav-item" data-depth="4">
  302. <a class="nav-link" href="https://wiki.jmonkeyengine.org/Scenes/SDK-UsecaseDemo_1.zip">Video Source Code</a>
  303. </li>
  304. </ul>
  305. </li>
  306. </ul>
  307. </li>
  308. <li class="nav-item" data-depth="2">
  309. <a class="nav-link" href="../app/multithreading.html">Multithreading</a>
  310. </li>
  311. </ul>
  312. </li>
  313. <li class="nav-item" data-depth="1">
  314. <button class="nav-item-toggle"></button>
  315. <span class="nav-text">Scene Graph</span>
  316. <ul class="nav-list">
  317. <li class="nav-item" data-depth="2">
  318. <a class="nav-link" href="../scene/traverse_scenegraph.html">Traverse SceneGraph</a>
  319. </li>
  320. <li class="nav-item" data-depth="2">
  321. <a class="nav-link" href="../scene/spatial.html">Spatial: Node vs Geometry</a>
  322. </li>
  323. <li class="nav-item" data-depth="2">
  324. <button class="nav-item-toggle"></button>
  325. <a class="nav-link" href="../scene/mesh.html">Mesh</a>
  326. <ul class="nav-list">
  327. <li class="nav-item" data-depth="3">
  328. <a class="nav-link" href="../scene/custom_meshes.html">Custom Meshes</a>
  329. </li>
  330. <li class="nav-item" data-depth="3">
  331. <a class="nav-link" href="../scene/shape/shape.html">Shape</a>
  332. </li>
  333. <li class="nav-item" data-depth="3">
  334. <a class="nav-link" href="../scene/3d_models.html">3D Models</a>
  335. </li>
  336. </ul>
  337. </li>
  338. <li class="nav-item" data-depth="2">
  339. <a class="nav-link" href="../asset/asset_manager.html">Asset Manager</a>
  340. </li>
  341. <li class="nav-item" data-depth="2">
  342. <a class="nav-link" href="../export/save_and_load.html">Saving and Loading Nodes</a>
  343. </li>
  344. <li class="nav-item" data-depth="2">
  345. <a class="nav-link" href="../collision/collision_and_intersection.html">Collision and Intersection</a>
  346. </li>
  347. <li class="nav-item" data-depth="2">
  348. <a class="nav-link" href="../scene/control/level_of_detail.html">Level of Detail</a>
  349. </li>
  350. </ul>
  351. </li>
  352. <li class="nav-item" data-depth="1">
  353. <button class="nav-item-toggle"></button>
  354. <span class="nav-text">Animation, Scene</span>
  355. <ul class="nav-list">
  356. <li class="nav-item" data-depth="2">
  357. <a class="nav-link" href="../animation/animation_new.html">Animation with AnimComposer</a>
  358. </li>
  359. <li class="nav-item" data-depth="2">
  360. <a class="nav-link" href="../animation/animation.html">Animation-Old (AnimControl)</a>
  361. </li>
  362. <li class="nav-item" data-depth="2">
  363. <a class="nav-link" href="../cinematic/cinematics.html">Cinematics (cutscenes, fake destruction physics)</a>
  364. </li>
  365. <li class="nav-item" data-depth="2">
  366. <a class="nav-link" href="../cinematic/motionpath.html">MotionPaths and Waypoints</a>
  367. </li>
  368. </ul>
  369. </li>
  370. <li class="nav-item" data-depth="1">
  371. <button class="nav-item-toggle"></button>
  372. <span class="nav-text">Material, Light, Shadow</span>
  373. <ul class="nav-list">
  374. <li class="nav-item" data-depth="2">
  375. <a class="nav-link" href="../material/how_to_use_materials.html">How to use Materials</a>
  376. </li>
  377. <li class="nav-item" data-depth="2">
  378. <a class="nav-link" href="../material/j3m_material_files.html">.j3m Material Files</a>
  379. </li>
  380. <li class="nav-item" data-depth="2">
  381. <a class="nav-link" href="../material/material_definitions.html">.j3md Material Definitions</a>
  382. </li>
  383. <li class="nav-item" data-depth="2">
  384. <a class="nav-link" href="../material/materials_overview.html">.j3md Properties</a>
  385. </li>
  386. <li class="nav-item" data-depth="2">
  387. <a class="nav-link" href="jme3_shaders.html">Shaders and JME3</a>
  388. </li>
  389. <li class="nav-item is-current-page" data-depth="2">
  390. <a class="nav-link" href="jme3_shadernodes.html">Shader Node System</a>
  391. </li>
  392. <li class="nav-item" data-depth="2">
  393. <a class="nav-link" href="shader_video_tutorials.html">Shader Video Tutorials</a>
  394. </li>
  395. <li class="nav-item" data-depth="2">
  396. <a class="nav-link" href="../light/light_and_shadow.html">Light and Shadow</a>
  397. </li>
  398. <li class="nav-item" data-depth="2">
  399. <a class="nav-link" href="../texture/anisotropic_filtering.html">Anisotropic Filtering</a>
  400. </li>
  401. <li class="nav-item" data-depth="2">
  402. <a class="nav-link" href="../system/jme3_srgbpipeline.html">Gamma Correction</a>
  403. </li>
  404. <li class="nav-item" data-depth="2">
  405. <a class="nav-link" href="../material/normal_types.html">Normal Map Conventions</a>
  406. </li>
  407. </ul>
  408. </li>
  409. <li class="nav-item" data-depth="1">
  410. <button class="nav-item-toggle"></button>
  411. <span class="nav-text">Audio, Video</span>
  412. <ul class="nav-list">
  413. <li class="nav-item" data-depth="2">
  414. <a class="nav-link" href="../audio/audio.html">Playing Sounds</a>
  415. </li>
  416. <li class="nav-item" data-depth="2">
  417. <a class="nav-link" href="../audio/audio_environment_presets.html">Audio Environment Presets</a>
  418. </li>
  419. <li class="nav-item" data-depth="2">
  420. <a class="nav-link" href="../app/state/screenshots.html">Capture Screenshots</a>
  421. </li>
  422. <li class="nav-item" data-depth="2">
  423. <a class="nav-link" href="../app/state/capture_audio_video_to_a_file.html">Capture Audio/Video</a>
  424. </li>
  425. </ul>
  426. </li>
  427. <li class="nav-item" data-depth="1">
  428. <button class="nav-item-toggle"></button>
  429. <span class="nav-text">Filter, Effect</span>
  430. <ul class="nav-list">
  431. <li class="nav-item" data-depth="2">
  432. <a class="nav-link" href="../effect/effects_overview.html">Overview</a>
  433. </li>
  434. <li class="nav-item" data-depth="2">
  435. <a class="nav-link" href="../effect/bloom_and_glow.html">Bloom and Glow</a>
  436. </li>
  437. <li class="nav-item" data-depth="2">
  438. <a class="nav-link" href="../effect/particle_emitters.html">Particle Emitters</a>
  439. </li>
  440. </ul>
  441. </li>
  442. <li class="nav-item" data-depth="1">
  443. <button class="nav-item-toggle"></button>
  444. <span class="nav-text">Landscapes</span>
  445. <ul class="nav-list">
  446. <li class="nav-item" data-depth="2">
  447. <a class="nav-link" href="../util/sky.html">Sky</a>
  448. </li>
  449. <li class="nav-item" data-depth="2">
  450. <a class="nav-link" href="../terrain/terrain.html">Terrain (TerraMonkey)</a>
  451. </li>
  452. <li class="nav-item" data-depth="2">
  453. <a class="nav-link" href="../collision/terrain_collision.html">Terrain Collision</a>
  454. </li>
  455. <li class="nav-item" data-depth="2">
  456. <a class="nav-link" href="../effect/water.html">Simple Water</a>
  457. </li>
  458. <li class="nav-item" data-depth="2">
  459. <a class="nav-link" href="../effect/post-processor_water.html">Post-Processor Water</a>
  460. </li>
  461. </ul>
  462. </li>
  463. <li class="nav-item" data-depth="1">
  464. <button class="nav-item-toggle"></button>
  465. <span class="nav-text">Camera</span>
  466. <ul class="nav-list">
  467. <li class="nav-item" data-depth="2">
  468. <a class="nav-link" href="../renderer/camera.html">Camera</a>
  469. </li>
  470. <li class="nav-item" data-depth="2">
  471. <a class="nav-link" href="../renderer/making_the_camera_follow_a_character.html">Follow a Character</a>
  472. </li>
  473. <li class="nav-item" data-depth="2">
  474. <a class="nav-link" href="../renderer/remote-controlling_the_camera.html">Remote-Controlling</a>
  475. </li>
  476. <li class="nav-item" data-depth="2">
  477. <a class="nav-link" href="../renderer/multiple_camera_views.html">Multiple Camera Views</a>
  478. </li>
  479. <li class="nav-item" data-depth="2">
  480. <a class="nav-link" href="../renderer/jme3_renderbuckets.html">Render Buckets</a>
  481. </li>
  482. </ul>
  483. </li>
  484. <li class="nav-item" data-depth="1">
  485. <button class="nav-item-toggle"></button>
  486. <span class="nav-text">Rendering</span>
  487. <ul class="nav-list">
  488. <li class="nav-item" data-depth="2">
  489. <a class="nav-link" href="../renderer/render_pipeline.html">Render Pipelines</a>
  490. </li>
  491. </ul>
  492. </li>
  493. <li class="nav-item" data-depth="1">
  494. <button class="nav-item-toggle"></button>
  495. <span class="nav-text">User Interaction</span>
  496. <ul class="nav-list">
  497. <li class="nav-item" data-depth="2">
  498. <a class="nav-link" href="../input/input_handling.html">Input Handling</a>
  499. </li>
  500. <li class="nav-item" data-depth="2">
  501. <a class="nav-link" href="../input/combo_moves.html">Combo Moves</a>
  502. </li>
  503. <li class="nav-item" data-depth="2">
  504. <a class="nav-link" href="../input/mouse_picking.html">Mouse Picking</a>
  505. </li>
  506. </ul>
  507. </li>
  508. <li class="nav-item" data-depth="1">
  509. <button class="nav-item-toggle"></button>
  510. <a class="nav-link" href="../gui/topic_gui.html">Graphical User Interface</a>
  511. <ul class="nav-list">
  512. <li class="nav-item" data-depth="2">
  513. <button class="nav-item-toggle"></button>
  514. <span class="nav-text">Nifty GUI</span>
  515. <ul class="nav-list">
  516. <li class="nav-item" data-depth="3">
  517. <a class="nav-link" href="../gui/nifty_gui.html">Integration Tutorial</a>
  518. </li>
  519. <li class="nav-item" data-depth="3">
  520. <a class="nav-link" href="../gui/nifty_gui_best_practices.html">Best Practices</a>
  521. </li>
  522. <li class="nav-item" data-depth="3">
  523. <a class="nav-link" href="../gui/nifty_gui_scenarios.html">Scenarios</a>
  524. </li>
  525. </ul>
  526. </li>
  527. <li class="nav-item" data-depth="2">
  528. <a class="nav-link" href="../ui/hud.html">Head-Up Display (HUD)</a>
  529. </li>
  530. </ul>
  531. </li>
  532. <li class="nav-item" data-depth="1">
  533. <button class="nav-item-toggle"></button>
  534. <span class="nav-text">Virtual Reality</span>
  535. <ul class="nav-list">
  536. <li class="nav-item" data-depth="2">
  537. <a class="nav-link" href="../vr/virtualreality.html">Virtual Reality</a>
  538. </li>
  539. <li class="nav-item" data-depth="2">
  540. <a class="nav-link" href="../vr/legacyOpenVr.html">Virtual Reality Legacy Support</a>
  541. </li>
  542. <li class="nav-item" data-depth="2">
  543. <a class="nav-link" href="../vr/virtualrealitycontrollers.html">Virtual Reality Legacy Controller Support</a>
  544. </li>
  545. </ul>
  546. </li>
  547. </ul>
  548. </li>
  549. <li class="nav-item" data-depth="0">
  550. <ul class="nav-list">
  551. <li class="nav-item" data-depth="1">
  552. <button class="nav-item-toggle"></button>
  553. <a class="nav-link" href="../../physics/physics.html">Physics</a>
  554. <ul class="nav-list">
  555. <li class="nav-item" data-depth="2">
  556. <a class="nav-link" href="../../physics/bullet_multithreading.html">Multi-Threaded Physics</a>
  557. </li>
  558. <li class="nav-item" data-depth="2">
  559. <a class="nav-link" href="../../physics/collision/physics_listeners.html">Collision Detection</a>
  560. </li>
  561. <li class="nav-item" data-depth="2">
  562. <a class="nav-link" href="../../physics/joint/hinges_and_joints.html">Hinges and Joints</a>
  563. </li>
  564. <li class="nav-item" data-depth="2">
  565. <a class="nav-link" href="../../physics/control/walking_character.html">Walking Character</a>
  566. </li>
  567. <li class="nav-item" data-depth="2">
  568. <a class="nav-link" href="../../physics/control/ragdoll.html">Ragdoll</a>
  569. </li>
  570. <li class="nav-item" data-depth="2">
  571. <a class="nav-link" href="../../physics/control/vehicles.html">Vehicles</a>
  572. </li>
  573. <li class="nav-item" data-depth="2">
  574. <a class="nav-link" href="../../physics/control/softbody.html">Softbody</a>
  575. </li>
  576. <li class="nav-item" data-depth="2">
  577. <a class="nav-link" href="../../physics/bullet_pitfalls.html">Bullet Physics Pitfalls</a>
  578. </li>
  579. </ul>
  580. </li>
  581. </ul>
  582. </li>
  583. <li class="nav-item" data-depth="0">
  584. <ul class="nav-list">
  585. <li class="nav-item" data-depth="1">
  586. <button class="nav-item-toggle"></button>
  587. <span class="nav-text">Networking</span>
  588. <ul class="nav-list">
  589. <li class="nav-item" data-depth="2">
  590. <a class="nav-link" href="../../networking/networking.html">Networking (SpiderMonkey)</a>
  591. </li>
  592. <li class="nav-item" data-depth="2">
  593. <a class="nav-link" href="../../networking/headless_server.html">Headless Server</a>
  594. </li>
  595. <li class="nav-item" data-depth="2">
  596. <a class="nav-link" href="../../networking/monkey_zone.html">Multi-Player Demo Code</a>
  597. </li>
  598. <li class="nav-item" data-depth="2">
  599. <a class="nav-link" href="../../networking/networking_video_tutorials.html">Networking Video Tutorials</a>
  600. </li>
  601. </ul>
  602. </li>
  603. </ul>
  604. </li>
  605. <li class="nav-item" data-depth="0">
  606. <ul class="nav-list">
  607. <li class="nav-item" data-depth="1">
  608. <button class="nav-item-toggle"></button>
  609. <span class="nav-text">User Contributions</span>
  610. <ul class="nav-list">
  611. <li class="nav-item" data-depth="2">
  612. <a class="nav-link" href="../../contributions/contributions.html">User Made Utilities</a>
  613. </li>
  614. <li class="nav-item" data-depth="2">
  615. <button class="nav-item-toggle"></button>
  616. <span class="nav-text">Shader</span>
  617. <ul class="nav-list">
  618. <li class="nav-item" data-depth="3">
  619. <a class="nav-link" href="../../contributions/shader/shaderblow_project.html">ShaderBlow Project</a>
  620. </li>
  621. </ul>
  622. </li>
  623. <li class="nav-item" data-depth="2">
  624. <button class="nav-item-toggle"></button>
  625. <span class="nav-text">Landscapes</span>
  626. <ul class="nav-list">
  627. <li class="nav-item" data-depth="3">
  628. <a class="nav-link" href="../../contributions/lanscapes/vegetationsystem/vegetationsystem.html">Vegetation System</a>
  629. </li>
  630. </ul>
  631. </li>
  632. <li class="nav-item" data-depth="2">
  633. <button class="nav-item-toggle"></button>
  634. <span class="nav-text">Networking</span>
  635. <ul class="nav-list">
  636. <li class="nav-item" data-depth="3">
  637. <a class="nav-link" href="../../contributions/networking/open_game_finder.html">Open Game Finder</a>
  638. </li>
  639. </ul>
  640. </li>
  641. <li class="nav-item" data-depth="2">
  642. <button class="nav-item-toggle"></button>
  643. <span class="nav-text">Entity System</span>
  644. <ul class="nav-list">
  645. <li class="nav-item" data-depth="3">
  646. <a class="nav-link" href="#es/entitysystem.adoc">The Zay-ES Entity System</a>
  647. </li>
  648. </ul>
  649. </li>
  650. <li class="nav-item" data-depth="2">
  651. <button class="nav-item-toggle"></button>
  652. <span class="nav-text">Artificial Intelligence</span>
  653. <ul class="nav-list">
  654. <li class="nav-item" data-depth="3">
  655. <a class="nav-link" href="../../contributions/ai/recast.html">Recast Navigation</a>
  656. </li>
  657. <li class="nav-item" data-depth="3">
  658. <a class="nav-link" href="../../contributions/ai/building_recast.html">Updating and building Recast Native Bindings</a>
  659. </li>
  660. <li class="nav-item" data-depth="3">
  661. <a class="nav-link" href="../../contributions/ai/monkey_brains.html">Monkey Brains</a>
  662. </li>
  663. <li class="nav-item" data-depth="3">
  664. <a class="nav-link" href="../../contributions/ai/steer_behaviours.html">Steer Behaviours</a>
  665. </li>
  666. <li class="nav-item" data-depth="3">
  667. <a class="nav-link" href="../../contributions/ai/jme3_ai.html">jME3 Artificial Intelligence</a>
  668. </li>
  669. </ul>
  670. </li>
  671. <li class="nav-item" data-depth="2">
  672. <button class="nav-item-toggle"></button>
  673. <a class="nav-link" href="../../contributions/gui/topic_contributions_gui.html">GUI</a>
  674. <ul class="nav-list">
  675. <li class="nav-item" data-depth="3">
  676. <a class="nav-link" href="../../contributions/contributions.html#lemur-gui-library">Lemur - a native jME3 GUI library with scene graph tools</a>
  677. </li>
  678. <li class="nav-item" data-depth="3">
  679. <a class="nav-link" href="../../contributions/contributions.html#tonegodgui">tonegodGUI - a native jME3 GUI library</a>
  680. </li>
  681. <li class="nav-item" data-depth="3">
  682. <a class="nav-link" href="../../contributions/contributions.html#immediate-graphical-user-interface">Immediate graphical user interface</a>
  683. </li>
  684. </ul>
  685. </li>
  686. <li class="nav-item" data-depth="2">
  687. <button class="nav-item-toggle"></button>
  688. <span class="nav-text">Tools</span>
  689. <ul class="nav-list">
  690. <li class="nav-item" data-depth="3">
  691. <a class="nav-link" href="../../contributions/tools/navigation.html">Mercator Projection Tool (Marine Navigation)</a>
  692. </li>
  693. <li class="nav-item" data-depth="3">
  694. <a class="nav-link" href="../../contributions/tools/charts.html">Visualizing Maps in JME3 (Marine Charts)</a>
  695. </li>
  696. </ul>
  697. </li>
  698. <li class="nav-item" data-depth="2">
  699. <button class="nav-item-toggle"></button>
  700. <a class="nav-link" href="../../contributions/vr/topic_contributions_vr.html">Virtual Reality (And augmented reality)</a>
  701. <ul class="nav-list">
  702. <li class="nav-item" data-depth="3">
  703. <a class="nav-link" href="../../contributions/contributions.html#tamarin-openxr">Tamarin OpenXR</a>
  704. </li>
  705. </ul>
  706. </li>
  707. <li class="nav-item" data-depth="2">
  708. <button class="nav-item-toggle"></button>
  709. <span class="nav-text">Projects</span>
  710. <ul class="nav-list">
  711. <li class="nav-item" data-depth="3">
  712. <a class="nav-link" href="../../contributions/projects/rise_of_mutants_project.html">Rise of Mutants Project</a>
  713. </li>
  714. </ul>
  715. </li>
  716. </ul>
  717. </li>
  718. </ul>
  719. </li>
  720. <li class="nav-item" data-depth="0">
  721. <ul class="nav-list">
  722. <li class="nav-item" data-depth="1">
  723. <button class="nav-item-toggle"></button>
  724. <a class="nav-link" href="../../sdk/sdk.html">SDK</a>
  725. <ul class="nav-list">
  726. <li class="nav-item" data-depth="2">
  727. <button class="nav-item-toggle"></button>
  728. <span class="nav-text">Video Tutorials</span>
  729. <ul class="nav-list">
  730. <li class="nav-item" data-depth="3">
  731. <button class="nav-item-toggle"></button>
  732. <span class="nav-text">SDK Use Case Tutorials</span>
  733. <ul class="nav-list">
  734. <li class="nav-item" data-depth="4">
  735. <a class="nav-link" href="http://www.youtube.com/watch?v=-OzRZscLlHY">Demo 1 (Quixote demo)</a>
  736. </li>
  737. <li class="nav-item" data-depth="4">
  738. <a class="nav-link" href="http://www.youtube.com/watch?v=6-YWxD3JByE">Demo 2 (Models and Materials)</a>
  739. </li>
  740. </ul>
  741. </li>
  742. <li class="nav-item" data-depth="3">
  743. <button class="nav-item-toggle"></button>
  744. <span class="nav-text">SDK Tutorials</span>
  745. <ul class="nav-list">
  746. <li class="nav-item" data-depth="4">
  747. <a class="nav-link" href="http://www.youtube.com/watch?v=M1_0pbeyJzI">Basics</a>
  748. </li>
  749. <li class="nav-item" data-depth="4">
  750. <a class="nav-link" href="http://www.youtube.com/watch?v=nL7woH40i5c">Importing Models</a>
  751. </li>
  752. <li class="nav-item" data-depth="4">
  753. <a class="nav-link" href="http://www.youtube.com/watch?v=DUmgAjiNzhY">Dragging&amp;Dropping Nodes</a>
  754. </li>
  755. <li class="nav-item" data-depth="4">
  756. <a class="nav-link" href="http://www.youtube.com/watch?v=ntPAmtsQ6eM">Scene Composing</a>
  757. </li>
  758. <li class="nav-item" data-depth="4">
  759. <a class="nav-link" href="http://www.youtube.com/watch?v=zgPV3W6dD4s">Terrain with Collision Shape</a>
  760. </li>
  761. <li class="nav-item" data-depth="4">
  762. <a class="nav-link" href="http://www.youtube.com/watch?v=Feu3-mrpolc">Working with Materials</a>
  763. </li>
  764. <li class="nav-item" data-depth="4">
  765. <a class="nav-link" href="http://www.youtube.com/watch?v=MNDiZ9YHIpM">Custom Controls</a>
  766. </li>
  767. <li class="nav-item" data-depth="4">
  768. <a class="nav-link" href="http://www.youtube.com/watch?v=oZnssg8TBWQ">WebStart Deployment</a>
  769. </li>
  770. <li class="nav-item" data-depth="4">
  771. <a class="nav-link" href="http://www.youtube.com/watch?v=D7JM4VMKqPc">Animation and Effect TrackEditing</a>
  772. </li>
  773. </ul>
  774. </li>
  775. </ul>
  776. </li>
  777. <li class="nav-item" data-depth="2">
  778. <button class="nav-item-toggle"></button>
  779. <span class="nav-text">Getting Started</span>
  780. <ul class="nav-list">
  781. <li class="nav-item" data-depth="3">
  782. <a class="nav-link" href="../../sdk/update_center.html">Updating jMonkeyEngine SDK</a>
  783. </li>
  784. <li class="nav-item" data-depth="3">
  785. <a class="nav-link" href="../../sdk/troubleshooting.html">Troubleshooting</a>
  786. </li>
  787. </ul>
  788. </li>
  789. <li class="nav-item" data-depth="2">
  790. <button class="nav-item-toggle"></button>
  791. <span class="nav-text">Java Development Features</span>
  792. <ul class="nav-list">
  793. <li class="nav-item" data-depth="3">
  794. <a class="nav-link" href="../../sdk/project_creation.html">Project Creation</a>
  795. </li>
  796. <li class="nav-item" data-depth="3">
  797. <a class="nav-link" href="../../sdk/code_editor.html">Code Editor and Palette</a>
  798. </li>
  799. <li class="nav-item" data-depth="3">
  800. <a class="nav-link" href="../../sdk/version_control.html">File Version Control</a>
  801. </li>
  802. <li class="nav-item" data-depth="3">
  803. <a class="nav-link" href="../../sdk/debugging_profiling_testing.html">Debug, Profile, Test</a>
  804. </li>
  805. <li class="nav-item" data-depth="3">
  806. <button class="nav-item-toggle"></button>
  807. <a class="nav-link" href="../../sdk/application_deployment.html">Application Deployment</a>
  808. <ul class="nav-list">
  809. <li class="nav-item" data-depth="4">
  810. <a class="nav-link" href="../../sdk/default_build_script.html">Default Build Script</a>
  811. </li>
  812. <li class="nav-item" data-depth="4">
  813. <a class="nav-link" href="../../sdk/android.html">Android</a>
  814. </li>
  815. <li class="nav-item" data-depth="4">
  816. <a class="nav-link" href="../../sdk/android_cheat_sheet.html">Android Cheat Sheet</a>
  817. </li>
  818. <li class="nav-item" data-depth="4">
  819. <a class="nav-link" href="../../sdk/ios.html">iOS</a>
  820. </li>
  821. </ul>
  822. </li>
  823. </ul>
  824. </li>
  825. <li class="nav-item" data-depth="2">
  826. <button class="nav-item-toggle"></button>
  827. <span class="nav-text">Unique Features</span>
  828. <ul class="nav-list">
  829. <li class="nav-item" data-depth="3">
  830. <button class="nav-item-toggle"></button>
  831. <a class="nav-link" href="../../sdk/model_loader_and_viewer.html">Import, View, Convert Models</a>
  832. <ul class="nav-list">
  833. <li class="nav-item" data-depth="4">
  834. <a class="nav-link" href="../../sdk/asset_packs.html">Asset Packs</a>
  835. </li>
  836. </ul>
  837. </li>
  838. <li class="nav-item" data-depth="3">
  839. <a class="nav-link" href="../../sdk/scene_explorer.html">The SceneExplorer</a>
  840. </li>
  841. <li class="nav-item" data-depth="3">
  842. <a class="nav-link" href="../../sdk/scene_composer.html">Composing a Scene</a>
  843. </li>
  844. <li class="nav-item" data-depth="3">
  845. <a class="nav-link" href="../../sdk/terrain_editor.html">Terrain Editor</a>
  846. </li>
  847. <li class="nav-item" data-depth="3">
  848. <a class="nav-link" href="../../sdk/sample_code.html">Sample Code</a>
  849. </li>
  850. <li class="nav-item" data-depth="3">
  851. <a class="nav-link" href="../../sdk/material_editing.html">Material Editing</a>
  852. </li>
  853. <li class="nav-item" data-depth="3">
  854. <a class="nav-link" href="../../sdk/font_creation.html">Creating Bitmap Fonts</a>
  855. </li>
  856. <li class="nav-item" data-depth="3">
  857. <button class="nav-item-toggle"></button>
  858. <a class="nav-link" href="https://hub.jmonkeyengine.org/t/effecttrack-and-audiotrack-editing-in-the-sdk/23378">Audio and Effect Track Editing</a>
  859. <ul class="nav-list">
  860. <li class="nav-item" data-depth="4">
  861. <a class="nav-link" href="https://www.youtube.com/watch?v=D7JM4VMKqPc">Video: Effect and AudioTrack editing in jMonkeyEngine 3 sdk</a>
  862. </li>
  863. </ul>
  864. </li>
  865. <li class="nav-item" data-depth="3">
  866. <a class="nav-link" href="../../sdk/filters.html">Post-Processor Filter Editor and Viewer</a>
  867. </li>
  868. <li class="nav-item" data-depth="3">
  869. <a class="nav-link" href="../app/state/application_states.html">Application States</a>
  870. </li>
  871. <li class="nav-item" data-depth="3">
  872. <a class="nav-link" href="../scene/control/custom_controls.html">Custom Controls</a>
  873. </li>
  874. <li class="nav-item" data-depth="3">
  875. <a class="nav-link" href="../../sdk/vehicle_creator.html">Vehicle Creator</a>
  876. </li>
  877. <li class="nav-item" data-depth="3">
  878. <a class="nav-link" href="../../sdk/assetbrowser.html">Asset Browser</a>
  879. </li>
  880. <li class="nav-item" data-depth="3">
  881. <a class="nav-link" href="../../sdk/animations.html">Animations</a>
  882. </li>
  883. </ul>
  884. </li>
  885. <li class="nav-item" data-depth="2">
  886. <button class="nav-item-toggle"></button>
  887. <span class="nav-text">Advanced Usage</span>
  888. <ul class="nav-list">
  889. <li class="nav-item" data-depth="3">
  890. <a class="nav-link" href="../../sdk/build_platform.html">Building jMonkeyEngine SDK</a>
  891. </li>
  892. <li class="nav-item" data-depth="3">
  893. <a class="nav-link" href="../../sdk/use_own_jme.html#.adoc">Using your own (modified) version of jME3 in jMonkeyEngine SDK</a>
  894. </li>
  895. <li class="nav-item" data-depth="3">
  896. <a class="nav-link" href="../../sdk/increasing_heap_memory.html">Increasing Heap Memory</a>
  897. </li>
  898. <li class="nav-item" data-depth="3">
  899. <a class="nav-link" href="../../sdk/log_files.html">Log Files</a>
  900. </li>
  901. </ul>
  902. </li>
  903. <li class="nav-item" data-depth="2">
  904. <button class="nav-item-toggle"></button>
  905. <span class="nav-text">Available external plugins</span>
  906. <ul class="nav-list">
  907. <li class="nav-item" data-depth="3">
  908. <a class="nav-link" href="../../contributions/contributions.html">Contributions</a>
  909. </li>
  910. <li class="nav-item" data-depth="3">
  911. <a class="nav-link" href="../../sdk/neotexture.html">Neo Texture Editor for procedural textures</a>
  912. </li>
  913. <li class="nav-item" data-depth="3">
  914. <a class="nav-link" href="http://www.youtube.com/watch?v=yS9a9o4WzL8">Video: Mesh Tool &amp; Physics Editor</a>
  915. </li>
  916. </ul>
  917. </li>
  918. <li class="nav-item" data-depth="2">
  919. <button class="nav-item-toggle"></button>
  920. <a class="nav-link" href="../../sdk/development.html">Developing plugins for jMonkeyEngine SDK</a>
  921. <ul class="nav-list">
  922. <li class="nav-item" data-depth="3">
  923. <a class="nav-link" href="../../sdk/development/setup.html">Creating a plugin</a>
  924. </li>
  925. <li class="nav-item" data-depth="3">
  926. <a class="nav-link" href="../../sdk/development/general.html">Creating components</a>
  927. </li>
  928. <li class="nav-item" data-depth="3">
  929. <a class="nav-link" href="../../sdk/development/scene.html">The Main Scene</a>
  930. </li>
  931. <li class="nav-item" data-depth="3">
  932. <a class="nav-link" href="../../sdk/development/sceneexplorer.html">The Scene Explorer</a>
  933. </li>
  934. <li class="nav-item" data-depth="3">
  935. <a class="nav-link" href="../../sdk/development/projects_assets.html">Projects and Assets</a>
  936. </li>
  937. <li class="nav-item" data-depth="3">
  938. <a class="nav-link" href="../../sdk/development/extension_library.html">Create a library plugin from a jar file</a>
  939. </li>
  940. <li class="nav-item" data-depth="3">
  941. <a class="nav-link" href="../../sdk/development/model_loader.html">Create a new or custom model filetype and loader</a>
  942. </li>
  943. </ul>
  944. </li>
  945. </ul>
  946. </li>
  947. </ul>
  948. </li>
  949. </ul>
  950. </nav>
  951. </div>
  952. <div class="nav-panel-explore" data-panel="explore">
  953. <div class="context">
  954. <span class="title">JME</span>
  955. <span class="version">3.8</span>
  956. </div>
  957. <ul class="components">
  958. <li class="component is-current">
  959. <span class="title">JME</span>
  960. <ul class="versions">
  961. <li class="version is-current">
  962. <a href="../../documentation.html">3.8</a>
  963. </li>
  964. <li class="version">
  965. <a href="../../../3.4/documentation.html">3.4</a>
  966. </li>
  967. <li class="version">
  968. <a href="../../../3.3/documentation.html">3.3</a>
  969. </li>
  970. <li class="version">
  971. <a href="../../../3.2/documentation.html">3.2</a>
  972. </li>
  973. </ul>
  974. </li>
  975. <li class="component">
  976. <span class="title">Wiki Contribution</span>
  977. <ul class="versions">
  978. <li class="version">
  979. <a href="../../../../docs-wiki/3.8/wiki_contributor.html">3.8</a>
  980. </li>
  981. </ul>
  982. </li>
  983. <li class="component">
  984. <span class="title">Wiki UI</span>
  985. <ul class="versions">
  986. <li class="version">
  987. <a href="../../../../wiki-ui/index.html">master</a>
  988. </li>
  989. </ul>
  990. </li>
  991. </ul>
  992. </div>
  993. </div>
  994. </aside>
  995. </div>
  996. <main class="article">
  997. <div class="toolbar" role="navigation">
  998. <button class="nav-toggle"></button>
  999. <nav class="breadcrumbs" aria-label="breadcrumbs">
  1000. <ul>
  1001. <li><a href="../../documentation.html">JME</a></li>
  1002. <li>Material, Light, Shadow</li>
  1003. <li><a href="jme3_shadernodes.html">Shader Node System</a></li>
  1004. </ul>
  1005. </nav>
  1006. <div class="page-versions">
  1007. <button class="version-menu-toggle" title="Show other versions of page">3.8</button>
  1008. <div class="version-menu">
  1009. <a class="version is-current" href="jme3_shadernodes.html">3.8</a>
  1010. <a class="version" href="../../../3.4/core/shader/jme3_shadernodes.html">3.4</a>
  1011. <a class="version" href="../../../3.3/core/shader/jme3_shadernodes.html">3.3</a>
  1012. <a class="version" href="../../../3.2/core/shader/jme3_shadernodes.html">3.2</a>
  1013. </div>
  1014. </div>
  1015. <div class="edit-this-page"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/docs/modules/core/pages/shader/jme3_shadernodes.adoc">Edit this Page</a></div>
  1016. </div>
  1017. <div class="content">
  1018. <article class="doc">
  1019. <h1 class="page">Shader Nodes</h1>
  1020. <div class="sect1">
  1021. <h2 id="motivations"><a class="anchor" href="#motivations"></a>Motivations</h2>
  1022. <div class="sectionbody">
  1023. <div class="paragraph">
  1024. <p>jME3 material system is entirely based on shaders. While it&#8217;s pretty powerful, this system has some issues and limitations :</p>
  1025. </div>
  1026. <div class="ulist">
  1027. <ul>
  1028. <li>
  1029. <p>Monolithic shaders have a serious lack of flexibility, and it can be daunting to get into the code for inexperienced users.</p>
  1030. </li>
  1031. <li>
  1032. <p>Maintenance ease of such shaders is poor. (for example the whole lighting shaders represent around 500 lines of code, and it could be a lot worse with more features)</p>
  1033. </li>
  1034. <li>
  1035. <p>Adding new features to those shaders decrease the ease of maintenance a lot. This point made us reluctant to do so and some feature were never added (Fog to name it, but many more).</p>
  1036. </li>
  1037. <li>
  1038. <p>Users can&#8217;t add their own feature to the shader unless they fork it, and fall back to the same issues explained in previous points.</p>
  1039. </li>
  1040. </ul>
  1041. </div>
  1042. <div class="paragraph">
  1043. <p>Shader Nodes were designed with this in mind and are the fruit of many long discussions in the core chat balancing the pros and cons of this or that pattern.<br>
  1044. At first this system was referred to as &#8220;Shader&#8221; injection. The basic idea was to allow users to inject code into shaders with a tag replacement system.<br>
  1045. We finally came with a different concept called Shader Nodes, that is inspired from blender nodes system for textures and post process.<br>
  1046. <strong>The final shader is generated at run time by the system by assembling shader nodes together.</strong></p>
  1047. </div>
  1048. </div>
  1049. </div>
  1050. <div class="sect1">
  1051. <h2 id="what-is-a-shader-node"><a class="anchor" href="#what-is-a-shader-node"></a>What is a Shader Node?</h2>
  1052. <div class="sectionbody">
  1053. <div class="paragraph">
  1054. <p>Conceptually, it&#8217;s just a self sufficient piece of glsl code that accepts inputs and produce some outputs.<br>
  1055. Inputs are glsl variables that may be fed by previous nodes output values.<br>
  1056. Outputs are glsl variables fed with values computed in the shader node code.<br></p>
  1057. </div>
  1058. <div class="paragraph">
  1059. <p>In practice it&#8217;s a bit more than that.A shader node is declined in several parts :</p>
  1060. </div>
  1061. <div class="ulist">
  1062. <ul>
  1063. <li>
  1064. <p>A shader node definition, defining :</p>
  1065. <div class="ulist">
  1066. <ul>
  1067. <li>
  1068. <p>The type of shader node (Vertex or Fragment for now)</p>
  1069. </li>
  1070. <li>
  1071. <p>The minimal glsl version needed for the shader node</p>
  1072. </li>
  1073. <li>
  1074. <p>The path to the shader file (containing the shader code heh)</p>
  1075. </li>
  1076. <li>
  1077. <p><strong>A mandatory documentation block</strong> for this Shader node. As I hope many users will do their own nodes and contribute them back this point is crucial.</p>
  1078. </li>
  1079. <li>
  1080. <p>A list of inputs accepted by this shader (typed glsl variable optional or needed for the code to run properly)</p>
  1081. </li>
  1082. <li>
  1083. <p>A list of outputs produced by this shader (typed glsl variable computed and fed by the node&#8217;s code)</p>
  1084. </li>
  1085. </ul>
  1086. </div>
  1087. </li>
  1088. <li>
  1089. <p>The actual shader code file (.vert or .frag depending on the node&#8217;s type like any shader file)</p>
  1090. </li>
  1091. <li>
  1092. <p>A shader node declaration having :</p>
  1093. <div class="ulist">
  1094. <ul>
  1095. <li>
  1096. <p>A unique name(in the shader scope)</p>
  1097. </li>
  1098. <li>
  1099. <p>The shader node definition it&#8217;s based on</p>
  1100. </li>
  1101. <li>
  1102. <p>An optional activation condition (based on the actual define system)</p>
  1103. </li>
  1104. <li>
  1105. <p>A list of input mapping (what will be actually fed to those inputs)</p>
  1106. </li>
  1107. <li>
  1108. <p>A list of output mapping (what will be output to the global output of the shader)</p>
  1109. </li>
  1110. </ul>
  1111. </div>
  1112. </li>
  1113. </ul>
  1114. </div>
  1115. </div>
  1116. </div>
  1117. <div class="sect1">
  1118. <h2 id="shader-node-definition"><a class="anchor" href="#shader-node-definition"></a>Shader Node definition</h2>
  1119. <div class="sectionbody">
  1120. <div class="paragraph">
  1121. <p>First ShaderNodes have to be defined either in a separate file (j3sn for jme3 shader node) or directly embed in the Technique block of the j3md file.<br>
  1122. Please refer to this documentation for global structure of a j3md file
  1123. <a href="../material/material_specification.html" class="xref page">jMonkeyEngine3 Material Specification</a></p>
  1124. </div>
  1125. <div class="paragraph">
  1126. <p>All is included in a <strong>ShaderNodeDefinitions</strong> bloc. This block can have several nodes defined (it&#8217;s recommended to define nodes that have strong dependencies with each other in the same j3sn file).<br>
  1127. A ShaderNode is declared in a <strong>ShaderNodeDefinition</strong> block.<br>
  1128. The global structure should look like this :</p>
  1129. </div>
  1130. <div class="listingblock">
  1131. <div class="content">
  1132. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">ShaderNodeDefinitions{
  1133. ShaderNodeDefinition &lt;NodeDefName&gt;{
  1134. Type : &lt;ShaderType&gt;
  1135. Shader &lt;ShaderLangAndVersion&gt; : &lt;ShaderPath&gt;
  1136. [Shader &lt;ShaderLangAndVersion&gt; : &lt;ShaderPath&gt;]
  1137. [...]
  1138. Documentation {
  1139. &lt;DocContent&gt;
  1140. }
  1141. Input {
  1142. &lt;GlslVarType&gt; &lt;VarName&gt;
  1143. [&lt;GlslVarType&gt; &lt;VarName&gt;]
  1144. [...]
  1145. }
  1146. Output {
  1147. &lt;GlslVarType&gt; &lt;VarName&gt;
  1148. [&lt;GlslVarType&gt; &lt;VarName&gt;]
  1149. [...]
  1150. }
  1151. }
  1152. [ShaderNodeDefinition &lt;NodeDef2Name&gt; {
  1153. [...]
  1154. }]
  1155. [...]
  1156. }</code></pre>
  1157. </div>
  1158. </div>
  1159. <div class="paragraph">
  1160. <p>All that is not between [] is mandatory.</p>
  1161. </div>
  1162. <div class="ulist">
  1163. <ul>
  1164. <li>
  1165. <p><u>ShaderNodeDefinition</u> : the definition block. You can have several definition in the same ShaderNodeDefinitions block.</p>
  1166. <div class="ulist">
  1167. <ul>
  1168. <li>
  1169. <p><strong>NodeDefName</strong> : The name of this ShaderNodeDefinition</p>
  1170. </li>
  1171. </ul>
  1172. </div>
  1173. </li>
  1174. <li>
  1175. <p><u>Type</u> : define the type of this shader node</p>
  1176. <div class="ulist">
  1177. <ul>
  1178. <li>
  1179. <p><strong>ShaderType</strong> : The type of shader for this definition. For now only &#8220;Vertex&#8221; and &#8220;Fragment&#8221; are supported.</p>
  1180. </li>
  1181. </ul>
  1182. </div>
  1183. </li>
  1184. <li>
  1185. <p><u>Shader</u> : the version and path of the shader code to use. note that you can have several shader with different GLSL version. The generator will pick the relevant one according to GPU capabilities.</p>
  1186. <div class="ulist">
  1187. <ul>
  1188. <li>
  1189. <p><strong>ShaderLangAndVersion</strong> : follows the same syntax than the shader declaration in the j3md file : GLSL&lt;version&gt;, version being 100 for glsl 1.0 , 130 for glsl 1.3, 150 for glsl 1.5 and so on. Note that this is the <strong>minimum</strong> glsl version this shader supports</p>
  1190. </li>
  1191. <li>
  1192. <p><strong>ShaderPath</strong> the path to the shader code file (relative to the asset folder)</p>
  1193. </li>
  1194. </ul>
  1195. </div>
  1196. </li>
  1197. <li>
  1198. <p><u>Documentation</u> : the documentation block. This is mandatory and I really recommend filling this if you want to contribute your shader nodes. This documentation will be read buy the SDK and presented to users willing to add this node to their material definitions. This should contain a brief description of the node and a description for each input and output.</p>
  1199. <div class="ulist">
  1200. <ul>
  1201. <li>
  1202. <p><strong>@input</strong> can be use to prefix an input name so the sdk recognize it and format it accordingly. the syntax id @input &lt;inputName&gt; &lt;description&gt;.</p>
  1203. </li>
  1204. <li>
  1205. <p><strong>@output</strong> can be use to prefix an output name so the sdk recognize it and format it accordingly. the syntax id @output &lt;inputName&gt; &lt;description&gt;</p>
  1206. </li>
  1207. </ul>
  1208. </div>
  1209. </li>
  1210. <li>
  1211. <p><u>Input</u> : The input block containing all the inputs of this node. A node can have 1 or several inputs.</p>
  1212. <div class="ulist">
  1213. <ul>
  1214. <li>
  1215. <p><strong>GlslVarType</strong> : a valid glsl variable type that will be used in the shader for this input. see <a href="https://www.khronos.org/opengl/wiki/GLSL_Type">https://www.khronos.org/opengl/wiki/GLSL_Type</a> and the &#8220;Declare&#8221; an array chapter</p>
  1216. </li>
  1217. <li>
  1218. <p><strong>VarName</strong> : the name of the variable. Note that you can&#8217;t have several inputs with the same name.</p>
  1219. </li>
  1220. </ul>
  1221. </div>
  1222. </li>
  1223. <li>
  1224. <p><u>Output</u> : The output block containing all the outputs of this node. A node can have 1 or several outputs.</p>
  1225. <div class="ulist">
  1226. <ul>
  1227. <li>
  1228. <p><strong>GlslVarType</strong> : a valid glsl variable type that will be used in the shader for this input. see <a href="https://www.khronos.org/opengl/wiki/GLSL_Type">https://www.khronos.org/opengl/wiki/GLSL_Type</a> and the &#8220;Declare&#8221; an array chapter</p>
  1229. </li>
  1230. <li>
  1231. <p><strong>VarName</strong> : the name of the variable. Note that you can&#8217;t have several outputs with the same name.</p>
  1232. </li>
  1233. </ul>
  1234. </div>
  1235. </li>
  1236. </ul>
  1237. </div>
  1238. <div class="admonitionblock note">
  1239. <table>
  1240. <tr>
  1241. <td class="icon">
  1242. <i class="fa icon-note" title="Note"></i>
  1243. </td>
  1244. <td class="content">
  1245. <div class="paragraph">
  1246. <p>If you use the same name for an input and an output, the generator will consider them as the SAME variable so they should be of the same glsl type.</p>
  1247. </div>
  1248. </td>
  1249. </tr>
  1250. </table>
  1251. </div>
  1252. <div class="sect2">
  1253. <h3 id="example"><a class="anchor" href="#example"></a>Example</h3>
  1254. <div class="paragraph">
  1255. <p>Here is a typical shader node definition.</p>
  1256. </div>
  1257. <div class="listingblock">
  1258. <div class="content">
  1259. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">ShaderNodeDefinitions{
  1260. ShaderNodeDefinition LightMapping{
  1261. Type: Fragment
  1262. Shader GLSL100: Common/MatDefs/ShaderNodes/LightMapping/lightMap.frag
  1263. Documentation {
  1264. This Node is responsible for multiplying a light mapping contribution to a given color.
  1265. @input texCoord the texture coordinates to use for light mapping
  1266. @input lightMap the texture to use for light mapping
  1267. @input color the color the lightmap color will be multiplied to
  1268. @output color the resulting color
  1269. }
  1270. Input{
  1271. vec2 texCoord
  1272. sampler2D lightMap
  1273. vec4 color
  1274. }
  1275. Output{
  1276. vec4 color
  1277. }
  1278. }
  1279. }</code></pre>
  1280. </div>
  1281. </div>
  1282. </div>
  1283. <div class="sect2">
  1284. <h3 id="declare-an-array"><a class="anchor" href="#declare-an-array"></a>Declare an array</h3>
  1285. <div class="paragraph">
  1286. <p>To declare an array you have to specify its size between square brackets.<br>
  1287. <strong>Constant size</strong><br>
  1288. The size can be an int constant.<br>
  1289. <em>Example</em></p>
  1290. </div>
  1291. <div class="listingblock">
  1292. <div class="content">
  1293. <pre class="highlightjs highlight"><code class="language-none hljs"> float myArray[10]</code></pre>
  1294. </div>
  1295. </div>
  1296. <div class="paragraph">
  1297. <p>This will declare a float array with 10 elements.
  1298. Any material parameter mapped with this array should be of FloatArray type and it&#8217;s size will be assumed as 10 when the shader is generated.</p>
  1299. </div>
  1300. <div class="paragraph">
  1301. <p><strong>Material parameter driven size</strong><br>
  1302. The size can be dynamic and driven by a material parameter. GLSL does not support non constant values for array declaration so this material parameter will be mapped to a define.<br>
  1303. <em>Example</em></p>
  1304. </div>
  1305. <div class="listingblock">
  1306. <div class="content">
  1307. <pre class="highlightjs highlight"><code class="language-none hljs"> float myArray[NumberOfElements]</code></pre>
  1308. </div>
  1309. </div>
  1310. <div class="paragraph">
  1311. <p>This declares a float array with the size depending on the value of the NumberOfElements material parameter.<br>
  1312. NumberOfElements <strong>HAS</strong> to be declared in the material definition as a material parameter. It will be mapped to a define and used in the shader.</p>
  1313. </div>
  1314. <div class="admonitionblock note">
  1315. <table>
  1316. <tr>
  1317. <td class="icon">
  1318. <i class="fa icon-note" title="Note"></i>
  1319. </td>
  1320. <td class="content">
  1321. <div class="paragraph">
  1322. <p>If this value change the shader will have to be recompiled, due to the fact that it&#8217;s mapped to a define.</p>
  1323. </div>
  1324. </td>
  1325. </tr>
  1326. </table>
  1327. </div>
  1328. </div>
  1329. </div>
  1330. </div>
  1331. <div class="sect1">
  1332. <h2 id="shader-node-code"><a class="anchor" href="#shader-node-code"></a>Shader Node code</h2>
  1333. <div class="sectionbody">
  1334. <div class="paragraph">
  1335. <p>The shader code associated with a Shader node is similar to any shader code.<br>
  1336. The code for a Vertex shader node should be in a .vert file and the code for a Fragment shader node should be in a .frag file.
  1337. It has a declarative part containing variable declaration, function declaration and so on… And a main part that is embed in a &#8220;void main(){}&#8221; block.<br>
  1338. Input and output variables declared in the shader node definition can be used <strong>without</strong> being declared in the shader code. ( they shouldn&#8217;t even or you&#8217;ll have issues).<br>
  1339. Here is a the code of the LightMap.frag shader.</p>
  1340. </div>
  1341. <div class="listingblock">
  1342. <div class="content">
  1343. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">void main(){
  1344. color *= texture2D(lightMap, texCoord);
  1345. }</code></pre>
  1346. </div>
  1347. </div>
  1348. <div class="paragraph">
  1349. <p>Very simple, it&#8217;s just a texture fetch, but of course anything can be done.<br>
  1350. <strong>Do not declare uniforms, attributes or varyings in a shader node code</strong>, the Generator will handle this, just use the inputs and outputs and optional local variables you may need.</p>
  1351. </div>
  1352. </div>
  1353. </div>
  1354. <div class="sect1">
  1355. <h2 id="shader-node-declaration"><a class="anchor" href="#shader-node-declaration"></a>Shader Node declaration</h2>
  1356. <div class="sectionbody">
  1357. <div class="paragraph">
  1358. <p>To create a shader we need to plug shader nodes to each other, but also interact with built in glsl inputs and outputs.
  1359. Shader nodes are declared inside the Technique block. The vertex nodes are declared in the VertexShaderNodes block and the fragment nodes are declared in the FragmentShaderNodes block.<br>
  1360. Note that if the j3md has ember shader nodes definition (in a ShaderNodesDefinitions block) it <strong>must</strong> be declared before the VertexShaderNodes and FragmentShaderNodes blocks.
  1361. Of course there can be several ShaderNode declaration in those block.<br>
  1362. Here is how a ShaderNode declaration should look :</p>
  1363. </div>
  1364. <div class="listingblock">
  1365. <div class="content">
  1366. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">ShaderNode &lt;ShaderNodeName&gt;{
  1367. Definition : &lt;DefinitionName&gt; [: &lt;DefinitionPath&gt;]
  1368. [Condition : &lt;ActivationCondition&gt;]
  1369. InputMapping{
  1370. &lt;InputVariableName&gt;[.&lt;Swizzle&gt;] = &lt;NameSpace&gt;.&lt;VarName&gt;[.&lt;Swizzle&gt;] [: &lt;MappingCondition&gt;]
  1371. [...]
  1372. }
  1373. [OutputMapping{
  1374. &lt;NameSpace&gt;.&lt;VarName&gt;[.&lt;Swizzle&gt;] = &lt;OutputVariableName&gt;[.&lt;Swizzle&gt;] [: &lt;MappingCondition&gt;]
  1375. [...]
  1376. }]
  1377. }</code></pre>
  1378. </div>
  1379. </div>
  1380. <div class="ulist">
  1381. <ul>
  1382. <li>
  1383. <p><u>ShaderNode</u> the shader node block</p>
  1384. <div class="ulist">
  1385. <ul>
  1386. <li>
  1387. <p><strong>ShaderNodeName</strong> the name of this shader node, can be anything, but has to be <strong>unique</strong> in the shader scope.</p>
  1388. </li>
  1389. </ul>
  1390. </div>
  1391. </li>
  1392. <li>
  1393. <p><u>Definition</u> : a reference to the shader node definition.</p>
  1394. <div class="ulist">
  1395. <ul>
  1396. <li>
  1397. <p><strong>DefinitionName</strong> : the name of the definition this Node use. this definition can be declared in the same j3md or in its own j3sn file.</p>
  1398. </li>
  1399. <li>
  1400. <p><strong>DefinitionPath</strong> : in case the definition is declared in it&#8217;s own j3sn file, you have to set the path to this file here.</p>
  1401. </li>
  1402. </ul>
  1403. </div>
  1404. </li>
  1405. <li>
  1406. <p><u>Condition</u> a condition that dictates if the node is active or not.</p>
  1407. <div class="ulist">
  1408. <ul>
  1409. <li>
  1410. <p><strong>ActivationCondition</strong> : The condition for this node to be used. Today we use Defines to use different blocks of code used depending on the state of a Material Parameter. The condition here use the exact same paradigm. A valid condition must be the name of a material parameter or any combinations using logical operators &#8220;||,&#8220;&amp;&amp;&#8221;, &#8220;!&#8221; or grouping characters &#8220;(&#8221; and &#8220;)&#8221;. The generator will create the corresponding define and the shader node code will be embed into and #ifdef statement.</p>
  1411. </li>
  1412. </ul>
  1413. </div>
  1414. </li>
  1415. </ul>
  1416. </div>
  1417. <div class="paragraph">
  1418. <p>For example, let&#8217;s say we have a Color and ColorMap material parameter, this condition &#8220;Color || ColorMap&#8221; will generate this statement :</p>
  1419. </div>
  1420. <div class="listingblock">
  1421. <div class="content">
  1422. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java"> #if defined(COLOR) || defined(COLORMAP)
  1423. ...
  1424. #endif</code></pre>
  1425. </div>
  1426. </div>
  1427. <div class="ulist">
  1428. <ul>
  1429. <li>
  1430. <p><u>InputMapping</u> the wiring of the inputs of this node, coming from previous node&#8217;s outputs or from built in glsl inputs.</p>
  1431. <div class="ulist">
  1432. <ul>
  1433. <li>
  1434. <p><strong>InputVariableName</strong> : the name of the variable to map as declared in the definition.</p>
  1435. </li>
  1436. <li>
  1437. <p><strong>Swizzle</strong> : Swizzling for the preceding variable. More information on glsl swizzling on this page <a href="https://www.khronos.org/opengl/wiki/GLSL_Type">https://www.khronos.org/opengl/wiki/GLSL_Type</a>.</p>
  1438. </li>
  1439. <li>
  1440. <p><strong>NameSpace</strong> : The generator will use variable name space to avoid collision between variable names. Name space can be one of these values :</p>
  1441. <div class="ulist">
  1442. <ul>
  1443. <li>
  1444. <p><strong>MatParam</strong> : the following variable is a Material Parameter declared in the MaterialParameters block of the materialDefinition.</p>
  1445. </li>
  1446. <li>
  1447. <p><strong>WorldParam</strong> : the following variable is a World Parameter declared in the WorldParameters block of the current technique block. World parameters can be one of those declared in this file : <a href="https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/shader/UniformBinding.java">https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/shader/UniformBinding.java</a></p>
  1448. </li>
  1449. <li>
  1450. <p><strong>Attr</strong> : the following variable is a shader attribute. It can be one those declared in the Type enum of the VertexBuffer class <a href="https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java">https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/scene/VertexBuffer.java</a>.</p>
  1451. </li>
  1452. <li>
  1453. <p><strong>Global</strong> : the variable is a global variable to the shader. Global variables will be assign at the end of the shader to glsl built in outputs : gl_Position for the vertex shader, or to one of the possible outputs of the fragment shader (for example gl_FragColor). The global variable can have what ever name pleases you, it will assigned in the order they&#8217;ve been found in the declaration to the shader output. <strong>Global variables can be inputs of a shader node. Global variables are forced to be vec4 and are defaulted to the value of the attribute inPosition in the vertex shader and vec4(1.0)(opaque white color) in the fragment shader</strong>.</p>
  1454. </li>
  1455. <li>
  1456. <p><strong>The name of a previous shader node</strong> : this must be followed by and output variable of a the named shader node. This is what allows one to plug outputs from a node to inputs of another.</p>
  1457. </li>
  1458. </ul>
  1459. </div>
  1460. </li>
  1461. <li>
  1462. <p><strong>VarName</strong> : the name of the variable to assign to the input. This variable must be known in name space declared before.</p>
  1463. </li>
  1464. <li>
  1465. <p><strong>MappingCondition</strong> : Follows the same rules as the activation condition for the shaderNode, this mapping will be embed in a #ifdef statement n the resulting shader.</p>
  1466. </li>
  1467. </ul>
  1468. </div>
  1469. </li>
  1470. <li>
  1471. <p><u>OutputMapping</u> : This block is optional, as mapping of output will be done in input mapping block of following shaderNodes, except if you want to output a value to the Global output of the shader.</p>
  1472. <div class="ulist">
  1473. <ul>
  1474. <li>
  1475. <p><strong>NameSpace</strong> : the name space of the output to assign, this can only be &#8220;Global&#8221; here.</p>
  1476. </li>
  1477. <li>
  1478. <p><strong>VarName</strong> : the name of a global output (can be anything, just be aware that 2 different names result in 2 different outputs).</p>
  1479. </li>
  1480. <li>
  1481. <p><strong>OutputVariable</strong> : Must be an output of the current node&#8217;s definition.</p>
  1482. </li>
  1483. <li>
  1484. <p><strong>MappingCondition</strong> : Same as before.</p>
  1485. </li>
  1486. </ul>
  1487. </div>
  1488. </li>
  1489. </ul>
  1490. </div>
  1491. </div>
  1492. </div>
  1493. <div class="sect1">
  1494. <h2 id="complete-material-definition-and-shader-nodes-example"><a class="anchor" href="#complete-material-definition-and-shader-nodes-example"></a>Complete material definition and Shader Nodes example</h2>
  1495. <div class="sectionbody">
  1496. <div class="paragraph">
  1497. <p>Here is an example of a very simple Material definition that just displays a solid color (controlled by a material parameter) on a mesh.</p>
  1498. </div>
  1499. <div class="admonitionblock important">
  1500. <table>
  1501. <tr>
  1502. <td class="icon">
  1503. <i class="fa icon-important" title="Important"></i>
  1504. </td>
  1505. <td class="content">
  1506. <div class="paragraph">
  1507. <p>Shader Nodes only work if there is no shader declared in the technique. If you want to bypass the Shader Nodes, you can put a VertexShader and a FragmentShader statement in the technique and the shader nodes will be ignored.</p>
  1508. </div>
  1509. </td>
  1510. </tr>
  1511. </table>
  1512. </div>
  1513. <div class="listingblock">
  1514. <div class="content">
  1515. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">MaterialDef Simple {
  1516. MaterialParameters {
  1517. Color Color
  1518. }
  1519. Technique {
  1520. WorldParameters {
  1521. WorldViewProjectionMatrix
  1522. }
  1523. VertexShaderNodes {
  1524. ShaderNode CommonVert {
  1525. Definition : CommonVert : Common/MatDefs/ShaderNodes/Common/CommonVert.j3sn
  1526. InputMappings {
  1527. worldViewProjectionMatrix = WorldParam.WorldViewProjectionMatrix
  1528. modelPosition = Global.position.xyz
  1529. }
  1530. OutputMappings {
  1531. Global.position = projPosition
  1532. }
  1533. }
  1534. }
  1535. FragmentShaderNodes {
  1536. ShaderNode ColorMult {
  1537. Definition : ColorMult : Common/MatDefs/ShaderNodes/Basic/ColorMult.j3sn
  1538. InputMappings {
  1539. color1 = MatParam.Color
  1540. color2 = Global.color
  1541. }
  1542. OutputMappings {
  1543. Global.color = outColor
  1544. }
  1545. }
  1546. }
  1547. }
  1548. }</code></pre>
  1549. </div>
  1550. </div>
  1551. <div class="paragraph">
  1552. <p>This Material definition has one Default technique with 2 node declarations.<br>
  1553. <strong><u>CommonVert Definition</u></strong><br>
  1554. CommonVert is a vertex shader node that has commonly used input and outputs of a vertex shader. It also computes the position of the vertex in projection space.<br>
  1555. Here is the definition content (Common/MatDefs/ShaderNodes/Common/CommonVert.j3sn) :</p>
  1556. </div>
  1557. <div class="listingblock">
  1558. <div class="content">
  1559. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">ShaderNodesDefinitions {
  1560. ShaderNodeDefinition CommonVert {
  1561. Type: Vertex
  1562. Shader GLSL100: Common/MatDefs/ShaderNodes/Common/commonVert.vert
  1563. Documentation {
  1564. This Node is responsible for computing vertex position in projection space.
  1565. It also can pass texture coordinates 1 &amp; 2, and vertexColor to the fragment shader as varying (or inputs for glsl &gt;=1.3)
  1566. @input modelPosition the vertex position in model space (usually assigned with Attr.inPosition or Global.position)
  1567. @input worldViewProjectionMatrix the World View Projection Matrix transforms model space to projection space.
  1568. @input texCoord1 The first texture coordinates of the vertex (usually assigned with Attr.inTexCoord)
  1569. @input texCoord2 The second texture coordinates of the vertex (usually assigned with Attr.inTexCoord2)
  1570. @input vertColor The color of the vertex (usually assigned with Attr.inColor)
  1571. @output projPosition Position of the vertex in projection space.(usually assigned to Global.position)
  1572. @output vec2 texCoord1 The first texture coordinates of the vertex (output as a varying)
  1573. @output vec2 texCoord2 The second texture coordinates of the vertex (output as a varying)
  1574. @output vec4 vertColor The color of the vertex (output as a varying)
  1575. }
  1576. Input{
  1577. vec3 modelPosition
  1578. mat4 worldViewProjectionMatrix
  1579. vec2 texCoord1
  1580. vec2 texCoord2
  1581. vec4 vertColor
  1582. }
  1583. Output{
  1584. vec4 projPosition
  1585. vec2 texCoord1
  1586. vec2 texCoord2
  1587. vec4 vertColor
  1588. }
  1589. }
  1590. }</code></pre>
  1591. </div>
  1592. </div>
  1593. <div class="admonitionblock tip">
  1594. <table>
  1595. <tr>
  1596. <td class="icon">
  1597. <i class="fa icon-tip" title="Tip"></i>
  1598. </td>
  1599. <td class="content">
  1600. <div class="paragraph">
  1601. <p>Note that texCoord1/2 and vertColor are declared both as input and output. The generator will use the same variables for them.</p>
  1602. </div>
  1603. </td>
  1604. </tr>
  1605. </table>
  1606. </div>
  1607. <div class="paragraph">
  1608. <p>Here is the shader Node code ( Common/MatDefs/ShaderNodes/Common/commonVert.vert).</p>
  1609. </div>
  1610. <div class="listingblock">
  1611. <div class="content">
  1612. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">void main(){
  1613. projPosition = worldViewProjectionMatrix * vec4(modelPosition, 1.0);
  1614. }</code></pre>
  1615. </div>
  1616. </div>
  1617. <div class="paragraph">
  1618. <p>As you can see all the inputs and outputs are not used. That&#8217;s because most of them are attributes meant to be passed to the fragment shader as varyings. All the wiring will be handled by the generator only if those variables are used in an input or output mapping.</p>
  1619. </div>
  1620. <div class="paragraph">
  1621. <p><strong><u>CommonVert input mapping</u></strong><br>
  1622. Here we have the most basic yet mandatory thing in a vertex shader, computing vertex position in projection space. For this we have 2 mappings :</p>
  1623. </div>
  1624. <div class="ulist">
  1625. <ul>
  1626. <li>
  1627. <p><strong>worldViewProjectionMatrix = WorldParam.WorldViewProjectionMatrix</strong> : the input parameter worldViewProjectionMatrix is assigned with the WorldViewProjectionMatrix World parameter declared in the WorldParameters block of the technique.</p>
  1628. </li>
  1629. <li>
  1630. <p><strong>modelPosition = Global.position.xyz</strong> : the modelPosition (understand the vertex position in the model coordinate space) is assigned with the Global position variable.</p>
  1631. </li>
  1632. </ul>
  1633. </div>
  1634. <div class="admonitionblock tip">
  1635. <table>
  1636. <tr>
  1637. <td class="icon">
  1638. <i class="fa icon-tip" title="Tip"></i>
  1639. </td>
  1640. <td class="content">
  1641. <div class="paragraph">
  1642. <p>As mentioned before Global position is initialized with the attribute inPosition, so this is equivalent to :</p>
  1643. </div>
  1644. <div class="listingblock">
  1645. <div class="content">
  1646. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">modelPosition = Attr.inPosition.xyz</code></pre>
  1647. </div>
  1648. </div>
  1649. </td>
  1650. </tr>
  1651. </table>
  1652. </div>
  1653. <div class="admonitionblock tip">
  1654. <table>
  1655. <tr>
  1656. <td class="icon">
  1657. <i class="fa icon-tip" title="Tip"></i>
  1658. </td>
  1659. <td class="content">
  1660. <div class="paragraph">
  1661. <p>Also note the swizzle of the Global.position variable. ModelPosition is a vec3 and GlobalPosition is a vec4 so we just take the first 3 components.</p>
  1662. </div>
  1663. </td>
  1664. </tr>
  1665. </table>
  1666. </div>
  1667. <div class="paragraph">
  1668. <p><strong><u>CommonVert output mapping</u></strong><br></p>
  1669. </div>
  1670. <div class="ulist">
  1671. <ul>
  1672. <li>
  1673. <p><strong>Global.position = projPosition</strong> : The result of the multiplication of the worldViewProjectionMatrix and the modelPosition is assigned to the Global position.</p>
  1674. </li>
  1675. </ul>
  1676. </div>
  1677. <div class="admonitionblock tip">
  1678. <table>
  1679. <tr>
  1680. <td class="icon">
  1681. <i class="fa icon-tip" title="Tip"></i>
  1682. </td>
  1683. <td class="content">
  1684. <div class="paragraph">
  1685. <p>The Global.position variable will be assigned to the gl_Position glsl built in output at the end of the shader.</p>
  1686. </div>
  1687. </td>
  1688. </tr>
  1689. </table>
  1690. </div>
  1691. <div class="paragraph">
  1692. <p><strong><u>ColorMult Definition</u></strong><br>
  1693. ColorMult is a very basic Shader Node that takes two colors as input and multiply them.
  1694. Here is the definition content (Common/MatDefs/ShaderNodes/Basic/ColorMult.j3sn) :</p>
  1695. </div>
  1696. <div class="listingblock">
  1697. <div class="content">
  1698. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">ShaderNodeDefinitions{
  1699. ShaderNodeDefinition ColorMult {
  1700. Type: Fragment
  1701. Shader GLSL100: Common/MatDefs/ShaderNodes/Basic/colorMult.frag
  1702. Documentation{
  1703. Multiplies two colors
  1704. @input color1 the first color
  1705. @input color2 the second color
  1706. @output outColor the resulting color
  1707. }
  1708. Input {
  1709. vec4 color1
  1710. vec4 color2
  1711. }
  1712. Output {
  1713. vec4 outColor
  1714. }
  1715. }
  1716. }</code></pre>
  1717. </div>
  1718. </div>
  1719. <div class="paragraph">
  1720. <p>Here is the shader Node code (Common/MatDefs/ShaderNodes/Basic/colorMult.frag).</p>
  1721. </div>
  1722. <div class="listingblock">
  1723. <div class="content">
  1724. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">void main(){
  1725. outColor = color1 * color2;
  1726. }</code></pre>
  1727. </div>
  1728. </div>
  1729. <div class="paragraph">
  1730. <p><strong><u>ColorMult input mapping</u></strong><br>
  1731. All inputs are mapped here :</p>
  1732. </div>
  1733. <div class="ulist">
  1734. <ul>
  1735. <li>
  1736. <p><strong>color1 = MatParam.Color</strong> : The first color is assigned to the Color Material parameter declared in the MaterialParameter block of the material definition.</p>
  1737. </li>
  1738. <li>
  1739. <p><strong>color2 = Global.color</strong> : The second color is assigned with the Global color variable. this is defaulted to vec4(1.0) (opaque white).</p>
  1740. </li>
  1741. </ul>
  1742. </div>
  1743. <div class="admonitionblock note">
  1744. <table>
  1745. <tr>
  1746. <td class="icon">
  1747. <i class="fa icon-note" title="Note"></i>
  1748. </td>
  1749. <td class="content">
  1750. <div class="paragraph">
  1751. <p>In a very complex material def this variable could already have been assigned with a previous Shader Node output.</p>
  1752. </div>
  1753. </td>
  1754. </tr>
  1755. </table>
  1756. </div>
  1757. <div class="paragraph">
  1758. <p><strong><u>ColorMult output mapping</u></strong><br></p>
  1759. </div>
  1760. <div class="ulist">
  1761. <ul>
  1762. <li>
  1763. <p><strong>Global.color = outColor</strong> : the resulting color is assigned to the Global color variable.</p>
  1764. </li>
  1765. </ul>
  1766. </div>
  1767. <div class="admonitionblock tip">
  1768. <table>
  1769. <tr>
  1770. <td class="icon">
  1771. <i class="fa icon-tip" title="Tip"></i>
  1772. </td>
  1773. <td class="content">
  1774. <div class="paragraph">
  1775. <p>Note that the Global.color variable will be assigned to gl_FragColor (glsl &lt; 1.5) or declared as a Global output of the shader (glsl &gt;= 1.5).</p>
  1776. </div>
  1777. </td>
  1778. </tr>
  1779. </table>
  1780. </div>
  1781. <div class="admonitionblock tip">
  1782. <table>
  1783. <tr>
  1784. <td class="icon">
  1785. <i class="fa icon-tip" title="Tip"></i>
  1786. </td>
  1787. <td class="content">
  1788. <div class="paragraph">
  1789. <p>Also note that in case several Global variables are declared, the generator will assign them gl_FragData[i](glsl &lt; 1.5) i being the order the variable has been found in the material def. For glsl &gt;= 1.5 the variable will just all be declared as shader output in the order they&#8217;ve been found in the declaration.</p>
  1790. </div>
  1791. </td>
  1792. </tr>
  1793. </table>
  1794. </div>
  1795. <div class="paragraph">
  1796. <p><strong><u>Generated shader code</u></strong></p>
  1797. </div>
  1798. <div class="admonitionblock important">
  1799. <table>
  1800. <tr>
  1801. <td class="icon">
  1802. <i class="fa icon-important" title="Important"></i>
  1803. </td>
  1804. <td class="content">
  1805. <div class="paragraph">
  1806. <p>Don&#8217;t take this code as carved in stone, the generated code can change as optimization of the shader generator goes on.</p>
  1807. </div>
  1808. </td>
  1809. </tr>
  1810. </table>
  1811. </div>
  1812. <div class="paragraph">
  1813. <p>Vertex Shader (glsl 1.0)</p>
  1814. </div>
  1815. <div class="listingblock">
  1816. <div class="content">
  1817. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">uniform mat4 g_WorldViewProjectionMatrix;
  1818. attribute vec4 inPosition;
  1819. void main(){
  1820. vec4 Global_position = inPosition;
  1821. //CommonVert : Begin
  1822. vec3 CommonVert_modelPosition = Global_position.xyz;
  1823. vec4 CommonVert_projPosition;
  1824. vec2 CommonVert_texCoord1;
  1825. vec2 CommonVert_texCoord2;
  1826. vec4 CommonVert_vertColor;
  1827. CommonVert_projPosition = g_WorldViewProjectionMatrix * vec4(CommonVert_modelPosition, 1.0);
  1828. Global_position = CommonVert_projPosition;
  1829. //CommonVert : End
  1830. gl_Position = Global_position;
  1831. }</code></pre>
  1832. </div>
  1833. </div>
  1834. <div class="paragraph">
  1835. <p>All materials parameter, world parameters, attributes varying are declared first. then for each shader node, the declarative part is appended.<br>
  1836. For the main function, for each shader node, the input mappings are declared and assigned, the output are declared.<br>
  1837. Then the variable names are replaced in the sahder node code with there complete name (NameSpace_varName), material parameters are replaced in the shader code as is.<br>
  1838. Then, the output are mapped.</p>
  1839. </div>
  1840. <div class="paragraph">
  1841. <p>As you can see texCoord1/2 and vertColor are declared but never used. That&#8217;s because the generator is not aware of that. By default it will declare all inputs in case they are used in the shaderNode code.
  1842. Note that most glsl compiler will optimize this when compiling the shader on the GPU.</p>
  1843. </div>
  1844. <div class="paragraph">
  1845. <p>Fragment Shader (glsl 1.0)</p>
  1846. </div>
  1847. <div class="listingblock">
  1848. <div class="content">
  1849. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">uniform vec4 m_Color;
  1850. void main(){
  1851. vec4 Global_color = vec4(1.0);
  1852. //ColorMult : Begin
  1853. vec4 ColorMult_color2 = Global_color;
  1854. vec4 ColorMult_outColor;
  1855. ColorMult_outColor = m_Color * ColorMult_color2;
  1856. Global_color = ColorMult_outColor;
  1857. //ColorMult : End
  1858. gl_FragColor = Global_color;
  1859. }</code></pre>
  1860. </div>
  1861. </div>
  1862. <div class="paragraph">
  1863. <p>Same as for the Vertex shader. Note that the color1 is not declared, because it&#8217;s directly replaced by the material parameter.</p>
  1864. </div>
  1865. <div class="admonitionblock important">
  1866. <table>
  1867. <tr>
  1868. <td class="icon">
  1869. <i class="fa icon-important" title="Important"></i>
  1870. </td>
  1871. <td class="content">
  1872. <div class="paragraph">
  1873. <p>As a rule of thumb you should not assign a value to an input. Inputs are likely to be material parameters or outputs from other shaders and modifying them may cause unexpected behavior, even failure in your resulting shader.</p>
  1874. </div>
  1875. </td>
  1876. </tr>
  1877. </table>
  1878. </div>
  1879. <div class="paragraph">
  1880. <p>For more explanations and design decisions please refer to the <abbr title="specification">spec</abbr> here
  1881. <a href="https://docs.google.com/document/d/1S6xO3d1TBz0xcKe_MPTqY9V-QI59AKdg1OGy3U-HeVY/edit?usp=sharing">https://docs.google.com/document/d/1S6xO3d1TBz0xcKe_MPTqY9V-QI59AKdg1OGy3U-HeVY/edit?usp=sharing</a>.</p>
  1882. </div>
  1883. <div class="paragraph">
  1884. <p>Thank you for the brave ones that came through all this reading. I&#8217;m not gonna offer you a prize in exchange of a password, because we ran out of JME thongs…</p>
  1885. </div>
  1886. </div>
  1887. </div>
  1888. <nav class="pagination">
  1889. <span class="prev"><a href="jme3_shaders.html">Shaders and JME3</a></span>
  1890. <span class="next"><a href="shader_video_tutorials.html">Shader Video Tutorials</a></span>
  1891. </nav>
  1892. </article>
  1893. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  1894. <div class="toc-menu"></div>
  1895. </aside>
  1896. </div>
  1897. </main>
  1898. </div>
  1899. <footer class="footer">
  1900. <p>Copyright 2020 jMonkeyEngine Wiki Contributors. Licensed BSD-3.</p>
  1901. </footer>
  1902. <script src="../../../../_/js/vendor/docsearch.min.js"></script>
  1903. <!-- fetched from https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js -->
  1904. <script>
  1905. var search = docsearch({
  1906. apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
  1907. indexName: 'jmonkeyengine',
  1908. inputSelector: '#search-input',
  1909. autocompleteOptions: { hint: false, keyboardShortcuts: ['s'] },
  1910. algoliaOptions: { hitsPerPage: 10 }
  1911. }).autocomplete
  1912. search.on('autocomplete:closed', function () { search.autocomplete.setVal() })
  1913. function focusSearchInput () { document.querySelector('#search-input').focus() }
  1914. if (document.querySelector('.home-link.is-current')) window.addEventListener('load', focusSearchInput)
  1915. </script>
  1916. <script src="../../../../_/js/site.js"></script>
  1917. <script async src="../../../../_/js/vendor/highlight.js"></script>
  1918. </body>
  1919. </html>