<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[The ryg blog]]></provider_name><provider_url><![CDATA[https://fgiesen.wordpress.com]]></provider_url><author_name><![CDATA[fgiesen]]></author_name><author_url><![CDATA[https://fgiesen.wordpress.com/author/fgiesen/]]></author_url><title><![CDATA[Optimizing Software Occlusion Culling &#8211;&nbsp;index]]></title><type><![CDATA[link]]></type><html><![CDATA[<p>In January of 2013, some nice folks at Intel released a <a href="http://software.intel.com/en-us/vcsource/samples/software-occlusion-culling">Software Occlusion Culling demo</a> with full source code. I spent about two weekends playing around with the code, and after realizing that it made a great example for various things I&#8217;d been meaning to write about for a long time, started churning out blog posts about it for the next few weeks. This is the resulting series.</p>
<p>Here&#8217;s the list of posts (the series is now finished):</p>
<ol>
<li><a href="https://fgiesen.wordpress.com/2013/01/29/write-combining-is-not-your-friend/">&#8220;Write combining is not your friend&#8221;</a>, on typical write combining issues when writing graphics code.</li>
<li><a href="https://fgiesen.wordpress.com/2013/01/30/a-string-processing-rant/">&#8220;A string processing rant&#8221;</a>, a slightly over-the-top post that starts with some bad string processing habits and ends in a rant about what a complete minefield the standard C/C++ string processing functions and classes are whenever non-ASCII character sets are involved.</li>
<li><a href="https://fgiesen.wordpress.com/2013/01/31/cores-dont-like-to-share/">&#8220;Cores don&#8217;t like to share&#8221;</a>, on some very common pitfalls when running multiple threads that share memory.</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/01/fixing-cache-issues-the-lazy-way/">&#8220;Fixing cache issues, the lazy way&#8221;</a>. You could redesign your system to be more cache-friendly &#8211; but when you don&#8217;t have the time or the energy, you could also just do this.</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/02/frustum-culling-turning-the-crank/">&#8220;Frustum culling: turning the crank&#8221;</a> &#8211; on the other hand, if you do have the time and energy, might as well do it properly.</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/06/the-barycentric-conspirac/">&#8220;The barycentric conspiracy&#8221;</a> is a lead-in to some in-depth posts on the triangle rasterizer that&#8217;s at the heart of Intel&#8217;s demo. It&#8217;s also a gripping tale of triangles, Möbius, and a plot centuries in the making.</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/08/triangle-rasterization-in-practice/">&#8220;Triangle rasterization in practice&#8221;</a> &#8211; how to build your own precise triangle rasterizer and <em>not</em> die trying.</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/10/optimizing-the-basic-rasterizer/">&#8220;Optimizing the basic rasterizer&#8221;</a>, because this is real time, not amateur hour.</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/11/depth-buffers-done-quick-part/">&#8220;Depth buffers done quick, part 1&#8221;</a> &#8211; at last, looking at (and optimizing) the depth buffer rasterizer in Intel&#8217;s example.</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/16/depth-buffers-done-quick-part-2/">&#8220;Depth buffers done quick, part 2&#8221;</a> &#8211; optimizing some more!</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/17/care-and-feeding-of-worker-threads-part-1/">&#8220;The care and feeding of worker threads, part 1&#8221;</a> &#8211; this project uses multi-threading; time to look into what these threads are actually doing.</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/25/the-care-and-feeding-of-worker-threads-part-2/">&#8220;The care and feeding of worker threads, part 2&#8221;</a> &#8211; more on scheduling.</li>
<li><a href="https://fgiesen.wordpress.com/2013/02/28/reshaping-dataflows/">&#8220;Reshaping dataflows&#8221;</a> &#8211; using global knowledge to perform local code improvements.</li>
<li><a href="https://fgiesen.wordpress.com/2013/03/04/speculatively-speaking/">&#8220;Speculatively speaking&#8221;</a> &#8211; on store forwarding and speculative execution, using the triangle binner as an example.</li>
<li><a href="https://fgiesen.wordpress.com/2013/03/05/mopping-up/">&#8220;Mopping up&#8221;</a> &#8211; a bunch of things that didn&#8217;t fit anywhere else.</li>
<li><a href="https://fgiesen.wordpress.com/2013/03/10/optimizing-software-occlusion-culling-the-reckoning/">&#8220;The Reckoning&#8221;</a> &#8211; in which a lesson is learned, but <a href="http://www.alessonislearned.com/">the damage is irreversible</a>.</li>
</ol>
<p>All the code is available on <a href="https://github.com/rygorous/intel_occlusion_cull/">Github</a>; there&#8217;s various branches corresponding to various (simultaneous) tracks of development, including a lot of experiments that didn&#8217;t pan out. The articles all reference the <a href="https://github.com/rygorous/intel_occlusion_cull/tree/blog">blog branch</a> which contains only the changes I talk about in the posts &#8211; i.e. the stuff I judged to be actually useful.</p>
<p>Special thanks to Doug McNabb and Charu Chandrasekaran at Intel for publishing the example with full source code and a permissive license, and for saying &#8220;yes&#8221; when I asked them whether they were okay with me writing about my findings in this way!</p>
<p>
  <a rel="license" href="http://creativecommons.org/publicdomain/zero/1.0/"><br />
    <img src="https://i0.wp.com/i.creativecommons.org/p/zero/1.0/88x31.png" style="border-style:none;" alt="CC0" /><br />
  </a><br />
  <br />
  To the extent possible under law,<br />
  <a rel="dct:publisher" href="https://fgiesen.wordpress.com"><br />
    <span>Fabian Giesen</span></a><br />
  has waived all copyright and related or neighboring rights to<br />
  <span>Optimizing Software Occlusion Culling</span>.</p>
]]></html><thumbnail_url><![CDATA[https://i0.wp.com/i.creativecommons.org/p/zero/1.0/88x31.png?fit=440%2C330]]></thumbnail_url><thumbnail_width><![CDATA[88]]></thumbnail_width><thumbnail_height><![CDATA[31]]></thumbnail_height></oembed>