| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- <!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="Asciidoctor 1.5.4"><title>ShaderBlow</title><link rel="stylesheet" href="./asciidoctor.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
- <link rel="stylesheet" href="./coderay-asciidoctor.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css"></head><body class="article toc2 toc-left"><div id="header"><div id="toolbar"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/src/docs/asciidoc/sdk/plugin/shaderblow.adoc"><i class="fa fa-pencil-square" aria-hidden="true"></i></a><a href="https://github.com/jMonkeyEngine/wiki/new/master/src/docs/asciidoc/sdk/plugin/"><i class="fa fa-plus-square" aria-hidden="true"></i></a><input dir="auto" style="position: relative; vertical-align: top;" spellcheck="false" autocomplete="off" class="searchbox__input aa-input" id="doc-search" name="search" placeholder="Search in the doc" required="required" type="search"><i class="fa fa-sort-down" aria-hidden="true"></i></div><h1>ShaderBlow</h1><div class="details"><span class="author" id="author"></span><br><span id="revnumber">version ,</span> <span id="revdate">2016/03/17 20:48</span></div><div id="toc" class="toc2"><div id="toctitle">Table of Contents</div><ul class="sectlevel1"><li><a href="#colorscale-filter">ColorScale Filter</a><ul class="sectlevel2"><li><a href="#usage">Usage</a></li></ul></li><li><a href="#grayscale-filter">GrayScale Filter</a><ul class="sectlevel2"><li><a href="#usage-2">Usage</a></li></ul></li><li><a href="#old-film-effect-filter">Old Film Effect Filter</a><ul class="sectlevel2"><li><a href="#usage-3">Usage</a></li></ul></li><li><a href="#lightblow-shader">LightBlow Shader</a></li><li><a href="#dissolver-shader">Dissolver Shader</a><ul class="sectlevel2"><li><a href="#usage-4">Usage</a></li></ul></li><li><a href="#fakeparticleblow-shader">FakeParticleBlow Shader</a><ul class="sectlevel2"><li><a href="#usage-5">Usage</a></li></ul></li><li><a href="#forceshield-shader">Forceshield Shader</a><ul class="sectlevel2"><li><a href="#usage-6">Usage</a></li></ul></li><li><a href="#matcap-shader">MatCap Shader</a><ul class="sectlevel2"><li><a href="#usage-7">Usage</a></li></ul></li><li><a href="#glass-shader">Glass Shader</a><ul class="sectlevel2"><li><a href="#usage-8">Usage</a></li></ul></li><li><a href="#simplerefraction-postprocessor-filter">SimpleRefraction PostProcessor/Filter</a><ul class="sectlevel2"><li><a href="#usage-9">Usage</a></li></ul></li><li><a href="#basicssao-filter">BasicSSAO Filter</a><ul class="sectlevel2"><li><a href="#usage-10">Usage</a></li></ul></li><li><a href="#electricity-shaders">Electricity Shaders</a></li><li><a href="#simplesprite-shader">SimpleSprite Shader</a></li><li><a href="#bubble-shader">Bubble Shader</a></li><li><a href="#simplespriteparticle-shader">SimpleSpriteParticle Shader</a></li><li><a href="#texture-bombing">Texture Bombing</a><ul class="sectlevel2"><li><a href="#usage-11">Usage</a></li></ul></li><li><a href="#night-vision">Night Vision</a><ul class="sectlevel2"><li><a href="#usage-12">Usage</a></li></ul></li><li><a href="#predator-thermal-vision">Predator Thermal Vision</a><ul class="sectlevel2"><li><a href="#usage-13">Usage</a></li></ul></li><li><a href="#frosted-glass-effect">Frosted glass effect</a><ul class="sectlevel2"><li><a href="#usage-14">Usage</a></li></ul></li></ul></div></div><div id="content"><div id="preamble"><div class="sectionbody"><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/shaderblow_intro_01.jpg" alt="shaderblow_intro_01.jpg" width="" height=""></span></p></div>
- <div class="paragraph"><p>Collections of effects for jMonkeyEngine 3. To install the ShaderBlow plugin into the jMonkeyEngine SDK, go to Tools→Plugins→Available Plugins.
- You can always get the source of ShaderBlow project here:
- <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib">ShaderBlow project Github</a></p></div>
- <div class="paragraph"><p>The source has many examples and tests to explain the capacity of shaders much better.</p></div>
- <div class="ulist"><ul><li><p>Filters:</p><div class="ulist"><ul><li><p>Basic SSAO</p></li><li><p>ColorScale (added by @H)</p></li><li><p>GrayScale (added by @H)</p></li><li><p>Simple Refraction (added by @mifth)</p></li><li><p>Old Film Effect (added by @H)</p></li><li><p>Night Vision (added by @wezrule)</p></li><li><p>Predator Thermal Vision (added by @wezrule)</p></li><li><p>Frosted Glass effect (added by @wezrule)</p></li></ul></div></li><li><p>Shaders</p><div class="ulist"><ul><li><p>Dissolver (added by @thetoucher)</p></li><li><p>FakeParticleBlow (added by @mifth)</p></li><li><p>Forceshield (added by @ficik)</p></li><li><p>MatCap (added by @mifth)</p></li><li><p>Glass (added by @mifth)</p></li><li><p>Texture Bombing (added by @wezrule)</p></li></ul></div></li></ul></div>
- <div class="admonitionblock note"><table><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content"><div class="paragraph"><p>Official Forum: <a href="https://hub.jmonkeyengine.org/t/shaderblow-project/26655">https://hub.jmonkeyengine.org/forum/t/shaderblow-project/26655</a>
- Or you can use the forum threads of shaders.</p></div></td></tr></table></div>
- <hr></div></div>
- <div class="sect2"><h3 id="colorscale-filter">ColorScale Filter</h3><div class="paragraph"><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></div>
- <div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Allow to set the color to apply. Default is red.</p></li><li><p>Allow to set intensity of the color. Default is 0.7f. Frag shader clamps color intensity between 0 and 1.</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/colorfilter2.png" alt="ColorScale Filter OFF" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/colorfilter1.png" alt="ColorScale filter ON" width="400" height=""></span></p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/colorfilter3.png" alt="ColorScale Filter ON" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/colorfilter4.png" alt="ColorScale Filter" width="400" height=""></span></p></div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage">Usage</h3><div class="paragraph"><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’s viewPort attribute.</p></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code data-lang="java"><span class="local-variable">this</span>.fpp = <span class="keyword">new</span> FilterPostProcessor(<span class="local-variable">this</span>.assetManager);
- <span class="local-variable">this</span>.fpp.setNumSamples(<span class="integer">4</span>);
- <span class="local-variable">this</span>.colorScale = <span class="keyword">new</span> ColorScaleFilter();
- <span class="local-variable">this</span>.fpp.addFilter(<span class="local-variable">this</span>.colorScale);
- <span class="comment">// colorScale.setFilterColor(ColorRGBA.Red.clone()); // Set Filter color</span>
- <span class="comment">// colorScale.setColorDensity(0.5f); // Set Color intensity (between 0 and 1);</span>
- <span class="local-variable">this</span>.viewPort.addProcessor(<span class="local-variable">this</span>.fpp);</code></pre></div></div>
- <div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/color/TestColorScale.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/colorscale-filter-added-to-shaderblow/23995">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="grayscale-filter">GrayScale Filter</h3><div class="paragraph"><p>The GrayScale filter converts the render image to grayscale.</p></div>
- <table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><thead><tr><th class="tableblock halign-left valign-top"><strong>GrayScale Filter OFF</strong></th><th class="tableblock halign-left valign-top"><strong>GrayScale Filter ON</strong></th></tr></thead><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/grayscalefilter-off.jpg" alt="GrayScale Filter OFF" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/grayscalefilter-on.png" alt="GrayScale Filter ON" width="400" height=""></span></p></div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-2">Usage</h3><div class="paragraph"><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’s viewPort attribute.</p></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code data-lang="java"><span class="local-variable">this</span>.fpp = <span class="keyword">new</span> FilterPostProcessor(<span class="local-variable">this</span>.assetManager); <span class="comment">// Create FilterPostProcessor instance</span>
- <span class="local-variable">this</span>.grayScale = <span class="keyword">new</span> GrayScaleFilter(); <span class="comment">// Create GrayScaleFilter instance</span>
- <span class="local-variable">this</span>.fpp.addFilter(<span class="local-variable">this</span>.grayScale); <span class="comment">// Add GrayScaleFilter instance to FilterPostProcessor instance</span>
- <span class="local-variable">this</span>.viewPort.addProcessor(<span class="local-variable">this</span>.fpp); <span class="comment">// Add FilterPostProcessor instance to ViewPort</span></code></pre></div></div>
- <div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/grayscale/TestGrayScale.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/solved-grayscale-filter/23656">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="old-film-effect-filter">Old Film Effect Filter</h3><div class="paragraph"><p>Old Film filter simulate the effect of a classic looking film effect. It’s a port of this <a href="http://devmaster.net/posts/2989/shader-effects-old-film">shader effect</a>.</p></div>
- <div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Allow to set the <strong>filter’s color</strong>. Default is sepia (ColorRGBA(112f / 255f, 66f / 255f, 20f / 255f, 1.0f)).</p></li><li><p>Allow to set the <strong>color’s density</strong>. Default is 0.7. Shader clamps this value between 0 to 1. The color image gets grayscale when color’s densite is set to 0.</p></li><li><p>Allow to set the <strong>noise’s density</strong>. Default is 0.4. Shader clamps this value between 0 to 1.</p></li><li><p>Allow to set the <strong>scratches' density</strong>. Default is 0.3. Shader clamps this value between 0 to 1.</p></li><li><p>Allow to set the <strong>vignetting’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></li></ul></div>
- <div class="admonitionblock note"><table><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content"><div class="paragraph"><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></div></td></tr></table></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">Old Film Effect</div>
- <p><span class="image"><a class="image" href="https://youtu.be/CgFzhkq-MKk"><img src="../../sdk/plugin/CgFzhkq-MKk.jpg" alt="youtu.be/CgFzhkq-MKk" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-3">Usage</h3><div class="paragraph"><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’s viewPort attribute.</p></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code data-lang="java"><span class="local-variable">this</span>.fpp = <span class="keyword">new</span> FilterPostProcessor(<span class="local-variable">this</span>.assetManager); <span class="comment">// Create FilterPostProcessor instance</span>
- <span class="local-variable">this</span>.oldFilmFilter= <span class="keyword">new</span> OldFilmFilter(); <span class="comment">// Create OldFilmFilter instance</span>
- <span class="local-variable">this</span>.fpp.addFilter(<span class="local-variable">this</span>.oldFilmFilter); <span class="comment">// Add OldFilmFilter instance to FilterPostProcessor instance</span>
- <span class="local-variable">this</span>.viewPort.addProcessor(<span class="local-variable">this</span>.fpp); <span class="comment">// Add FilterPostProcessor instance to ViewPort</span></code></pre></div></div>
- <div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/oldfilm/TestOldFilm.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/old-film-effect-filter/25464">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect1"><h2 id="lightblow-shader">LightBlow Shader</h2><div class="sectionbody"><div class="paragraph"><p>The Lightblow shader is an improved Lighting shader for JME.</p></div>
- <div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Improved lighting calculations.</p></li><li><p>Improved reflection calculations.</p></li><li><p>Reflection map implementation with alpha normal map.</p></li><li><p>Improved Minnaert calculations.</p></li><li><p>Hemispherical lighting.</p></li><li><p>Image Based Lighting with Albedo.</p></li><li><p>Emissive map implementation with diffuse alpha.</p></li><li><p>normalization of normals by default.</p></li><li><p>Specular map implementation with normal map alpha.</p></li><li><p>Specular intensity implementation.</p></li><li><p>Switching -x/-y/-z normals for different normal maps. (3dmax, blender, xnormal have different approaches).</p></li><li><p>Specular Color now works with specular maps</p></li><li><p>Glowblow fragment shader is added with m_GlowIntensity? uniform. It’s possible to change glow intensity for objects. Please, use DiffuseMap? as GlowMap? instead of new additional Glow rgb texture.</p></li><li><p>Lightmaps are added.</p></li><li><p>Rim Lighting is added. Thanks to Thetoucher from JME Blog!</p></li><li><p>Fog is added. Fog is used without post-processing!</p></li><li><p>Texture Blending: 4 diffuse, 4 normal textures can be blended (Like Terrain System).</p></li></ul></div>
- <div class="paragraph"><p>Software for NormalMaps? making: <a href="http://shadermap.com/shadermap_pro.php">http://shadermap.com/shadermap_pro.php</a><br>
- 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></div>
- <div class="paragraph"><p>Watch following videos:</p></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">LightBlow Shader</div>
- <p><span class="image"><a class="image" href="https://youtu.be/knROh_3o2uo"><img src="../../sdk/plugin/knROh_3o2uo.jpg" alt="youtube_https://youtu.be/knROh_3o2uo" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/lightblow-shader/16182">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="dissolver-shader">Dissolver Shader</h3><div class="paragraph"><p>The Dissolve Shader uses a simple grey scale image as an animated mask to hide a material.</p></div>
- <div class="paragraph"><p>The shader incrementally clamps off the colour value, dark to light, and uses that for a masking texture to discard pixels.
- It is currently capped for convenience at 255 frames of animation and is only using one colour channel.
- 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></div>
- <table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/dissolver-screen.png" alt="Dissolver screenshot" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/dissolver-maps.png" alt="Mask maps" width="400" height=""></span></p></div></div></td></tr></tbody></table>
- <div class="paragraph"><p>Starting at the top left we have: simple linear dissolve, organic dissolve and pixel dissolve.
- And bottom row: organic growth, texture masking, organic burn.
- Mask texture maps on the second image.</p></div>
- <div class="paragraph"><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></div>
- <div class="olist arabic"><ol class="arabic"><li><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></li><li><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><div class="olist loweralpha"><ol class="loweralpha" type="a"><li><p>paint damage on a car;</p></li><li><p>lacerations on a character;</p></li><li><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></li></ol></div></li><li><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></li></ol></div>
- <div class="paragraph"><p>Watch following videos:</p></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">GLSL Dissolve Shader</div>
- <p><span class="image"><a class="image" href="https://youtu.be/ry0r_qwFQLQ"><img src="../../sdk/plugin/ry0r_qwFQLQ.jpg" alt="youtube_ry0r_qwFQLQ" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">mTheoryGame</div>
- <p><span class="image"><a class="image" href="https://youtu.be/wUfMcN1Uv48"><img src="../../sdk/plugin/wUfMcN1Uv48.jpg" alt="youtube_wUfMcN1Uv48" width="" height=""></a></span></p></div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-4">Usage</h3><div class="paragraph"><p>The shader requires 2 parameters:</p></div>
- <div class="ulist"><ul><li><p>a Texture2D texture map to use as the dissolve map; and</p></li><li><p>a Vector2 of internal params params:</p><div class="ulist"><ul><li><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></li><li><p>the second value is an int use as an inversion switch, 1 to invert the dissolve/discard, 0 to leave as is.</p></li></ul></div></li></ul></div>
- <div class="admonitionblock note"><table><tr><td class="icon"><i class="fa icon-note" title="Note"></i></td><td class="content"><div class="paragraph"><p>Dissolver is based on Common/MatDefs/Lighting.j3md. So, all Common/MatDefs/Lighting.j3md features should be available on the dissolver too.</p></div></td></tr></table></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code data-lang="java"><span class="comment">// Create a material instance using ShaderBlow's Lighting.j3md</span>
- <span class="directive">final</span> Material mat = <span class="keyword">new</span> Material(<span class="local-variable">this</span>.assetManager, <span class="string"><span class="delimiter">"</span><span class="content">ShaderBlow/MatDefs/Dissolve/Lighting.j3md</span><span class="delimiter">"</span></span>);
- mat.setColor(<span class="string"><span class="delimiter">"</span><span class="content">Ambient</span><span class="delimiter">"</span></span>, ColorRGBA.Blue);
- mat.setColor(<span class="string"><span class="delimiter">"</span><span class="content">Diffuse</span><span class="delimiter">"</span></span>, ColorRGBA.White);
- mat.setColor(<span class="string"><span class="delimiter">"</span><span class="content">Specular</span><span class="delimiter">"</span></span>, ColorRGBA.Black);
- mat.setBoolean(<span class="string"><span class="delimiter">"</span><span class="content">UseMaterialColors</span><span class="delimiter">"</span></span>, <span class="predefined-constant">true</span>);
- <span class="local-variable">this</span>.assetManager.loadTexture(<span class="string"><span class="delimiter">"</span><span class="content">TestTextures/Dissolve/burnMap.png</span><span class="delimiter">"</span></span>, mat.setTexture(<span class="string"><span class="delimiter">"</span><span class="content">DissolveMap</span><span class="delimiter">"</span></span>, map); <span class="comment">// Set mask texture map</span>
- <span class="local-variable">this</span>.DSParams = <span class="keyword">new</span> Vector2f(<span class="integer">0</span>, <span class="integer">0</span>); <span class="comment">// standard dissolver</span>
- <span class="comment">//this.DSParamsInv = new Vector2f(0, 1); // inverted dissolver</span>
- mat.setVector2(<span class="string"><span class="delimiter">"</span><span class="content">DissolveParams</span><span class="delimiter">"</span></span>, <span class="local-variable">this</span>.DSParams); <span class="comment">// Set params</span>
- <span class="directive">final</span> <span class="predefined-type">Box</span> b = <span class="keyword">new</span> <span class="predefined-type">Box</span>(Vector3f.ZERO, <span class="integer">1</span>, <span class="integer">1</span>, <span class="integer">1</span>);
- <span class="directive">final</span> Geometry geom = <span class="keyword">new</span> Geometry(<span class="string"><span class="delimiter">"</span><span class="content">Box</span><span class="delimiter">"</span></span>, b);
- geom.setMaterial(mat);</code></pre></div></div>
- <div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/dissolve/TestDissolve.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/dissolve-shader/18720">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="fakeparticleblow-shader">FakeParticleBlow Shader</h3><div class="paragraph"><p>Effect for fire or engine of a ship. Such an effect is used in the “Eve Online game for ship engines.</p></div>
- <div class="paragraph"><p>Features:</p></div>
- <div class="olist arabic"><ol class="arabic"><li><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></li><li><p>X and/or Y animation direction. No animation is supported also.</p></li><li><p>Animation direction changer. By default the Y axis animation’s direction is up-to-down and the X axis animation’s direction is right-to-left.</p></li><li><p>Allow to set animation speed.</p></li><li><p>Allow to set mask texture in order to set particle shape.</p></li><li><p>Allow to set particle color.</p></li><li><p>Allow to set fog color. Fog color is applyed to the material using for color’s alpha value as fog distance factor.</p></li></ol></div>
- <table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/fakeparticleblow.png" alt="FakeParticleBlow" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">Fog applied to blue fire</div>
- <p><span class="image"><img src="../../sdk/plugin/fakeparticleblow3.png" alt="FakeParticleBlow" width="400" height=""></span></p></div></div></td></tr></tbody></table>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">FakeParticleBlow Shader</div>
- <p><span class="image"><a class="image" href="https://youtu.be/hdQop4yZ-lA"><img src="../../sdk/plugin/hdQop4yZ-lA.jpg" alt="youtube_hdQop4yZ-lA" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-5">Usage</h3><div class="paragraph"><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>.
- Set material’s parameters and set the material to a spatial.</p></div>
- <div class="paragraph"><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></div>
- <div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/fakeobject.png" alt="fakeobject.png" width="100" height=""></span></p></div>
- <div class="admonitionblock important"><table><tr><td class="icon"><i class="fa icon-important" title="Important"></i></td><td class="content"><div class="paragraph"><p>Remenber to set the queue bucket to transparent for the spatial.</p></div></td></tr></table></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code data-lang="java"><span class="comment">// Create the material</span>
- <span class="directive">final</span> Material mat = <span class="keyword">new</span> Material(<span class="local-variable">this</span>.assetManager, <span class="string"><span class="delimiter">"</span><span class="content">ShaderBlow/MatDefs/FakeParticleBlow/FakeParticleBlow.j3md</span><span class="delimiter">"</span></span>);
- <span class="comment">// Create the mask texture to use</span>
- <span class="directive">final</span> Texture maskTex = <span class="local-variable">this</span>.assetManager.loadTexture(<span class="string"><span class="delimiter">"</span><span class="content">TestTextures/FakeParticleBlow/mask.png</span><span class="delimiter">"</span></span>);
- mat.setTexture(<span class="string"><span class="delimiter">"</span><span class="content">MaskMap</span><span class="delimiter">"</span></span>, maskTex);
- <span class="comment">// Create the texture to use for the spatial.</span>
- <span class="directive">final</span> Texture aniTex = <span class="local-variable">this</span>.assetManager.loadTexture(<span class="string"><span class="delimiter">"</span><span class="content">TestTextures/FakeParticleBlow/particles.png</span><span class="delimiter">"</span></span>);
- aniTex.setWrap(WrapMode.MirroredRepeat); <span class="comment">// NOTE: Set WrapMode = MirroredRepeat in order to animate the texture</span>
- mat.setTexture(<span class="string"><span class="delimiter">"</span><span class="content">AniTexMap</span><span class="delimiter">"</span></span>, aniTex); <span class="comment">// Set texture</span>
- mat.setFloat(<span class="string"><span class="delimiter">"</span><span class="content">TimeSpeed</span><span class="delimiter">"</span></span>, <span class="integer">2</span>); <span class="comment">// Set animation speed</span>
- mat.setColor(<span class="string"><span class="delimiter">"</span><span class="content">BaseColor</span><span class="delimiter">"</span></span>, ColorRGBA.Green.clone()); <span class="comment">// Set base color to apply to the texture</span>
- <span class="comment">// mat.setBoolean("Animation_X", true); // Enable X axis animation</span>
- mat.setBoolean(<span class="string"><span class="delimiter">"</span><span class="content">Animation_Y</span><span class="delimiter">"</span></span>, <span class="predefined-constant">true</span>); <span class="comment">// Enable Y axis animation</span>
- mat.setBoolean(<span class="string"><span class="delimiter">"</span><span class="content">Change_Direction</span><span class="delimiter">"</span></span>, <span class="predefined-constant">true</span>); <span class="comment">// Change direction of the texture animation</span>
- mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off); <span class="comment">// Allow to see both sides of a face</span>
- mat.getAdditionalRenderState().setBlendMode(BlendMode.Additive);
- <span class="directive">final</span> ColorRGBA fogColor = ColorRGBA.Black.clone();
- fogColor.a = <span class="integer">10</span>; <span class="comment">// fogColor's alpha value is used to calculate the intensity of the fog (distance to apply fog)</span>
- mat.setColor(<span class="string"><span class="delimiter">"</span><span class="content">FogColor</span><span class="delimiter">"</span></span>, fogColor); <span class="comment">// Set fog color to apply to the spatial.</span>
- <span class="directive">final</span> Quad quad = <span class="keyword">new</span> Quad(<span class="integer">3</span>, <span class="integer">3</span>); <span class="comment">// Create an spatial. A plane in this case</span>
- <span class="directive">final</span> Geometry geom = <span class="keyword">new</span> Geometry(<span class="string"><span class="delimiter">"</span><span class="content">Particle</span><span class="delimiter">"</span></span>, quad);
- geom.setMaterial(mat); <span class="comment">// Assign the material to the spatial</span>
- TangentBinormalGenerator.generate(geom);
- geom.setQueueBucket(Bucket.Transparent); <span class="comment">// Remenber to set the queue bucket to transparent for the spatial</span></code></pre></div></div>
- <div class="paragraph"><p>To get green/yellow/blue fog (not transparency):</p></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code data-lang="java">mat.getAdditionalRenderState().setBlendMode(BlendMode.AlphaAdditive);
- <span class="directive">final</span> ColorRGBA fogColor = ColorRGBA.Blue.clone();</code></pre></div></div>
- <div class="paragraph"><p>Several planes geometries will be required as there will be AlphaAdditive material.</p></div>
- <div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/fakeparticleblow/TestFakeParticleBlow.java">TestCase 1</a><br>
- <a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/fakeparticleblow/TestFakeParticleBlow2.java">TestCase 2</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/fakeparticleblow-shader/16443">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="forceshield-shader">Forceshield Shader</h3><div class="paragraph"><p>Forcefield shader adds shield effect to a spatial.
- 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></div>
- <div class="paragraph"><p>Hits are registred as contact point position using this control and effect animation is based on distance from contact point and time.
- Max number of hits displayed is 4.</p></div>
- <div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Allow to set texture of the shield.</p></li><li><p>Allow to set color of the shield.</p></li><li><p>Allow to set minimal visibility (similar to alpha value). Default is 0, that means shield is no displayed, only hit animations.</p></li><li><p>Allow to set effect duration. Default is 0.5s.</p></li><li><p>Allow to set effect size. Default is 1.</p></li><li><p>Allow to enable/disable hit animations.</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">Forceshield Shader</div>
- <p><span class="image"><a class="image" href="https://youtu.be/uu2nbaBM9Pk"><img src="../../sdk/plugin/uu2nbaBM9Pk.jpg" alt="youtube_uu2nbaBM9Pk" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">Forceshield Cube Shader</div>
- <p><span class="image"><a class="image" href="https://youtu.be/urzMiUeHsCc"><img src="../../sdk/plugin/urzMiUeHsCc.png" alt="youtube_urzMiUeHsCc" width="" height=""></a></span></p></div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-6">Usage</h3><div class="paragraph"><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.
- Add the control instance to the spatial.</p></div>
- <div class="admonitionblock important"><table><tr><td class="icon"><i class="fa icon-important" title="Important"></i></td><td class="content"><div class="paragraph"><p>If you experience problems, try higher polygon object.</p></div></td></tr></table></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code data-lang="java"><span class="comment">// Create spatial to be the shield</span>
- <span class="directive">final</span> Sphere sphere = <span class="keyword">new</span> Sphere(<span class="integer">30</span>, <span class="integer">30</span>, <span class="float">1.2f</span>);
- <span class="directive">final</span> Geometry shield = <span class="keyword">new</span> Geometry(<span class="string"><span class="delimiter">"</span><span class="content">forceshield</span><span class="delimiter">"</span></span>, sphere);
- shield.setQueueBucket(Bucket.Transparent); <span class="comment">// Remenber to set the queue bucket to transparent for the spatial</span>
- <span class="comment">// Create ForceShieldControl</span>
- <span class="local-variable">this</span>.forceShieldControl = <span class="keyword">new</span> ForceShieldControl(<span class="local-variable">this</span>.assetManager, <span class="float">0.5f</span>);
- shield.addControl(<span class="local-variable">this</span>.forceShieldControl); <span class="comment">// Add the control to the spatial</span>
- <span class="local-variable">this</span>.forceShieldControl.setEffectSize(<span class="float">2f</span>); <span class="comment">// Set the effect size</span>
- <span class="local-variable">this</span>.forceShieldControl.setColor(<span class="keyword">new</span> ColorRGBA(<span class="integer">1</span>, <span class="integer">0</span>, <span class="integer">0</span>, <span class="integer">3</span>)); <span class="comment">// Set effect color</span>
- <span class="local-variable">this</span>.forceShieldControl.setVisibility(<span class="float">0.1f</span>); <span class="comment">// Set shield visibility.</span>
- <span class="comment">// Set a texture to the shield</span>
- <span class="local-variable">this</span>.forceShieldControl.setTexture(<span class="local-variable">this</span>.assetManager.loadTexture(<span class="string"><span class="delimiter">"</span><span class="content">TestTextures/ForceShield/fs_texture.png</span><span class="delimiter">"</span></span>));
- <span class="comment">// this.forceShieldControl.setEnabled(false); // Enable, disable animation.</span></code></pre></div></div>
- <div class="paragraph"><p>Use <em>forceShieldControl.registerHit(final Vector3f position)</em> method to register a hit.</p></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code data-lang="java"><span class="directive">final</span> CollisionResults crs = <span class="keyword">new</span> CollisionResults();
- <span class="local-variable">this</span>.rootNode.collideWith(<span class="keyword">new</span> Ray(<span class="local-variable">this</span>.cam.getLocation(), <span class="local-variable">this</span>.cam.getDirection()), crs);
- <span class="keyword">if</span> (crs.getClosestCollision() != <span class="predefined-constant">null</span>) {
- <span class="comment">// Register a hit</span>
- <span class="local-variable">this</span>.forceShieldControl.registerHit(crs.getClosestCollision().getContactPoint());
- }</code></pre></div></div>
- <div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/forceshield/TestShield.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/forceshield-my-very-first-shader/18673">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="matcap-shader">MatCap Shader</h3><div class="paragraph"><p>MatCap shader will be very useful for scrollshooters to imitate different materials like glass, gold, metals.
- The shader does not use any lights, only one texture.</p></div>
- <div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Fog color and fog skybox.</p></li><li><p>Toon edge effect.</p></li><li><p>Multiply color: set a color to change texture’s color.</p></li><li><p>Normal map.</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/shaderblow_matcap.jpg" alt="MatCap shader" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/matcap3.png" alt="Multiply color" width="400" height=""></span></p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/matcap1.png" alt="Toon edge effect" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/matcap2.png" alt="Fog effect" width="400" height=""></span></p></div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-7">Usage</h3><div class="paragraph"><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’s parameters and set the material to a spatial.</p></div>
- <div class="admonitionblock important"><table><tr><td class="icon"><i class="fa icon-important" title="Important"></i></td><td class="content"><div class="paragraph"><p>Remember to add a DirectionalLight if you want to use toon edge effect.</p></div></td></tr></table></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code>Material My Material : ShaderBlow/MatDefs/MatCap/MatCap.j3md {
- MaterialParameters {
- DiffuseMap : Flip TestTextures/matcaps/met2.png
- Nor_Inv_Y : true
- Nor_Inv_X : false
- Nor_Inv_Z : false
- NormalMap : TestModels/LightBlow/jme_lightblow_nor.png
- FogSkyBox : Flip TestTextures/Water256.dds
- Toon : true
- EdgesColor : 1.0 0.0 0.0 1.0
- EdgeSize : 0.01
- Fog_Edges : true
- }
- AdditionalRenderState {
- }
- }</code></pre></div></div>
- <div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/matcap/TestMatCap.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/glsl-matcap-shader-done/18920">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="glass-shader">Glass Shader</h3><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Fog color and fog skybox.</p></li><li><p>Toon edge effect.</p></li><li><p>Multiply color: set a color to change texture’s color.</p></li><li><p>Normal map.</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/glass-shader.png" alt="Glass shader" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/glass-shader2.png" alt="Glass Shader and Fog Color effect" width="400" height=""></span></p></div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-8">Usage</h3><div class="paragraph"><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’s parameters and set the material to a spatial.</p></div>
- <div class="admonitionblock important"><table><tr><td class="icon"><i class="fa icon-important" title="Important"></i></td><td class="content"><div class="paragraph"><p>Remember to add a DirectionalLight if you want to use toon edge effect.</p></div></td></tr></table></div>
- <div class="listingblock"><div class="content"><pre class="CodeRay highlight"><code>Material My Material : ShaderBlow/MatDefs/Glass/Glass.j3md {
- MaterialParameters {
- RefMap : Flip TestTextures/Water256.dds
- Multiply_Color : 1.1 1.5 1.1 1.0
- colorIntensity : 0.79999995
- Nor_Inv_Y : true
- NormalMap : TestModels/LightBlow/jme_lightblow_nor.png
- ChromaticAbberation : true
- abberIndex : 0.04
- specularIntensity : 0.59999996
- Toon : true
- EdgesColor : 0.2 1.0 0.0 1.0
- EdgeSize : 0.01
- Fog_Edges : true
- }
- AdditionalRenderState {
- }
- }</code></pre></div></div>
- <div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/glass/TestGlass.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/glsl-glass-shader-done/19050">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="simplerefraction-postprocessor-filter">SimpleRefraction PostProcessor/Filter</h3><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Cool refraction effect</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">SimpleRefraction PostProcessor</div>
- <p><span class="image"><a class="image" href="https://youtu.be/EAUKCU5GRmc"><img src="../../sdk/plugin/EAUKCU5GRmc.jpg" alt="youtube_EAUKCU5GRmc" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-9">Usage</h3><div class="paragraph"><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></div>
- <div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/src/com/shaderblow/filter/simplerefractionfilter/SimpleRefractionFilter.java">TestCase for Filter</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="basicssao-filter">BasicSSAO Filter</h3><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Cool Shadows.</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/shaderblow_ssao.png" alt="Glass shader" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-10">Usage</h3><div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/basicssao/TestBasicSSAO.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/wip-basicssao-added-optional-smoothing/23490">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect1"><h2 id="electricity-shaders">Electricity Shaders</h2><div class="sectionbody"><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Cool Electricity effect</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">Electricity Shaders</div>
- <p><span class="image"><a class="image" href="https://youtu.be/JDTES95HnPE"><img src="../../sdk/plugin/JDTES95HnPE.jpg" alt="youtube_JDTES95HnPE" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/electricity-shaders/23436">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect1"><h2 id="simplesprite-shader">SimpleSprite Shader</h2><div class="sectionbody"><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>GPU animated texture.</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/shaderblow_simplesprite_shader.png" alt="Glass shader" width="400" height=""></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">SimpleSprite Shader</div>
- <p><span class="image"><a class="image" href="https://youtu.be/7XFxbt-dw3I"><img src="../../sdk/plugin/7XFxbt-dw3I.jpg" alt="youtube_7XFxbt-dw3I" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/texture-animation-shader-done/19579">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect1"><h2 id="bubble-shader">Bubble Shader</h2><div class="sectionbody"><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Cool nice bubble.</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">Bubble Shader</div>
- <p><span class="image"><a class="image" href="https://youtu.be/rkFbLZ1EOhg"><img src="../../sdk/plugin/rkFbLZ1EOhg.jpg" alt="youtube_rkFbLZ1EOhg" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/bubble-shader/26169">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect1"><h2 id="simplespriteparticle-shader">SimpleSpriteParticle Shader</h2><div class="sectionbody"><div class="paragraph"><p>Features:
- 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).
- FULL LIBRARY PLUGIN: <a href="http://code.google.com/p/petomancer/downloads/detail?name=SpriteLibrary.zip&can=2&q=">http://code.google.com/p/petomancer/downloads/detail?name=SpriteLibrary.zip&can=2&q=</a></p></div>
- <div class="paragraph"><p><span class="image"><img src="../../sdk/plugin/shaderblow_simplespriteparticle_shader.png" alt="shaderblow_simplespriteparticle_shader.png" width="400" height=""></span></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/spritelibrary-efficient-render-of-sprites/20901">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="texture-bombing">Texture Bombing</h3><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Applying random images from a texture atlas to a model by dividing up the model’s UV textures into cells.</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">GLSL Texture Bomb</div>
- <p><span class="image"><a class="image" href="https://youtu.be/3lBhu2c5V8o"><img src="../../sdk/plugin/3lBhu2c5V8o.jpg" alt="youtube_3lBhu2c5V8o" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-11">Usage</h3><div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/texturebombing/TestTextureBombing.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/texture-glyph-bombing-shader/26867">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="night-vision">Night Vision</h3><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Apply a mask (Binoculars) and color to emulate night vision mode.</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">Night Vision Post Processor</div>
- <p><span class="image"><a class="image" href="https://youtu.be/mNsjAVUTDPs"><img src="../../sdk/plugin/mNsjAVUTDPs.jpg" alt="youtube_mNsjAVUTDPs" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-12">Usage</h3><div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/nightvision/TestNightVision.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/night-vision-filter-available-in-shaderblow-plugin/26892">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="predator-thermal-vision">Predator Thermal Vision</h3><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Changes the color in the scene to emulate the predator thermal vision effect</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">Predator Thermal Vision</div>
- <p><span class="image"><a class="image" href="https://youtu.be/DqBwCWVwTFQ"><img src="../../sdk/plugin/DqBwCWVwTFQ.jpg" alt="youtube_DqBwCWVwTFQ" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-13">Usage</h3><div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/predatorvision/TestPredatorVision.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/predator-thermal-vision-filter-available-in-the-shaderblow-plugin/27005">Forum thread</a></p></div>
- <hr></div></div>
- <div class="sect2"><h3 id="frosted-glass-effect">Frosted glass effect</h3><div class="paragraph"><p>Features:</p></div>
- <div class="ulist"><ul><li><p>Displays a frosted glass effect over the current scene</p></li></ul></div>
- <table class="tableblock frame-all grid-all spread"><caption class="title">YouTube</caption><colgroup><col style="width: 50%;"><col style="width: 50%;"></colgroup><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><div class="title">Frosted Glass effect Filter</div>
- <p><span class="image"><a class="image" href="https://youtu.be/Bb0jVjqvURw"><img src="../../sdk/plugin/Bb0jVjqvURw.jpg" alt="youtube_Bb0jVjqvURw" width="" height=""></a></span></p></div></div></td><td class="tableblock halign-left valign-top"><div></div></td></tr></tbody></table>
- <div class="sect2"><h3 id="usage-14">Usage</h3><div class="paragraph"><p><a href="https://github.com/jMonkeyEngine-Contributions/shaderblowlib/blob/master/ShaderBlow/test-src/com/shaderblow/test/filter/frostedglass/TestFrostedGlass.java">TestCase</a></p></div>
- <div class="paragraph"><p><a href="https://hub.jmonkeyengine.org/t/frosted-glass-filter-available-in-the-shaderblow-plugin/27023">Forum thread</a></p></div>
- <hr></div></div></div><div id="footer"><div id="footer-text">Version <br>Last updated 2017-10-25 21:59:24 +00:00</div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script><script>docsearch({
- apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
- indexName: 'jmonkeyengine',
- inputSelector: '#doc-search',
- debug: false // Set debug to true if you want to inspect the dropdown
- });</script></body></html>
|