Posts In: deferred rendering

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.

Deferred Terrain

Brought the terrain shaders over to the new deferred engine tonight. I didn't touch the actual terrain code, so nothing's new here...but it still looks good under the deferred pipeline, so that's good news. And now we have distance blur as well!

Decent Reflections

February 19, 2012 General News 0 Comments

By decent, I mean better than better, which, of course, is two levels above bad, so at least I'm making progress. This time the color looks correct and the reflection is more subtle, but it really brings the scene to life (I know, I said that about SSAO too..)

Just for comparison, here's what the same scene looks like as it would look in my forward renderer (e.g., last week):

Yes indeed, I think XDX rendering has come quite far in a week.

Better Reflections

February 19, 2012 General News 0 Comments

Ah, that's better. Not great, but way better! Playing with modulating normals and a new way of computing surface gloss.

Bad Reflections

February 19, 2012 General News 0 Comments

This time, the DoF looks decent, but the reflections are pretty bad. I figure reflections are an essential part of any sci-fi-ish scene, so I've been working on them lately. This definitely isn't right yet, but, like most of my recent posts, it's a start.

Better DoF

February 16, 2012 General News 0 Comments

Not perfect, but acceptable for my purposes. Also not subtle...but it can certainly be toned down.

Bad DoF

February 16, 2012 General News 0 Comments

Working on DoF. I obviously messed up, but in an interesting kind of way.


February 15, 2012 General News 0 Comments

Experimenting with a simple SSAO implementation. Testing it with a procedural city of cubes (textured by the procedural texture generator, of course). Even this simple SSAO makes a huge difference in the appearance of the image - the whole thing just becomes 100x more believable with the occlusion.

Deferred Rendering

February 15, 2012 General News 0 Comments

Ah, yes. There comes a point in every engine's life where, in order to be hip and cool and eligible to play with all the other cool engines, it must succumb to deferred rendering. XDX is no different.

It will be a long and painful process of converting the existing pipeline to support the deferred renderer, but it will certainly be worth it. During the process, I'm also hoping to unify many of the draw shaders to make everything as simple and clean as possible.