Here we go again. Last time I tried nebulas, it was with fake, 2D noise functions. Now, I'm exploring the volumetric approach. So far, success has been fantastic. I'm running the whole nebula simulation on the GPU, so the generator is fast (< 1 second), even with a million+ particles. The nebula also renders at 60 FPS, which is nice, as I can actively explore it, unlike with previous attempts. Everything is shaping up really nicely, and the XDX Engine is getting plenty of new features along the way. Still need to play with colors, molecular clouds, and lighting in general.
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.
No, seriously...this is by far the most epic - and by epic, I mean legendary, incredible, amazing - failure I've ever had. Don't ask me how or why, but, for some reason, changing the size of my diffuse texture to 1x1 caused...no, not a scene of solid-colored objects as I had hoped...no, not a failure message from D3D...no, not a crash...but rather, a mind-blowing scene of recursion. Of course, it should have been obvious to me that resizing a diffuse texture would...cause it to be replaced by the primary render target!?!?
This is by far the coolest glitch that has ever befallen me. Every surface displays an exact replica of that which is rendered on the screen (and it also happens that I had SSAO and DoF turned on at the time of the glitch...so it's a rather beautiful setting for a glitch!). Good example of recursion, yes? Also quite a trip.
But seriously...why didn't I ever think to do this intentionally???
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.