| 123456789 |
- <!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>Render Buckets</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"></head><body class="article toc2 toc-left"><div id="header"><h1>Render Buckets</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="toolbar"><a href="https://github.com/jMonkeyEngine/wiki/edit/master/src/docs/asciidoc/jme3/advanced/jme3_renderbuckets.adoc"><i class="fa fa-pencil-square" aria-hidden="true"></i></a><a href="https://github.com/jMonkeyEngine/wiki/new/master/src/docs/asciidoc/jme3/advanced/"><i class="fa fa-plus-square" aria-hidden="true"></i></a></div><div id="toctitle">Table of Contents</div></div></div><div id="content"><div class="paragraph"><p>For each viewport the rendering happens as follows:</p></div>
- <div class="ulist"><ul><li><p>For each processor call preFrame</p></li><li><p>Dispatch each geometry in a corresponding renderQueue (one for each Bucket) and build shadow queues</p></li><li><p>For each processor call postQueues</p></li><li><p>Rendering OpaqueBucket with object sorted front to back. (In order to minimize overdraw)</p></li><li><p>Rendering SkyBucket with depth forced to 1.0. this means every object of this bucket will be far away and behind everything</p></li><li><p>Rendering TransparentBucket with object sorted back to front. (So transparent objects can be seen correctly through each other)</p></li><li><p>For each processor call postFrame</p></li><li><p>Rendering TranslucentBucket with objects sorted back to front</p></li></ul></div>
- <div class="paragraph"><p>The translucent bucket is rendered at the end. That’s where you put transparent object that you don’t want to be affected by post processing ( shadows or what ever). Self-light-emitting particle emitters (such as a fire) are a good example.</p></div>
- <div class="paragraph"><p>Post processors are not applied to this bucket with one exception : the FilterPostProcessor.</p></div>
- <div class="paragraph"><p>The filter post processor hijacks the rendering process and renders a full screen quad with the texture of the scene applied on it.</p></div>
- <div class="paragraph"><p>Once it’s done the depth buffer is 0, so it’s impossible to render a queue over it with proper depth test so if you use a FilterPostProcessor you have to add at the end of your filter stack the TranslucentBucketFilter. It will handle the translucent bucket rendering instead of the RenderManager. (Of course the correct depth information is passed to the filter).</p></div>
- <div class="paragraph"><p>The nice side effect of this is that if you want to apply a post filter to your translucent bucket (like bloom for example) you can just push up the translucent bucket filter in the filter stack.</p></div></div><div id="footer"><div id="footer-text">Version <br>Last updated 2016-06-25 12:44:55 UTC</div></div></body></html>
|