OoliteProject/oolite — pull request #97 by cim-- (2014-07-06 14:31:05+00:00)
Title: Two pass rendering

Split the rendering into a short-range and a long-range pass: long-range to render the scene as normal, short-range to fill in details close to the camera.

Stops Z-fighting when large objects viewed at long distance (a Kiota Habitat or a core rock hermit is good for testing)
![Z-fighting demo](http://compsoc.dur.ac.uk/~cim/oolite/ss/z-fight.png)

See http://www.sjbaker.org/steve/omniv/love_your_z_buffer.html for more on Z buffering - pushing the near plane out to 100m for the main render gives us ~100x more depth precision, which seems to be enough even for large entities. Still have to use painter's algorithm a bit for planet/star atmospheres, though.

The maximum far plane has been pushed 100x further out, too - stops odd look of sun when viewed at extreme ranges.

Doesn't appear to have a significant overhead (very few objects will be eligible to appear in both passes)

100m as the boundary might seem ridiculously close since there's rarely anything inside that range - but it's enough as a start distance for the main pass, and there's an irritating graphical bug with planet atmospheres if it's pushed any further out.

Please test on other platforms and graphics cards.