shaderblow.html 60 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660
  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>ShaderBlow :: jMonkeyEngine Docs</title>
  7. <link rel="canonical" href="https://wiki.jmonkeyengine.org/docs/sdk/plugin/shaderblow.html">
  8. <meta name="generator" content="Antora 2.3.3">
  9. <link rel="stylesheet" href="../../../_/css/site.css">
  10. </head>
  11. <body class="article">
  12. <header class="header">
  13. <nav class="navbar">
  14. <div class="navbar-brand">
  15. <a class="navbar-item" href="https://wiki.jmonkeyengine.org">jMonkeyEngine Docs</a>
  16. <button class="navbar-burger" data-target="topbar-nav">
  17. <span></span>
  18. <span></span>
  19. <span></span>
  20. </button>
  21. </div>
  22. <div id="topbar-nav" class="navbar-menu">
  23. <div class="navbar-end">
  24. <a class="navbar-item" href="#">Home</a>
  25. <div class="navbar-item has-dropdown is-hoverable">
  26. <a class="navbar-link" href="#">Products</a>
  27. <div class="navbar-dropdown">
  28. <a class="navbar-item" href="#">Product A</a>
  29. <a class="navbar-item" href="#">Product B</a>
  30. <a class="navbar-item" href="#">Product C</a>
  31. </div>
  32. </div>
  33. <div class="navbar-item has-dropdown is-hoverable">
  34. <a class="navbar-link" href="#">Services</a>
  35. <div class="navbar-dropdown">
  36. <a class="navbar-item" href="#">Service A</a>
  37. <a class="navbar-item" href="#">Service B</a>
  38. <a class="navbar-item" href="#">Service C</a>
  39. </div>
  40. </div>
  41. <div class="navbar-item has-dropdown is-hoverable">
  42. <a class="navbar-link" href="#">Resources</a>
  43. <div class="navbar-dropdown">
  44. <a class="navbar-item" href="#">Resource A</a>
  45. <a class="navbar-item" href="#">Resource B</a>
  46. <a class="navbar-item" href="#">Resource C</a>
  47. </div>
  48. </div>
  49. <div class="navbar-item">
  50. <span class="control">
  51. <a class="button is-primary" href="#">Download</a>
  52. </span>
  53. </div>
  54. </div>
  55. </div>
  56. </nav>
  57. </header>
  58. <div class="body">
  59. <div class="nav-container" data-component="docs" data-version="master">
  60. <aside class="nav">
  61. <div class="panels">
  62. <div class="nav-panel-menu is-active" data-panel="menu">
  63. <nav class="nav-menu">
  64. <h3 class="title"><a href="../../jme3.html">Docs</a></h3>
  65. <ul class="nav-list">
  66. <li class="nav-item" data-depth="0">
  67. <ul class="nav-list">
  68. <li class="nav-item" data-depth="1">
  69. <a class="nav-link" href="../../documentation.html">Getting Started</a>
  70. </li>
  71. <li class="nav-item" data-depth="1">
  72. <a class="nav-link" href="https://javadoc.jmonkeyengine.org/v3.3.2-stable">JavaDoc</a>
  73. </li>
  74. <li class="nav-item" data-depth="1">
  75. <button class="nav-item-toggle"></button>
  76. <a class="nav-link" href="../../jme3.html">jMonkeyEngine 3</a>
  77. <ul class="nav-list">
  78. <li class="nav-item" data-depth="2">
  79. <button class="nav-item-toggle"></button>
  80. <span class="nav-text">Beginner Tutorials</span>
  81. <ul class="nav-list">
  82. <li class="nav-item" data-depth="3">
  83. <a class="nav-link" href="../../jme3/beginner/hello_simpleapplication.html">Hello SimpleApplication</a>
  84. </li>
  85. <li class="nav-item" data-depth="3">
  86. <a class="nav-link" href="../../jme3/beginner/hello_node.html">Hello Node</a>
  87. </li>
  88. <li class="nav-item" data-depth="3">
  89. <a class="nav-link" href="../../jme3/beginner/hello_asset.html">Hello Asset</a>
  90. </li>
  91. <li class="nav-item" data-depth="3">
  92. <a class="nav-link" href="../../jme3/beginner/hello_main_event_loop.html">Hello Main Event Loop</a>
  93. </li>
  94. <li class="nav-item" data-depth="3">
  95. <a class="nav-link" href="../../jme3/beginner/hello_input_system.html">Hello Input System</a>
  96. </li>
  97. <li class="nav-item" data-depth="3">
  98. <a class="nav-link" href="../../jme3/beginner/hello_material.html">Hello Material</a>
  99. </li>
  100. <li class="nav-item" data-depth="3">
  101. <a class="nav-link" href="../../jme3/beginner/hello_animation.html">Hello Animation</a>
  102. </li>
  103. <li class="nav-item" data-depth="3">
  104. <a class="nav-link" href="../../jme3/beginner/hello_picking.html">Hello Picking</a>
  105. </li>
  106. <li class="nav-item" data-depth="3">
  107. <a class="nav-link" href="../../jme3/beginner/hello_collision.html">Hello Collision</a>
  108. </li>
  109. <li class="nav-item" data-depth="3">
  110. <a class="nav-link" href="../../jme3/beginner/hello_terrain.html">Hello Terrain</a>
  111. </li>
  112. <li class="nav-item" data-depth="3">
  113. <a class="nav-link" href="../../jme3/beginner/hello_audio.html">Hello Audio</a>
  114. </li>
  115. <li class="nav-item" data-depth="3">
  116. <a class="nav-link" href="../../jme3/beginner/hello_effects.html">Hello Effects</a>
  117. </li>
  118. <li class="nav-item" data-depth="3">
  119. <a class="nav-link" href="../../jme3/beginner/hello_physics.html">Hello Physics</a>
  120. </li>
  121. </ul>
  122. </li>
  123. <li class="nav-item" data-depth="2">
  124. <button class="nav-item-toggle"></button>
  125. <span class="nav-text">Intermediate Tutorials</span>
  126. <ul class="nav-list">
  127. <li class="nav-item" data-depth="3">
  128. <button class="nav-item-toggle"></button>
  129. <span class="nav-text">Concepts</span>
  130. <ul class="nav-list">
  131. <li class="nav-item" data-depth="4">
  132. <a class="nav-link" href="../../jme3/intermediate/best_practices.html">Best Practices</a>
  133. </li>
  134. <li class="nav-item" data-depth="4">
  135. <a class="nav-link" href="../../jme3/intermediate/simpleapplication.html">Simple Application</a>
  136. </li>
  137. <li class="nav-item" data-depth="4">
  138. <a class="nav-link" href="../../jme3/features.html">Features</a>
  139. </li>
  140. <li class="nav-item" data-depth="4">
  141. <a class="nav-link" href="../../jme3/intermediate/optimization.html">Optimization</a>
  142. </li>
  143. <li class="nav-item" data-depth="4">
  144. <a class="nav-link" href="../../jme3/faq.html">FAQ</a>
  145. </li>
  146. </ul>
  147. </li>
  148. <li class="nav-item" data-depth="3">
  149. <button class="nav-item-toggle"></button>
  150. <span class="nav-text">Math Concepts</span>
  151. <ul class="nav-list">
  152. <li class="nav-item" data-depth="4">
  153. <a class="nav-link" href="../../jme3/math_for_dummies.html">Math For Dummies</a>
  154. </li>
  155. <li class="nav-item" data-depth="4">
  156. <a class="nav-link" href="../../jme3/intermediate/math.html">Math</a>
  157. </li>
  158. <li class="nav-item" data-depth="4">
  159. <a class="nav-link" href="../../jme3/math.html">More Math</a>
  160. </li>
  161. <li class="nav-item" data-depth="4">
  162. <a class="nav-link" href="../../jme3/rotate.html">Rotate</a>
  163. </li>
  164. <li class="nav-item" data-depth="4">
  165. <a class="nav-link" href="../../jme3/math_video_tutorials.html">Math Video Tutorials</a>
  166. </li>
  167. </ul>
  168. </li>
  169. <li class="nav-item" data-depth="3">
  170. <button class="nav-item-toggle"></button>
  171. <span class="nav-text">3D Graphics Concepts</span>
  172. <ul class="nav-list">
  173. <li class="nav-item" data-depth="4">
  174. <a class="nav-link" href="../../jme3/intermediate/multi-media_asset_pipeline.html">Multi-Media Asset Pipeline</a>
  175. </li>
  176. <li class="nav-item" data-depth="4">
  177. <a class="nav-link" href="../../jme3/scenegraph_for_dummies.html">Scenegraph for Dummies</a>
  178. </li>
  179. <li class="nav-item" data-depth="4">
  180. <a class="nav-link" href="../../jme3/beginner/hellovector.html">Hello Vector</a>
  181. </li>
  182. <li class="nav-item" data-depth="4">
  183. <a class="nav-link" href="../../jme3/terminology.html">Terminology</a>
  184. </li>
  185. <li class="nav-item" data-depth="4">
  186. <a class="nav-link" href="../../jme3/intermediate/how_to_use_materials.html">How to Use Materials</a>
  187. </li>
  188. <li class="nav-item" data-depth="4">
  189. <a class="nav-link" href="../../jme3/intermediate/transparency_sorting.html">Transparency and Sorting</a>
  190. </li>
  191. <li class="nav-item" data-depth="4">
  192. <a class="nav-link" href="../../jme3/external/blender.html">Importing from Blender</a>
  193. </li>
  194. <li class="nav-item" data-depth="4">
  195. <a class="nav-link" href="../../jme3/external/3dsmax.html">Importing from 3DS Max</a>
  196. </li>
  197. </ul>
  198. </li>
  199. </ul>
  200. </li>
  201. </ul>
  202. </li>
  203. <li class="nav-item" data-depth="1">
  204. <a class="nav-link" href="../../logo.html">Logo Usage</a>
  205. </li>
  206. <li class="nav-item" data-depth="1">
  207. <a class="nav-link" href="../../bsd_license.html">License</a>
  208. </li>
  209. <li class="nav-item" data-depth="1">
  210. <a class="nav-link" href="../../github_tips.html">Github Tips</a>
  211. </li>
  212. </ul>
  213. </li>
  214. <li class="nav-item" data-depth="0">
  215. <button class="nav-item-toggle"></button>
  216. <span class="nav-text">SDK</span>
  217. <ul class="nav-list">
  218. <li class="nav-item" data-depth="1">
  219. <a class="nav-link" href="../../sdk.html">jMonkeyEngine SDK</a>
  220. </li>
  221. </ul>
  222. </li>
  223. </ul>
  224. </nav>
  225. </div>
  226. <div class="nav-panel-explore" data-panel="explore">
  227. <div class="context">
  228. <span class="title">Docs</span>
  229. <span class="version">master</span>
  230. </div>
  231. <ul class="components">
  232. <li class="component is-current">
  233. <span class="title">Docs</span>
  234. <ul class="versions">
  235. <li class="version is-current is-latest">
  236. <a href="../../jme3.html">master</a>
  237. </li>
  238. </ul>
  239. </li>
  240. <li class="component">
  241. <span class="title">Wiki UI</span>
  242. <ul class="versions">
  243. <li class="version is-latest">
  244. <a href="../../../wiki-ui/index.html">master</a>
  245. </li>
  246. </ul>
  247. </li>
  248. </ul>
  249. </div>
  250. </div>
  251. </aside>
  252. </div>
  253. <main class="article">
  254. <div class="toolbar" role="navigation">
  255. <button class="nav-toggle"></button>
  256. <a href="../../documentation.html" class="home-link"></a>
  257. <nav class="breadcrumbs" aria-label="breadcrumbs">
  258. <ul>
  259. <li><a href="../../jme3.html">Docs</a></li>
  260. <li><a href="shaderblow.html">ShaderBlow</a></li>
  261. </ul>
  262. </nav>
  263. <div class="edit-this-page"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/docs/modules/ROOT/pages/sdk/plugin/shaderblow.adoc">Edit this Page</a></div>
  264. </div>
  265. <div class="content">
  266. <article class="doc">
  267. <h1 class="page">ShaderBlow</h1>
  268. <div id="preamble">
  269. <div class="sectionbody">
  270. <div class="paragraph">
  271. <p><span class="image"><img src="../../_images/sdk/plugin/shaderblow_intro_01.jpg" alt="shaderblow_intro_01.jpg" width="" height=""></span></p>
  272. </div>
  273. <div class="paragraph">
  274. <p>Collections of effects for jMonkeyEngine 3. To install the ShaderBlow plugin into the jMonkeyEngine SDK, go to Tools→Plugins→Available Plugins.
  275. You can always get the source of ShaderBlow project here:
  276. <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib">ShaderBlow project Github</a></p>
  277. </div>
  278. <div class="paragraph">
  279. <p>The source has many examples and tests to explain the capacity of shaders much better.</p>
  280. </div>
  281. <div class="ulist">
  282. <ul>
  283. <li>
  284. <p>Filters:</p>
  285. <div class="ulist">
  286. <ul>
  287. <li>
  288. <p>Basic SSAO</p>
  289. </li>
  290. <li>
  291. <p>ColorScale (added by @H)</p>
  292. </li>
  293. <li>
  294. <p>GrayScale (added by @H)</p>
  295. </li>
  296. <li>
  297. <p>Simple Refraction (added by @mifth)</p>
  298. </li>
  299. <li>
  300. <p>Old Film Effect (added by @H)</p>
  301. </li>
  302. <li>
  303. <p>Night Vision (added by @wezrule)</p>
  304. </li>
  305. <li>
  306. <p>Predator Thermal Vision (added by @wezrule)</p>
  307. </li>
  308. <li>
  309. <p>Frosted Glass effect (added by @wezrule)</p>
  310. </li>
  311. </ul>
  312. </div>
  313. </li>
  314. <li>
  315. <p>Shaders</p>
  316. <div class="ulist">
  317. <ul>
  318. <li>
  319. <p>Dissolver (added by @thetoucher)</p>
  320. </li>
  321. <li>
  322. <p>FakeParticleBlow (added by @mifth)</p>
  323. </li>
  324. <li>
  325. <p>Forceshield (added by @ficik)</p>
  326. </li>
  327. <li>
  328. <p>MatCap (added by @mifth)</p>
  329. </li>
  330. <li>
  331. <p>Glass (added by @mifth)</p>
  332. </li>
  333. <li>
  334. <p>Texture Bombing (added by @wezrule)</p>
  335. </li>
  336. </ul>
  337. </div>
  338. </li>
  339. </ul>
  340. </div>
  341. <div class="admonitionblock note">
  342. <table>
  343. <tr>
  344. <td class="icon">
  345. <i class="fa icon-note" title="Note"></i>
  346. </td>
  347. <td class="content">
  348. <div class="paragraph">
  349. <p>Official Forum: <a href="https://hub.jmonkeyengine.org/t/shaderblow-project/26655">https://hub.jmonkeyengine.org/forum/t/shaderblow-project/26655</a>
  350. Or you can use the forum threads of shaders.</p>
  351. </div>
  352. </td>
  353. </tr>
  354. </table>
  355. </div>
  356. <hr>
  357. </div>
  358. </div>
  359. <div class="sect1">
  360. <h2 id="colorscale-filter"><a class="anchor" href="#colorscale-filter"></a>ColorScale Filter</h2>
  361. <div class="sectionbody">
  362. <div class="paragraph">
  363. <p>The ColorScale filter applys a color to the render image. You can use this filter to tint the render according to one particular color without change any material (underwater scene, night scene, fire scene) or to achieve fade-in/fade-out effect.</p>
  364. </div>
  365. <div class="paragraph">
  366. <p>Features:</p>
  367. </div>
  368. <div class="ulist">
  369. <ul>
  370. <li>
  371. <p>Allow to set the color to apply. Default is red.</p>
  372. </li>
  373. <li>
  374. <p>Allow to set intensity of the color. Default is 0.7f. Frag shader clamps color intensity between 0 and 1.</p>
  375. </li>
  376. </ul>
  377. </div>
  378. <table class="tableblock frame-all grid-all stretch">
  379. <colgroup>
  380. <col style="width: 50%;">
  381. <col style="width: 50%;">
  382. </colgroup>
  383. <tbody>
  384. <tr>
  385. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  386. <p><span class="image"><img src="../../_images/sdk/plugin/colorfilter2.png" alt="ColorScale Filter OFF" width="400" height=""></span></p>
  387. </div></div></td>
  388. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  389. <p><span class="image"><img src="../../_images/sdk/plugin/colorfilter1.png" alt="ColorScale filter ON" width="400" height=""></span></p>
  390. </div></div></td>
  391. </tr>
  392. <tr>
  393. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  394. <p><span class="image"><img src="../../_images/sdk/plugin/colorfilter3.png" alt="ColorScale Filter ON" width="400" height=""></span></p>
  395. </div></div></td>
  396. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  397. <p><span class="image"><img src="../../_images/sdk/plugin/colorfilter4.png" alt="ColorScale Filter" width="400" height=""></span></p>
  398. </div></div></td>
  399. </tr>
  400. </tbody>
  401. </table>
  402. <div class="sect2">
  403. <h3 id="usage"><a class="anchor" href="#usage"></a>Usage</h3>
  404. <div class="paragraph">
  405. <p>Add a <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/src/com/shaderblow/filter/colorscale/ColorScaleFilter.java">ColorScaleFilter</a> instance to a FilterPostProccesor instance. Set color and color intensity. Then add the FilterPostProccesor instance to Application&#8217;s viewPort attribute.</p>
  406. </div>
  407. <div class="listingblock">
  408. <div class="content">
  409. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">this.fpp = new FilterPostProcessor(this.assetManager);
  410. this.fpp.setNumSamples(4);
  411. this.colorScale = new ColorScaleFilter();
  412. this.fpp.addFilter(this.colorScale);
  413. // colorScale.setFilterColor(ColorRGBA.Red.clone()); // Set Filter color
  414. // colorScale.setColorDensity(0.5f); // Set Color intensity (between 0 and 1);
  415. this.viewPort.addProcessor(this.fpp);</code></pre>
  416. </div>
  417. </div>
  418. <div class="paragraph">
  419. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/color/TestColorScale.java">TestCase</a></p>
  420. </div>
  421. <div class="paragraph">
  422. <p><a href="https://hub.jmonkeyengine.org/t/colorscale-filter-added-to-shaderblow/23995">Forum thread</a></p>
  423. </div>
  424. <hr>
  425. </div>
  426. </div>
  427. </div>
  428. <div class="sect1">
  429. <h2 id="grayscale-filter"><a class="anchor" href="#grayscale-filter"></a>GrayScale Filter</h2>
  430. <div class="sectionbody">
  431. <div class="paragraph">
  432. <p>The GrayScale filter converts the render image to grayscale.</p>
  433. </div>
  434. <table class="tableblock frame-all grid-all stretch">
  435. <colgroup>
  436. <col style="width: 50%;">
  437. <col style="width: 50%;">
  438. </colgroup>
  439. <thead>
  440. <tr>
  441. <th class="tableblock halign-left valign-top"><strong>GrayScale Filter OFF</strong></th>
  442. <th class="tableblock halign-left valign-top"><strong>GrayScale Filter ON</strong></th>
  443. </tr>
  444. </thead>
  445. <tbody>
  446. <tr>
  447. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  448. <p><span class="image"><img src="../../_images/sdk/plugin/grayscalefilter-off.jpg" alt="GrayScale Filter OFF" width="400" height=""></span></p>
  449. </div></div></td>
  450. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  451. <p><span class="image"><img src="../../_images/sdk/plugin/grayscalefilter-on.png" alt="GrayScale Filter ON" width="400" height=""></span></p>
  452. </div></div></td>
  453. </tr>
  454. </tbody>
  455. </table>
  456. <div class="sect2">
  457. <h3 id="usage-2"><a class="anchor" href="#usage-2"></a>Usage</h3>
  458. <div class="paragraph">
  459. <p>Add a <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/src/com/shaderblow/filter/grayscale/GrayScaleFilter.java">GrayScaleFilter</a> instance to a FilterPostProccesor instance. Then add the FilterPostProccesor instance to Application&#8217;s viewPort attribute.</p>
  460. </div>
  461. <div class="listingblock">
  462. <div class="content">
  463. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">this.fpp = new FilterPostProcessor(this.assetManager); // Create FilterPostProcessor instance
  464. this.grayScale = new GrayScaleFilter(); // Create GrayScaleFilter instance
  465. this.fpp.addFilter(this.grayScale); // Add GrayScaleFilter instance to FilterPostProcessor instance
  466. this.viewPort.addProcessor(this.fpp); // Add FilterPostProcessor instance to ViewPort</code></pre>
  467. </div>
  468. </div>
  469. <div class="paragraph">
  470. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/grayscale/TestGrayScale.java">TestCase</a></p>
  471. </div>
  472. <div class="paragraph">
  473. <p><a href="https://hub.jmonkeyengine.org/t/solved-grayscale-filter/23656">Forum thread</a></p>
  474. </div>
  475. <hr>
  476. </div>
  477. </div>
  478. </div>
  479. <div class="sect1">
  480. <h2 id="old-film-effect-filter"><a class="anchor" href="#old-film-effect-filter"></a>Old Film Effect Filter</h2>
  481. <div class="sectionbody">
  482. <div class="paragraph">
  483. <p>Old Film filter simulate the effect of a classic looking film effect. It&#8217;s a port of this <a href="http://devmaster.net/posts/2989/shader-effects-old-film">shader effect</a>.</p>
  484. </div>
  485. <div class="paragraph">
  486. <p>Features:</p>
  487. </div>
  488. <div class="ulist">
  489. <ul>
  490. <li>
  491. <p>Allow to set the <strong>filter&#8217;s color</strong>. Default is sepia (ColorRGBA(112f / 255f, 66f / 255f, 20f / 255f, 1.0f)).</p>
  492. </li>
  493. <li>
  494. <p>Allow to set the <strong>color&#8217;s density</strong>. Default is 0.7. Shader clamps this value between 0 to 1. The color image gets grayscale when color&#8217;s densite is set to 0.</p>
  495. </li>
  496. <li>
  497. <p>Allow to set the <strong>noise&#8217;s density</strong>. Default is 0.4. Shader clamps this value between 0 to 1.</p>
  498. </li>
  499. <li>
  500. <p>Allow to set the <strong>scratches' density</strong>. Default is 0.3. Shader clamps this value between 0 to 1.</p>
  501. </li>
  502. <li>
  503. <p>Allow to set the <strong>vignetting&#8217;s diameter</strong>. Default is 0.9. Shader clamps this value between 0 to 1.4. Vignetting effect is made using two circles. The inner circle represents the region untouched by vignetting. The region between the inner and outer circle represent the area where vignetting starts to take place, which is a gradual fade to black from the inner to outer ring. Any part of the frame outside of the outer ring would be completely black.</p>
  504. </li>
  505. </ul>
  506. </div>
  507. <div class="admonitionblock note">
  508. <table>
  509. <tr>
  510. <td class="icon">
  511. <i class="fa icon-note" title="Note"></i>
  512. </td>
  513. <td class="content">
  514. <div class="paragraph">
  515. <p>I chose to clamp this value inside the frag shader code instead of using java code because I thought this way is faster (better from preformace point of view). You can clamp this values using java code if you want.</p>
  516. </div>
  517. </td>
  518. </tr>
  519. </table>
  520. </div>
  521. <table class="tableblock frame-all grid-all stretch">
  522. <caption class="title">YouTube</caption>
  523. <colgroup>
  524. <col style="width: 50%;">
  525. <col style="width: 50%;">
  526. </colgroup>
  527. <tbody>
  528. <tr>
  529. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  530. <div class="title">Old Film Effect</div>
  531. <p><span class="image"><a class="image" href="https://youtu.be/CgFzhkq-MKk"><img src="../../_images/sdk/plugin/CgFzhkq-MKk.jpg" alt="youtu.be/CgFzhkq-MKk" width="" height=""></a></span></p>
  532. </div></div></td>
  533. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  534. </tr>
  535. </tbody>
  536. </table>
  537. <div class="sect2">
  538. <h3 id="usage-3"><a class="anchor" href="#usage-3"></a>Usage</h3>
  539. <div class="paragraph">
  540. <p>Add a <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/src/com/shaderblow/filter/oldfilm/OldFilmFilter.java">OldFilmFilter</a> instance to a FilterPostProccesor instance. Then add the FilterPostProccesor instance to Application&#8217;s viewPort attribute.</p>
  541. </div>
  542. <div class="listingblock">
  543. <div class="content">
  544. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">this.fpp = new FilterPostProcessor(this.assetManager); // Create FilterPostProcessor instance
  545. this.oldFilmFilter= new OldFilmFilter(); // Create OldFilmFilter instance
  546. this.fpp.addFilter(this.oldFilmFilter); // Add OldFilmFilter instance to FilterPostProcessor instance
  547. this.viewPort.addProcessor(this.fpp); // Add FilterPostProcessor instance to ViewPort</code></pre>
  548. </div>
  549. </div>
  550. <div class="paragraph">
  551. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/oldfilm/TestOldFilm.java">TestCase</a></p>
  552. </div>
  553. <div class="paragraph">
  554. <p><a href="https://hub.jmonkeyengine.org/t/old-film-effect-filter/25464">Forum thread</a></p>
  555. </div>
  556. <hr>
  557. </div>
  558. </div>
  559. </div>
  560. <div class="sect1">
  561. <h2 id="lightblow-shader"><a class="anchor" href="#lightblow-shader"></a>LightBlow Shader</h2>
  562. <div class="sectionbody">
  563. <div class="paragraph">
  564. <p>The Lightblow shader is an improved Lighting shader for JME.</p>
  565. </div>
  566. <div class="paragraph">
  567. <p>Features:</p>
  568. </div>
  569. <div class="ulist">
  570. <ul>
  571. <li>
  572. <p>Improved lighting calculations.</p>
  573. </li>
  574. <li>
  575. <p>Improved reflection calculations.</p>
  576. </li>
  577. <li>
  578. <p>Reflection map implementation with alpha normal map.</p>
  579. </li>
  580. <li>
  581. <p>Improved Minnaert calculations.</p>
  582. </li>
  583. <li>
  584. <p>Hemispherical lighting.</p>
  585. </li>
  586. <li>
  587. <p>Image Based Lighting with Albedo.</p>
  588. </li>
  589. <li>
  590. <p>Emissive map implementation with diffuse alpha.</p>
  591. </li>
  592. <li>
  593. <p>normalization of normals by default.</p>
  594. </li>
  595. <li>
  596. <p>Specular map implementation with normal map alpha.</p>
  597. </li>
  598. <li>
  599. <p>Specular intensity implementation.</p>
  600. </li>
  601. <li>
  602. <p>Switching -x/-y/-z normals for different normal maps. (3dmax, blender, xnormal have different approaches).</p>
  603. </li>
  604. <li>
  605. <p>Specular Color now works with specular maps</p>
  606. </li>
  607. <li>
  608. <p>Glowblow fragment shader is added with m_GlowIntensity? uniform. It&#8217;s possible to change glow intensity for objects. Please, use DiffuseMap? as GlowMap? instead of new additional Glow rgb texture.</p>
  609. </li>
  610. <li>
  611. <p>Lightmaps are added.</p>
  612. </li>
  613. <li>
  614. <p>Rim Lighting is added. Thanks to Thetoucher from JME Blog!</p>
  615. </li>
  616. <li>
  617. <p>Fog is added. Fog is used without post-processing!</p>
  618. </li>
  619. <li>
  620. <p>Texture Blending: 4 diffuse, 4 normal textures can be blended (Like Terrain System).</p>
  621. </li>
  622. </ul>
  623. </div>
  624. <div class="paragraph">
  625. <p>Software for NormalMaps? making: <a href="http://shadermap.com/shadermap_pro.php">http://shadermap.com/shadermap_pro.php</a><br>
  626. Software for CubeMaps? editing: <a href="https://code.google.com/archive/p/cubemapgen/downloads">https://code.google.com/archive/p/cubemapgen/downloads</a><br></p>
  627. </div>
  628. <div class="paragraph">
  629. <p>Watch following videos:</p>
  630. </div>
  631. <table class="tableblock frame-all grid-all stretch">
  632. <caption class="title">YouTube</caption>
  633. <colgroup>
  634. <col style="width: 50%;">
  635. <col style="width: 50%;">
  636. </colgroup>
  637. <tbody>
  638. <tr>
  639. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  640. <div class="title">LightBlow Shader</div>
  641. <p><span class="image"><a class="image" href="https://youtu.be/knROh_3o2uo"><img src="../../_images/sdk/plugin/knROh_3o2uo.jpg" alt="youtube_https://youtu.be/knROh_3o2uo" width="" height=""></a></span></p>
  642. </div></div></td>
  643. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  644. </tr>
  645. </tbody>
  646. </table>
  647. <div class="paragraph">
  648. <p><a href="https://hub.jmonkeyengine.org/t/lightblow-shader/16182">Forum thread</a></p>
  649. </div>
  650. <hr>
  651. </div>
  652. </div>
  653. <div class="sect1">
  654. <h2 id="dissolver-shader"><a class="anchor" href="#dissolver-shader"></a>Dissolver Shader</h2>
  655. <div class="sectionbody">
  656. <div class="paragraph">
  657. <p>The Dissolve Shader uses a simple grey scale image as an animated mask to hide a material.</p>
  658. </div>
  659. <div class="paragraph">
  660. <p>The shader incrementally clamps off the colour value, dark to light, and uses that for a masking texture to discard pixels.
  661. It is currently capped for convenience at 255 frames of animation and is only using one colour channel.
  662. In simple terms, in starts by only discarding the darkest parts of the texture map, then the slightly lighter parts, then the slightly lighter again and again until it eventually cant get any lighter (white), at which point the proccess is complete.</p>
  663. </div>
  664. <table class="tableblock frame-all grid-all stretch">
  665. <colgroup>
  666. <col style="width: 50%;">
  667. <col style="width: 50%;">
  668. </colgroup>
  669. <tbody>
  670. <tr>
  671. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  672. <p><span class="image"><img src="../../_images/sdk/plugin/dissolver-screen.png" alt="Dissolver screenshot" width="400" height=""></span></p>
  673. </div></div></td>
  674. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  675. <p><span class="image"><img src="../../_images/sdk/plugin/dissolver-maps.png" alt="Mask maps" width="400" height=""></span></p>
  676. </div></div></td>
  677. </tr>
  678. </tbody>
  679. </table>
  680. <div class="paragraph">
  681. <p>Starting at the top left we have: simple linear dissolve, organic dissolve and pixel dissolve.
  682. And bottom row: organic growth, texture masking, organic burn.
  683. Mask texture maps on the second image.</p>
  684. </div>
  685. <div class="paragraph">
  686. <p>The test is occolating the dissolve amount between 0 and 1. It demonstrates 6 different uses for the shader, all running at the same speed. The top row are straight forward dissolves. The bottom row shows 3 potential applications:</p>
  687. </div>
  688. <div class="olist arabic">
  689. <ol class="arabic">
  690. <li>
  691. <p>Organic Growth (bottom left) over a mesh, this could work both animating rapidly for a fast grow effect, or set to a fixed value e.g. set to 0.5f is “50% covered in growth”;</p>
  692. </li>
  693. <li>
  694. <p>Texture Masking (bottom middle) , I see this is probably where the most practical applications will come from. The demonstration shows a poorely photoshoped clean street, peices of garbage are then scattered around dependant on the dissolve amount, this would work best with a fixed value eg set to .75 is “75% dirty”. Texture Masking could be also be used for:</p>
  695. <div class="olist loweralpha">
  696. <ol class="loweralpha" type="a">
  697. <li>
  698. <p>paint damage on a car;</p>
  699. </li>
  700. <li>
  701. <p>lacerations on a character;</p>
  702. </li>
  703. <li>
  704. <p>the blood shot eye effect that creeps in from the sides of the screen when you’ve taken too much damage in a modern FPS.</p>
  705. </li>
  706. </ol>
  707. </div>
  708. </li>
  709. <li>
  710. <p>Organic Burn (bottom right) is comprised of 2 cubes, one blue, one orange, both with the same organic dissolve, however the orange one is slightly offset ahead of the blue so it shows first (ie the dissolve amount is always slight advanced).</p>
  711. </li>
  712. </ol>
  713. </div>
  714. <div class="paragraph">
  715. <p>Watch following videos:</p>
  716. </div>
  717. <table class="tableblock frame-all grid-all stretch">
  718. <caption class="title">YouTube</caption>
  719. <colgroup>
  720. <col style="width: 50%;">
  721. <col style="width: 50%;">
  722. </colgroup>
  723. <tbody>
  724. <tr>
  725. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  726. <div class="title">GLSL Dissolve Shader</div>
  727. <p><span class="image"><a class="image" href="https://youtu.be/ry0r_qwFQLQ"><img src="../../_images/sdk/plugin/ry0r_qwFQLQ.jpg" alt="youtube_ry0r_qwFQLQ" width="" height=""></a></span></p>
  728. </div></div></td>
  729. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  730. <div class="title">mTheoryGame</div>
  731. <p><span class="image"><a class="image" href="https://youtu.be/wUfMcN1Uv48"><img src="../../_images/sdk/plugin/wUfMcN1Uv48.jpg" alt="youtube_wUfMcN1Uv48" width="" height=""></a></span></p>
  732. </div></div></td>
  733. </tr>
  734. </tbody>
  735. </table>
  736. <div class="sect2">
  737. <h3 id="usage-4"><a class="anchor" href="#usage-4"></a>Usage</h3>
  738. <div class="paragraph">
  739. <p>The shader requires 2 parameters:</p>
  740. </div>
  741. <div class="ulist">
  742. <ul>
  743. <li>
  744. <p>a Texture2D texture map to use as the dissolve map; and</p>
  745. </li>
  746. <li>
  747. <p>a Vector2 of internal params params:</p>
  748. <div class="ulist">
  749. <ul>
  750. <li>
  751. <p>the first is a float value being the amount of dissolve, a value from 0-1 : 0 being no dissolve, being fully dissolved; and</p>
  752. </li>
  753. <li>
  754. <p>the second value is an int use as an inversion switch, 1 to invert the dissolve/discard, 0 to leave as is.</p>
  755. </li>
  756. </ul>
  757. </div>
  758. </li>
  759. </ul>
  760. </div>
  761. <div class="admonitionblock note">
  762. <table>
  763. <tr>
  764. <td class="icon">
  765. <i class="fa icon-note" title="Note"></i>
  766. </td>
  767. <td class="content">
  768. <div class="paragraph">
  769. <p>Dissolver is based on Common/MatDefs/Lighting.j3md. So, all Common/MatDefs/Lighting.j3md features should be available on the dissolver too.</p>
  770. </div>
  771. </td>
  772. </tr>
  773. </table>
  774. </div>
  775. <div class="listingblock">
  776. <div class="content">
  777. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">// Create a material instance using ShaderBlow's Lighting.j3md
  778. final Material mat = new Material(this.assetManager, "ShaderBlow/MatDefs/Dissolve/Lighting.j3md");
  779. mat.setColor("Ambient", ColorRGBA.Blue);
  780. mat.setColor("Diffuse", ColorRGBA.White);
  781. mat.setColor("Specular", ColorRGBA.Black);
  782. mat.setBoolean("UseMaterialColors", true);
  783. this.assetManager.loadTexture("TestTextures/Dissolve/burnMap.png", mat.setTexture("DissolveMap", map); // Set mask texture map
  784. this.DSParams = new Vector2f(0, 0); // standard dissolver
  785. //this.DSParamsInv = new Vector2f(0, 1); // inverted dissolver
  786. mat.setVector2("DissolveParams", this.DSParams); // Set params
  787. final Box b = new Box(Vector3f.ZERO, 1, 1, 1);
  788. final Geometry geom = new Geometry("Box", b);
  789. geom.setMaterial(mat);</code></pre>
  790. </div>
  791. </div>
  792. <div class="paragraph">
  793. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/dissolve/TestDissolve.java">TestCase</a></p>
  794. </div>
  795. <div class="paragraph">
  796. <p><a href="https://hub.jmonkeyengine.org/t/dissolve-shader/18720">Forum thread</a></p>
  797. </div>
  798. <hr>
  799. </div>
  800. </div>
  801. </div>
  802. <div class="sect1">
  803. <h2 id="fakeparticleblow-shader"><a class="anchor" href="#fakeparticleblow-shader"></a>FakeParticleBlow Shader</h2>
  804. <div class="sectionbody">
  805. <div class="paragraph">
  806. <p>Effect for fire or engine of a ship. Such an effect is used in the “Eve Online game for ship engines.</p>
  807. </div>
  808. <div class="paragraph">
  809. <p>Features:</p>
  810. </div>
  811. <div class="olist arabic">
  812. <ol class="arabic">
  813. <li>
  814. <p>GPU animation (now you don’t need simpleUpdate(float tpf) for the shader). Animation is made displacing the texture according to X and/or Y axis.</p>
  815. </li>
  816. <li>
  817. <p>X and/or Y animation direction. No animation is supported also.</p>
  818. </li>
  819. <li>
  820. <p>Animation direction changer. By default the Y axis animation&#8217;s direction is up-to-down and the X axis animation&#8217;s direction is right-to-left.</p>
  821. </li>
  822. <li>
  823. <p>Allow to set animation speed.</p>
  824. </li>
  825. <li>
  826. <p>Allow to set mask texture in order to set particle shape.</p>
  827. </li>
  828. <li>
  829. <p>Allow to set particle color.</p>
  830. </li>
  831. <li>
  832. <p>Allow to set fog color. Fog color is applyed to the material using for color&#8217;s alpha value as fog distance factor.</p>
  833. </li>
  834. </ol>
  835. </div>
  836. <table class="tableblock frame-all grid-all stretch">
  837. <colgroup>
  838. <col style="width: 50%;">
  839. <col style="width: 50%;">
  840. </colgroup>
  841. <tbody>
  842. <tr>
  843. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  844. <p><span class="image"><img src="../../_images/sdk/plugin/fakeparticleblow.png" alt="FakeParticleBlow" width="400" height=""></span></p>
  845. </div></div></td>
  846. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  847. <div class="title">Fog applied to blue fire</div>
  848. <p><span class="image"><img src="../../_images/sdk/plugin/fakeparticleblow3.png" alt="FakeParticleBlow" width="400" height=""></span></p>
  849. </div></div></td>
  850. </tr>
  851. </tbody>
  852. </table>
  853. <table class="tableblock frame-all grid-all stretch">
  854. <caption class="title">YouTube</caption>
  855. <colgroup>
  856. <col style="width: 50%;">
  857. <col style="width: 50%;">
  858. </colgroup>
  859. <tbody>
  860. <tr>
  861. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  862. <div class="title">FakeParticleBlow Shader</div>
  863. <p><span class="image"><a class="image" href="https://youtu.be/hdQop4yZ-lA"><img src="../../_images/sdk/plugin/hdQop4yZ-lA.jpg" alt="youtube_hdQop4yZ-lA" width="" height=""></a></span></p>
  864. </div></div></td>
  865. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  866. </tr>
  867. </tbody>
  868. </table>
  869. <div class="sect2">
  870. <h3 id="usage-5"><a class="anchor" href="#usage-5"></a>Usage</h3>
  871. <div class="paragraph">
  872. <p>Create a material (by SDK or by code) using <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/assets/ShaderBlow/MatDefs/FakeParticleBlow/FakeParticleBlow.j3md">FakeParticleBlow.j3md</a>.
  873. Set material&#8217;s parameters and set the material to a spatial.</p>
  874. </div>
  875. <div class="paragraph">
  876. <p>Most of the cases the spatial will be 4 to 10 planes in the same location but rotated on Y axis using different angles for each plane. Something similar to this:</p>
  877. </div>
  878. <div class="paragraph">
  879. <p><span class="image"><img src="../../_images/sdk/plugin/fakeobject.png" alt="fakeobject.png" width="100" height=""></span></p>
  880. </div>
  881. <div class="admonitionblock important">
  882. <table>
  883. <tr>
  884. <td class="icon">
  885. <i class="fa icon-important" title="Important"></i>
  886. </td>
  887. <td class="content">
  888. <div class="paragraph">
  889. <p>Remenber to set the queue bucket to transparent for the spatial.</p>
  890. </div>
  891. </td>
  892. </tr>
  893. </table>
  894. </div>
  895. <div class="listingblock">
  896. <div class="content">
  897. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">// Create the material
  898. final Material mat = new Material(this.assetManager, "ShaderBlow/MatDefs/FakeParticleBlow/FakeParticleBlow.j3md");
  899. // Create the mask texture to use
  900. final Texture maskTex = this.assetManager.loadTexture("TestTextures/FakeParticleBlow/mask.png");
  901. mat.setTexture("MaskMap", maskTex);
  902. // Create the texture to use for the spatial.
  903. final Texture aniTex = this.assetManager.loadTexture("TestTextures/FakeParticleBlow/particles.png");
  904. aniTex.setWrap(WrapMode.MirroredRepeat); // NOTE: Set WrapMode = MirroredRepeat in order to animate the texture
  905. mat.setTexture("AniTexMap", aniTex); // Set texture
  906. mat.setFloat("TimeSpeed", 2); // Set animation speed
  907. mat.setColor("BaseColor", ColorRGBA.Green.clone()); // Set base color to apply to the texture
  908. // mat.setBoolean("Animation_X", true); // Enable X axis animation
  909. mat.setBoolean("Animation_Y", true); // Enable Y axis animation
  910. mat.setBoolean("Change_Direction", true); // Change direction of the texture animation
  911. mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off); // Allow to see both sides of a face
  912. mat.getAdditionalRenderState().setBlendMode(BlendMode.Additive);
  913. final ColorRGBA fogColor = ColorRGBA.Black.clone();
  914. fogColor.a = 10; // fogColor's alpha value is used to calculate the intensity of the fog (distance to apply fog)
  915. mat.setColor("FogColor", fogColor); // Set fog color to apply to the spatial.
  916. final Quad quad = new Quad(3, 3); // Create an spatial. A plane in this case
  917. final Geometry geom = new Geometry("Particle", quad);
  918. geom.setMaterial(mat); // Assign the material to the spatial
  919. TangentBinormalGenerator.generate(geom);
  920. geom.setQueueBucket(Bucket.Transparent); // Remenber to set the queue bucket to transparent for the spatial</code></pre>
  921. </div>
  922. </div>
  923. <div class="paragraph">
  924. <p>To get green/yellow/blue fog (not transparency):</p>
  925. </div>
  926. <div class="listingblock">
  927. <div class="content">
  928. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">mat.getAdditionalRenderState().setBlendMode(BlendMode.AlphaAdditive);
  929. final ColorRGBA fogColor = ColorRGBA.Blue.clone();</code></pre>
  930. </div>
  931. </div>
  932. <div class="paragraph">
  933. <p>Several planes geometries will be required as there will be AlphaAdditive material.</p>
  934. </div>
  935. <div class="paragraph">
  936. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/fakeparticleblow/TestFakeParticleBlow.java">TestCase 1</a><br>
  937. <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/fakeparticleblow/TestFakeParticleBlow2.java">TestCase 2</a></p>
  938. </div>
  939. <div class="paragraph">
  940. <p><a href="https://hub.jmonkeyengine.org/t/fakeparticleblow-shader/16443">Forum thread</a></p>
  941. </div>
  942. <hr>
  943. </div>
  944. </div>
  945. </div>
  946. <div class="sect1">
  947. <h2 id="forceshield-shader"><a class="anchor" href="#forceshield-shader"></a>Forceshield Shader</h2>
  948. <div class="sectionbody">
  949. <div class="paragraph">
  950. <p>Forcefield shader adds shield effect to a spatial.
  951. The spatial will be a sphere most of the cases, but box or oval should be possible to use. Only problem is that it has to be higher-poly because distace is calculated from vertex.</p>
  952. </div>
  953. <div class="paragraph">
  954. <p>Hits are registred as contact point position using this control and effect animation is based on distance from contact point and time.
  955. Max number of hits displayed is 4.</p>
  956. </div>
  957. <div class="paragraph">
  958. <p>Features:</p>
  959. </div>
  960. <div class="ulist">
  961. <ul>
  962. <li>
  963. <p>Allow to set texture of the shield.</p>
  964. </li>
  965. <li>
  966. <p>Allow to set color of the shield.</p>
  967. </li>
  968. <li>
  969. <p>Allow to set minimal visibility (similar to alpha value). Default is 0, that means shield is no displayed, only hit animations.</p>
  970. </li>
  971. <li>
  972. <p>Allow to set effect duration. Default is 0.5s.</p>
  973. </li>
  974. <li>
  975. <p>Allow to set effect size. Default is 1.</p>
  976. </li>
  977. <li>
  978. <p>Allow to enable/disable hit animations.</p>
  979. </li>
  980. </ul>
  981. </div>
  982. <table class="tableblock frame-all grid-all stretch">
  983. <caption class="title">YouTube</caption>
  984. <colgroup>
  985. <col style="width: 50%;">
  986. <col style="width: 50%;">
  987. </colgroup>
  988. <tbody>
  989. <tr>
  990. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  991. <div class="title">Forceshield Shader</div>
  992. <p><span class="image"><a class="image" href="https://youtu.be/uu2nbaBM9Pk"><img src="../../_images/sdk/plugin/uu2nbaBM9Pk.jpg" alt="youtube_uu2nbaBM9Pk" width="" height=""></a></span></p>
  993. </div></div></td>
  994. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  995. <div class="title">Forceshield Cube Shader</div>
  996. <p><span class="image"><a class="image" href="https://youtu.be/urzMiUeHsCc"><img src="../../_images/sdk/plugin/urzMiUeHsCc.png" alt="youtube_urzMiUeHsCc" width="" height=""></a></span></p>
  997. </div></div></td>
  998. </tr>
  999. </tbody>
  1000. </table>
  1001. <div class="sect2">
  1002. <h3 id="usage-6"><a class="anchor" href="#usage-6"></a>Usage</h3>
  1003. <div class="paragraph">
  1004. <p>Create a Spatial instance. Create a <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/src/com/shaderblow/forceshield/ForceShieldControl.java">ForceShieldControl</a> instance.
  1005. Add the control instance to the spatial.</p>
  1006. </div>
  1007. <div class="admonitionblock important">
  1008. <table>
  1009. <tr>
  1010. <td class="icon">
  1011. <i class="fa icon-important" title="Important"></i>
  1012. </td>
  1013. <td class="content">
  1014. <div class="paragraph">
  1015. <p>If you experience problems, try higher polygon object.</p>
  1016. </div>
  1017. </td>
  1018. </tr>
  1019. </table>
  1020. </div>
  1021. <div class="listingblock">
  1022. <div class="content">
  1023. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">// Create spatial to be the shield
  1024. final Sphere sphere = new Sphere(30, 30, 1.2f);
  1025. final Geometry shield = new Geometry("forceshield", sphere);
  1026. shield.setQueueBucket(Bucket.Transparent); // Remenber to set the queue bucket to transparent for the spatial
  1027. // Create ForceShieldControl
  1028. this.forceShieldControl = new ForceShieldControl(this.assetManager, 0.5f);
  1029. shield.addControl(this.forceShieldControl); // Add the control to the spatial
  1030. this.forceShieldControl.setEffectSize(2f); // Set the effect size
  1031. this.forceShieldControl.setColor(new ColorRGBA(1, 0, 0, 3)); // Set effect color
  1032. this.forceShieldControl.setVisibility(0.1f); // Set shield visibility.
  1033. // Set a texture to the shield
  1034. this.forceShieldControl.setTexture(this.assetManager.loadTexture("TestTextures/ForceShield/fs_texture.png"));
  1035. // this.forceShieldControl.setEnabled(false); // Enable, disable animation.</code></pre>
  1036. </div>
  1037. </div>
  1038. <div class="paragraph">
  1039. <p>Use <em>forceShieldControl.registerHit(final Vector3f position)</em> method to register a hit.</p>
  1040. </div>
  1041. <div class="listingblock">
  1042. <div class="content">
  1043. <pre class="highlightjs highlight"><code class="language-java hljs" data-lang="java">final CollisionResults crs = new CollisionResults();
  1044. this.rootNode.collideWith(new Ray(this.cam.getLocation(), this.cam.getDirection()), crs);
  1045. if (crs.getClosestCollision() != null) {
  1046. // Register a hit
  1047. this.forceShieldControl.registerHit(crs.getClosestCollision().getContactPoint());
  1048. }</code></pre>
  1049. </div>
  1050. </div>
  1051. <div class="paragraph">
  1052. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/forceshield/TestShield.java">TestCase</a></p>
  1053. </div>
  1054. <div class="paragraph">
  1055. <p><a href="https://hub.jmonkeyengine.org/t/forceshield-my-very-first-shader/18673">Forum thread</a></p>
  1056. </div>
  1057. <hr>
  1058. </div>
  1059. </div>
  1060. </div>
  1061. <div class="sect1">
  1062. <h2 id="matcap-shader"><a class="anchor" href="#matcap-shader"></a>MatCap Shader</h2>
  1063. <div class="sectionbody">
  1064. <div class="paragraph">
  1065. <p>MatCap shader will be very useful for scrollshooters to imitate different materials like glass, gold, metals.
  1066. The shader does not use any lights, only one texture.</p>
  1067. </div>
  1068. <div class="paragraph">
  1069. <p>Features:</p>
  1070. </div>
  1071. <div class="ulist">
  1072. <ul>
  1073. <li>
  1074. <p>Fog color and fog skybox.</p>
  1075. </li>
  1076. <li>
  1077. <p>Toon edge effect.</p>
  1078. </li>
  1079. <li>
  1080. <p>Multiply color: set a color to change texture&#8217;s color.</p>
  1081. </li>
  1082. <li>
  1083. <p>Normal map.</p>
  1084. </li>
  1085. </ul>
  1086. </div>
  1087. <table class="tableblock frame-all grid-all stretch">
  1088. <colgroup>
  1089. <col style="width: 50%;">
  1090. <col style="width: 50%;">
  1091. </colgroup>
  1092. <tbody>
  1093. <tr>
  1094. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1095. <p><span class="image"><img src="../../_images/sdk/plugin/shaderblow_matcap.jpg" alt="MatCap shader" width="400" height=""></span></p>
  1096. </div></div></td>
  1097. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1098. <p><span class="image"><img src="../../_images/sdk/plugin/matcap3.png" alt="Multiply color" width="400" height=""></span></p>
  1099. </div></div></td>
  1100. </tr>
  1101. <tr>
  1102. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1103. <p><span class="image"><img src="../../_images/sdk/plugin/matcap1.png" alt="Toon edge effect" width="400" height=""></span></p>
  1104. </div></div></td>
  1105. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1106. <p><span class="image"><img src="../../_images/sdk/plugin/matcap2.png" alt="Fog effect" width="400" height=""></span></p>
  1107. </div></div></td>
  1108. </tr>
  1109. </tbody>
  1110. </table>
  1111. <div class="sect2">
  1112. <h3 id="usage-7"><a class="anchor" href="#usage-7"></a>Usage</h3>
  1113. <div class="paragraph">
  1114. <p>Create a material (by SDK or by code) using <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/assets/ShaderBlow/MatDefs/MatCap/MatCap.j3md">MatCap.j3md</a>. Set material&#8217;s parameters and set the material to a spatial.</p>
  1115. </div>
  1116. <div class="admonitionblock important">
  1117. <table>
  1118. <tr>
  1119. <td class="icon">
  1120. <i class="fa icon-important" title="Important"></i>
  1121. </td>
  1122. <td class="content">
  1123. <div class="paragraph">
  1124. <p>Remember to add a DirectionalLight if you want to use toon edge effect.</p>
  1125. </div>
  1126. </td>
  1127. </tr>
  1128. </table>
  1129. </div>
  1130. <div class="listingblock">
  1131. <div class="content">
  1132. <pre class="highlightjs highlight"><code>Material My Material : ShaderBlow/MatDefs/MatCap/MatCap.j3md {
  1133. MaterialParameters {
  1134. DiffuseMap : Flip TestTextures/matcaps/met2.png
  1135. Nor_Inv_Y : true
  1136. Nor_Inv_X : false
  1137. Nor_Inv_Z : false
  1138. NormalMap : TestModels/LightBlow/jme_lightblow_nor.png
  1139. FogSkyBox : Flip TestTextures/Water256.dds
  1140. Toon : true
  1141. EdgesColor : 1.0 0.0 0.0 1.0
  1142. EdgeSize : 0.01
  1143. Fog_Edges : true
  1144. }
  1145. AdditionalRenderState {
  1146. }
  1147. }</code></pre>
  1148. </div>
  1149. </div>
  1150. <div class="paragraph">
  1151. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/matcap/TestMatCap.java">TestCase</a></p>
  1152. </div>
  1153. <div class="paragraph">
  1154. <p><a href="https://hub.jmonkeyengine.org/t/glsl-matcap-shader-done/18920">Forum thread</a></p>
  1155. </div>
  1156. <hr>
  1157. </div>
  1158. </div>
  1159. </div>
  1160. <div class="sect1">
  1161. <h2 id="glass-shader"><a class="anchor" href="#glass-shader"></a>Glass Shader</h2>
  1162. <div class="sectionbody">
  1163. <div class="paragraph">
  1164. <p>Features:</p>
  1165. </div>
  1166. <div class="ulist">
  1167. <ul>
  1168. <li>
  1169. <p>Fog color and fog skybox.</p>
  1170. </li>
  1171. <li>
  1172. <p>Toon edge effect.</p>
  1173. </li>
  1174. <li>
  1175. <p>Multiply color: set a color to change texture&#8217;s color.</p>
  1176. </li>
  1177. <li>
  1178. <p>Normal map.</p>
  1179. </li>
  1180. </ul>
  1181. </div>
  1182. <table class="tableblock frame-all grid-all stretch">
  1183. <colgroup>
  1184. <col style="width: 50%;">
  1185. <col style="width: 50%;">
  1186. </colgroup>
  1187. <tbody>
  1188. <tr>
  1189. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1190. <p><span class="image"><img src="../../_images/sdk/plugin/glass-shader.png" alt="Glass shader" width="400" height=""></span></p>
  1191. </div></div></td>
  1192. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1193. <p><span class="image"><img src="../../_images/sdk/plugin/glass-shader2.png" alt="Glass Shader and Fog Color effect" width="400" height=""></span></p>
  1194. </div></div></td>
  1195. </tr>
  1196. </tbody>
  1197. </table>
  1198. <div class="sect2">
  1199. <h3 id="usage-8"><a class="anchor" href="#usage-8"></a>Usage</h3>
  1200. <div class="paragraph">
  1201. <p>Create a material (by SDK or by code) using <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/assets/ShaderBlow/MatDefs/Glass/Glass.j3md">Glass.j3md</a>. Set material&#8217;s parameters and set the material to a spatial.</p>
  1202. </div>
  1203. <div class="admonitionblock important">
  1204. <table>
  1205. <tr>
  1206. <td class="icon">
  1207. <i class="fa icon-important" title="Important"></i>
  1208. </td>
  1209. <td class="content">
  1210. <div class="paragraph">
  1211. <p>Remember to add a DirectionalLight if you want to use toon edge effect.</p>
  1212. </div>
  1213. </td>
  1214. </tr>
  1215. </table>
  1216. </div>
  1217. <div class="listingblock">
  1218. <div class="content">
  1219. <pre class="highlightjs highlight"><code>Material My Material : ShaderBlow/MatDefs/Glass/Glass.j3md {
  1220. MaterialParameters {
  1221. RefMap : Flip TestTextures/Water256.dds
  1222. Multiply_Color : 1.1 1.5 1.1 1.0
  1223. colorIntensity : 0.79999995
  1224. Nor_Inv_Y : true
  1225. NormalMap : TestModels/LightBlow/jme_lightblow_nor.png
  1226. ChromaticAbberation : true
  1227. abberIndex : 0.04
  1228. specularIntensity : 0.59999996
  1229. Toon : true
  1230. EdgesColor : 0.2 1.0 0.0 1.0
  1231. EdgeSize : 0.01
  1232. Fog_Edges : true
  1233. }
  1234. AdditionalRenderState {
  1235. }
  1236. }</code></pre>
  1237. </div>
  1238. </div>
  1239. <div class="paragraph">
  1240. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/glass/TestGlass.java">TestCase</a></p>
  1241. </div>
  1242. <div class="paragraph">
  1243. <p><a href="https://hub.jmonkeyengine.org/t/glsl-glass-shader-done/19050">Forum thread</a></p>
  1244. </div>
  1245. <hr>
  1246. </div>
  1247. </div>
  1248. </div>
  1249. <div class="sect1">
  1250. <h2 id="simplerefraction-postprocessorfilter"><a class="anchor" href="#simplerefraction-postprocessorfilter"></a>SimpleRefraction PostProcessor/Filter</h2>
  1251. <div class="sectionbody">
  1252. <div class="paragraph">
  1253. <p>Features:</p>
  1254. </div>
  1255. <div class="ulist">
  1256. <ul>
  1257. <li>
  1258. <p>Cool refraction effect</p>
  1259. </li>
  1260. </ul>
  1261. </div>
  1262. <table class="tableblock frame-all grid-all stretch">
  1263. <caption class="title">YouTube</caption>
  1264. <colgroup>
  1265. <col style="width: 50%;">
  1266. <col style="width: 50%;">
  1267. </colgroup>
  1268. <tbody>
  1269. <tr>
  1270. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1271. <div class="title">SimpleRefraction PostProcessor</div>
  1272. <p><span class="image"><a class="image" href="https://youtu.be/EAUKCU5GRmc"><img src="../../_images/sdk/plugin/EAUKCU5GRmc.jpg" alt="youtube_EAUKCU5GRmc" width="" height=""></a></span></p>
  1273. </div></div></td>
  1274. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1275. </tr>
  1276. </tbody>
  1277. </table>
  1278. <div class="sect2">
  1279. <h3 id="usage-9"><a class="anchor" href="#usage-9"></a>Usage</h3>
  1280. <div class="paragraph">
  1281. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/simplerefraction/TestSimpleRefraction.java">TestCase for PostProcessor</a></p>
  1282. </div>
  1283. <div class="paragraph">
  1284. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/src/com/shaderblow/filter/simplerefractionfilter/SimpleRefractionFilter.java">TestCase for Filter</a></p>
  1285. </div>
  1286. <hr>
  1287. </div>
  1288. </div>
  1289. </div>
  1290. <div class="sect1">
  1291. <h2 id="basicssao-filter"><a class="anchor" href="#basicssao-filter"></a>BasicSSAO Filter</h2>
  1292. <div class="sectionbody">
  1293. <div class="paragraph">
  1294. <p>Features:</p>
  1295. </div>
  1296. <div class="ulist">
  1297. <ul>
  1298. <li>
  1299. <p>Cool Shadows.</p>
  1300. </li>
  1301. </ul>
  1302. </div>
  1303. <table class="tableblock frame-all grid-all stretch">
  1304. <colgroup>
  1305. <col style="width: 50%;">
  1306. <col style="width: 50%;">
  1307. </colgroup>
  1308. <tbody>
  1309. <tr>
  1310. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1311. <p><span class="image"><img src="../../_images/sdk/plugin/shaderblow_ssao.png" alt="Glass shader" width="400" height=""></span></p>
  1312. </div></div></td>
  1313. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1314. </tr>
  1315. </tbody>
  1316. </table>
  1317. <div class="sect2">
  1318. <h3 id="usage-10"><a class="anchor" href="#usage-10"></a>Usage</h3>
  1319. <div class="paragraph">
  1320. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/basicssao/TestBasicSSAO.java">TestCase</a></p>
  1321. </div>
  1322. <div class="paragraph">
  1323. <p><a href="https://hub.jmonkeyengine.org/t/wip-basicssao-added-optional-smoothing/23490">Forum thread</a></p>
  1324. </div>
  1325. <hr>
  1326. </div>
  1327. </div>
  1328. </div>
  1329. <div class="sect1">
  1330. <h2 id="electricity-shaders"><a class="anchor" href="#electricity-shaders"></a>Electricity Shaders</h2>
  1331. <div class="sectionbody">
  1332. <div class="paragraph">
  1333. <p>Features:</p>
  1334. </div>
  1335. <div class="ulist">
  1336. <ul>
  1337. <li>
  1338. <p>Cool Electricity effect</p>
  1339. </li>
  1340. </ul>
  1341. </div>
  1342. <table class="tableblock frame-all grid-all stretch">
  1343. <caption class="title">YouTube</caption>
  1344. <colgroup>
  1345. <col style="width: 50%;">
  1346. <col style="width: 50%;">
  1347. </colgroup>
  1348. <tbody>
  1349. <tr>
  1350. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1351. <div class="title">Electricity Shaders</div>
  1352. <p><span class="image"><a class="image" href="https://youtu.be/JDTES95HnPE"><img src="../../_images/sdk/plugin/JDTES95HnPE.jpg" alt="youtube_JDTES95HnPE" width="" height=""></a></span></p>
  1353. </div></div></td>
  1354. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1355. </tr>
  1356. </tbody>
  1357. </table>
  1358. <div class="paragraph">
  1359. <p><a href="https://hub.jmonkeyengine.org/t/electricity-shaders/23436">Forum thread</a></p>
  1360. </div>
  1361. <hr>
  1362. </div>
  1363. </div>
  1364. <div class="sect1">
  1365. <h2 id="simplesprite-shader"><a class="anchor" href="#simplesprite-shader"></a>SimpleSprite Shader</h2>
  1366. <div class="sectionbody">
  1367. <div class="paragraph">
  1368. <p>Features:</p>
  1369. </div>
  1370. <div class="ulist">
  1371. <ul>
  1372. <li>
  1373. <p>GPU animated texture.</p>
  1374. </li>
  1375. </ul>
  1376. </div>
  1377. <table class="tableblock frame-all grid-all stretch">
  1378. <colgroup>
  1379. <col style="width: 50%;">
  1380. <col style="width: 50%;">
  1381. </colgroup>
  1382. <tbody>
  1383. <tr>
  1384. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1385. <p><span class="image"><img src="../../_images/sdk/plugin/shaderblow_simplesprite_shader.png" alt="Glass shader" width="400" height=""></span></p>
  1386. </div></div></td>
  1387. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1388. </tr>
  1389. </tbody>
  1390. </table>
  1391. <table class="tableblock frame-all grid-all stretch">
  1392. <caption class="title">YouTube</caption>
  1393. <colgroup>
  1394. <col style="width: 50%;">
  1395. <col style="width: 50%;">
  1396. </colgroup>
  1397. <tbody>
  1398. <tr>
  1399. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1400. <div class="title">SimpleSprite Shader</div>
  1401. <p><span class="image"><a class="image" href="https://youtu.be/7XFxbt-dw3I"><img src="../../_images/sdk/plugin/7XFxbt-dw3I.jpg" alt="youtube_7XFxbt-dw3I" width="" height=""></a></span></p>
  1402. </div></div></td>
  1403. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1404. </tr>
  1405. </tbody>
  1406. </table>
  1407. <div class="paragraph">
  1408. <p><a href="https://hub.jmonkeyengine.org/t/texture-animation-shader-done/19579">Forum thread</a></p>
  1409. </div>
  1410. <hr>
  1411. </div>
  1412. </div>
  1413. <div class="sect1">
  1414. <h2 id="bubble-shader"><a class="anchor" href="#bubble-shader"></a>Bubble Shader</h2>
  1415. <div class="sectionbody">
  1416. <div class="paragraph">
  1417. <p>Features:</p>
  1418. </div>
  1419. <div class="ulist">
  1420. <ul>
  1421. <li>
  1422. <p>Cool nice bubble.</p>
  1423. </li>
  1424. </ul>
  1425. </div>
  1426. <table class="tableblock frame-all grid-all stretch">
  1427. <caption class="title">YouTube</caption>
  1428. <colgroup>
  1429. <col style="width: 50%;">
  1430. <col style="width: 50%;">
  1431. </colgroup>
  1432. <tbody>
  1433. <tr>
  1434. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1435. <div class="title">Bubble Shader</div>
  1436. <p><span class="image"><a class="image" href="https://youtu.be/rkFbLZ1EOhg"><img src="../../_images/sdk/plugin/rkFbLZ1EOhg.jpg" alt="youtube_rkFbLZ1EOhg" width="" height=""></a></span></p>
  1437. </div></div></td>
  1438. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1439. </tr>
  1440. </tbody>
  1441. </table>
  1442. <div class="paragraph">
  1443. <p><a href="https://hub.jmonkeyengine.org/t/bubble-shader/26169">Forum thread</a></p>
  1444. </div>
  1445. <hr>
  1446. </div>
  1447. </div>
  1448. <div class="sect1">
  1449. <h2 id="simplespriteparticle-shader"><a class="anchor" href="#simplespriteparticle-shader"></a>SimpleSpriteParticle Shader</h2>
  1450. <div class="sectionbody">
  1451. <div class="paragraph">
  1452. <p>Features:
  1453. static sprite speed: can render 1500000 sprites at 149 fps ( 0% cpu load, speed limited only by graphics card ). As long as you don’t change them (add, move, delete, change image).
  1454. FULL LIBRARY PLUGIN: <a href="http://code.google.com/p/petomancer/downloads/detail?name=SpriteLibrary.zip&amp;can=2&amp;q=">http://code.google.com/p/petomancer/downloads/detail?name=SpriteLibrary.zip&amp;can=2&amp;q=</a></p>
  1455. </div>
  1456. <div class="paragraph">
  1457. <p><span class="image"><img src="../../_images/sdk/plugin/shaderblow_simplespriteparticle_shader.png" alt="shaderblow_simplespriteparticle_shader.png" width="400" height=""></span></p>
  1458. </div>
  1459. <div class="paragraph">
  1460. <p><a href="https://hub.jmonkeyengine.org/t/spritelibrary-efficient-render-of-sprites/20901">Forum thread</a></p>
  1461. </div>
  1462. <hr>
  1463. </div>
  1464. </div>
  1465. <div class="sect1">
  1466. <h2 id="texture-bombing"><a class="anchor" href="#texture-bombing"></a>Texture Bombing</h2>
  1467. <div class="sectionbody">
  1468. <div class="paragraph">
  1469. <p>Features:</p>
  1470. </div>
  1471. <div class="ulist">
  1472. <ul>
  1473. <li>
  1474. <p>Applying random images from a texture atlas to a model by dividing up the model&#8217;s UV textures into cells.</p>
  1475. </li>
  1476. </ul>
  1477. </div>
  1478. <table class="tableblock frame-all grid-all stretch">
  1479. <caption class="title">YouTube</caption>
  1480. <colgroup>
  1481. <col style="width: 50%;">
  1482. <col style="width: 50%;">
  1483. </colgroup>
  1484. <tbody>
  1485. <tr>
  1486. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1487. <div class="title">GLSL Texture Bomb</div>
  1488. <p><span class="image"><a class="image" href="https://youtu.be/3lBhu2c5V8o"><img src="../../_images/sdk/plugin/3lBhu2c5V8o.jpg" alt="youtube_3lBhu2c5V8o" width="" height=""></a></span></p>
  1489. </div></div></td>
  1490. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1491. </tr>
  1492. </tbody>
  1493. </table>
  1494. <div class="sect2">
  1495. <h3 id="usage-11"><a class="anchor" href="#usage-11"></a>Usage</h3>
  1496. <div class="paragraph">
  1497. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/texturebombing/TestTextureBombing.java">TestCase</a></p>
  1498. </div>
  1499. <div class="paragraph">
  1500. <p><a href="https://hub.jmonkeyengine.org/t/texture-glyph-bombing-shader/26867">Forum thread</a></p>
  1501. </div>
  1502. <hr>
  1503. </div>
  1504. </div>
  1505. </div>
  1506. <div class="sect1">
  1507. <h2 id="night-vision"><a class="anchor" href="#night-vision"></a>Night Vision</h2>
  1508. <div class="sectionbody">
  1509. <div class="paragraph">
  1510. <p>Features:</p>
  1511. </div>
  1512. <div class="ulist">
  1513. <ul>
  1514. <li>
  1515. <p>Apply a mask (Binoculars) and color to emulate night vision mode.</p>
  1516. </li>
  1517. </ul>
  1518. </div>
  1519. <table class="tableblock frame-all grid-all stretch">
  1520. <caption class="title">YouTube</caption>
  1521. <colgroup>
  1522. <col style="width: 50%;">
  1523. <col style="width: 50%;">
  1524. </colgroup>
  1525. <tbody>
  1526. <tr>
  1527. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1528. <div class="title">Night Vision Post Processor</div>
  1529. <p><span class="image"><a class="image" href="https://youtu.be/mNsjAVUTDPs"><img src="../../_images/sdk/plugin/mNsjAVUTDPs.jpg" alt="youtube_mNsjAVUTDPs" width="" height=""></a></span></p>
  1530. </div></div></td>
  1531. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1532. </tr>
  1533. </tbody>
  1534. </table>
  1535. <div class="sect2">
  1536. <h3 id="usage-12"><a class="anchor" href="#usage-12"></a>Usage</h3>
  1537. <div class="paragraph">
  1538. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/nightvision/TestNightVision.java">TestCase</a></p>
  1539. </div>
  1540. <div class="paragraph">
  1541. <p><a href="https://hub.jmonkeyengine.org/t/night-vision-filter-available-in-shaderblow-plugin/26892">Forum thread</a></p>
  1542. </div>
  1543. <hr>
  1544. </div>
  1545. </div>
  1546. </div>
  1547. <div class="sect1">
  1548. <h2 id="predator-thermal-vision"><a class="anchor" href="#predator-thermal-vision"></a>Predator Thermal Vision</h2>
  1549. <div class="sectionbody">
  1550. <div class="paragraph">
  1551. <p>Features:</p>
  1552. </div>
  1553. <div class="ulist">
  1554. <ul>
  1555. <li>
  1556. <p>Changes the color in the scene to emulate the predator thermal vision effect</p>
  1557. </li>
  1558. </ul>
  1559. </div>
  1560. <table class="tableblock frame-all grid-all stretch">
  1561. <caption class="title">YouTube</caption>
  1562. <colgroup>
  1563. <col style="width: 50%;">
  1564. <col style="width: 50%;">
  1565. </colgroup>
  1566. <tbody>
  1567. <tr>
  1568. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1569. <div class="title">Predator Thermal Vision</div>
  1570. <p><span class="image"><a class="image" href="https://youtu.be/DqBwCWVwTFQ"><img src="../../_images/sdk/plugin/DqBwCWVwTFQ.jpg" alt="youtube_DqBwCWVwTFQ" width="" height=""></a></span></p>
  1571. </div></div></td>
  1572. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1573. </tr>
  1574. </tbody>
  1575. </table>
  1576. <div class="sect2">
  1577. <h3 id="usage-13"><a class="anchor" href="#usage-13"></a>Usage</h3>
  1578. <div class="paragraph">
  1579. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/predatorvision/TestPredatorVision.java">TestCase</a></p>
  1580. </div>
  1581. <div class="paragraph">
  1582. <p><a href="https://hub.jmonkeyengine.org/t/predator-thermal-vision-filter-available-in-the-shaderblow-plugin/27005">Forum thread</a></p>
  1583. </div>
  1584. <hr>
  1585. </div>
  1586. </div>
  1587. </div>
  1588. <div class="sect1">
  1589. <h2 id="frosted-glass-effect"><a class="anchor" href="#frosted-glass-effect"></a>Frosted glass effect</h2>
  1590. <div class="sectionbody">
  1591. <div class="paragraph">
  1592. <p>Features:</p>
  1593. </div>
  1594. <div class="ulist">
  1595. <ul>
  1596. <li>
  1597. <p>Displays a frosted glass effect over the current scene</p>
  1598. </li>
  1599. </ul>
  1600. </div>
  1601. <table class="tableblock frame-all grid-all stretch">
  1602. <caption class="title">YouTube</caption>
  1603. <colgroup>
  1604. <col style="width: 50%;">
  1605. <col style="width: 50%;">
  1606. </colgroup>
  1607. <tbody>
  1608. <tr>
  1609. <td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
  1610. <div class="title">Frosted Glass effect Filter</div>
  1611. <p><span class="image"><a class="image" href="https://youtu.be/Bb0jVjqvURw"><img src="../../_images/sdk/plugin/Bb0jVjqvURw.jpg" alt="youtube_Bb0jVjqvURw" width="" height=""></a></span></p>
  1612. </div></div></td>
  1613. <td class="tableblock halign-left valign-top"><div class="content"></div></td>
  1614. </tr>
  1615. </tbody>
  1616. </table>
  1617. <div class="sect2">
  1618. <h3 id="usage-14"><a class="anchor" href="#usage-14"></a>Usage</h3>
  1619. <div class="paragraph">
  1620. <p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/frostedglass/TestFrostedGlass.java">TestCase</a></p>
  1621. </div>
  1622. <div class="paragraph">
  1623. <p><a href="https://hub.jmonkeyengine.org/t/frosted-glass-filter-available-in-the-shaderblow-plugin/27023">Forum thread</a></p>
  1624. </div>
  1625. <hr>
  1626. </div>
  1627. </div>
  1628. </div>
  1629. </article>
  1630. <aside class="toc sidebar" data-title="Contents" data-levels="2">
  1631. <div class="toc-menu"></div>
  1632. </aside>
  1633. </div>
  1634. </main>
  1635. </div>
  1636. <footer class="footer">
  1637. <p>This page was built using the Antora default UI.</p>
  1638. <p>The source code for this UI is licensed under the terms of the MPL-2.0 license.</p>
  1639. </footer>
  1640. <script src="../../../_/js/site.js"></script>
  1641. <script async src="../../../_/js/vendor/highlight.js"></script>
  1642. </body>
  1643. </html>