Deferred Shading, Trade Lanes, Asteroids

August 16, 2012 General News 4 Comments

A lot of my recent work has been on internals (an unfortunate fact that I always hate admitting). But I'm really trying to nail down the cleanest possible abstractions and pipelines for a deferred renderer in GL. I think I've already come further than I ever have before. I've also got transparency integrated properly with the deferred engine, which is another first for me.

My current project is looking more and more like a game each day. There are now "trade lanes," a la Freelancer, for intra-system transport. Asteroids also made a first appearance yesterday.

As the screenshots suggest, I've implemented a vignetting postprocess filter (just for the sake of screenshots). I'm also using the filmic tonemapping operator from the classic Uncharted 2 (John Hable) presentation. It's really a magical little piece of math 🙂

The most serious challenge I'm currently facing is performance. Having done much of this stuff before in DX9, I'm seriously concerned that my frametime is already hitting 16ms at 1280x768 with only a reasonable amount of geometry on the screen, and reasonable post-processing. I think this is just a fundamental challenge with OpenGL. I've said it once, I'll say it again. DirectX is a better API. It's significantly harder to figure out how to "correctly" do something in GL such that it is as performant as the DX equivalent - which is precisely the problem I'm running in to now. There are so many different ways to do something in GL that it's exceptionally hard to tell when you've done something the "right" way. This is in stark contrast to D3D, in which, generally, if something works, then you have done it the "right" way.