ENG New site

Site menu
Login form

Our poll
What would you most like to see in the next version of SpaceEngine?
Total answers: 60130

Now on site:
Total online: 1
Guests: 1
Users: 0

Today visited:


Main » 2013 » July » 16 » Logarithmic depth buffer test
Logarithmic depth buffer test
I've made experiments with a logarithmic depth buffer. Results is pretty cool, but there is a lot of work to do. On these screenshots I used astronaut and Discovery model from Doc's 2001 ships pack. Their sizes are real, not exaggerated as Doc originally made. No near plane clipping and no z-fighting.

This will be not enabled in next patch by default, because full supporting of a log Z-buffer requires a lot of changes in the engine. There are two ways of using logarithmic Z-buffer: in a vertex shader and in a pixel shader. First gives artifacts on close or long triangles - their Z value interpolated incorrectly (perspectively). The second method fixes that, but kills FPS to almost zero: SpaceEngine have a huge overdraw on planets, so disabling fast Z test (that required for this method) makes complex planetary surface shader with atmospheric effect to apply to huge amount of pixels.

Anyway, I plan implement a deferred shading pipeline in SpaceEngine, and logarithmic Z-buffer is a first step to it. Deferred pipeline have a lot of benefits: fast Z-pass (that will speedup logarithmic Z buffer in a pixel shader), atmosphere as a post effect (that will speedup it a lot, because there will be no overdraw, and apply it to a planetary surface and ships that are in the atmosphere simultaneously), hundreds of lights (requires for ships at first place), proper lens flare occlusion, and many other.
Views: 1235 | Added by: SpaceEngineer | Rating: 5.0/1
Total comments: 0
Only registered users can add comments.
[ Registration | Login ]