Having a learned a great deal more about shading since I wrote this post, the contents are now out of date. Please disregard them.
I came to a few realizations as of recently, that will affect the lighting direction I will pursue for my project.
After much debate on the merits of different approaches, I have decided to go with a more traditional form of deferred shading, using a g-buffer setup similar the one Starcraft 2 is using. So it will look something like this:
- (RGB) Light Accumulation, (A) unused
- (RGB) Normals, (A) Depth
- (RGB) Albedo, (A) unused
- (RGB) Specular Color, (A) Specular Power
This decision was motivated by the need for color accuracy, and compatibility across multiple PC configurations. Color accuracy requires that I have linear blending for lights, particle effects, etc. Unfortunately, sRGB blending behavior is inconsistent between DX9 & DX10 hardware, so I can't rely on it. So I am forced to do it myself using higher-precision fp16 targets to store linear colors.
After having downloaded and played the demo of Brutal Legend, I was able to learn a lot more about their lighting scheme.
I had mistakenly believed that they were using the sky gradient maps to provide ambient lighting as well as reflections. As it turned out, they are using a form of rimlighting instead.
It was only recently that I began to see just how powerful a tool rimlighting can be. Originally, I thought it was only good for cartoony graphics, ala Super Mario Galaxy. However, I have observed that it is being used extensively in games like Final Fantasy 13, and Soul Calibur IV.
I will have to explore the possibilities offered by rim-lighting, since my initial observations have shown that it can be used to make a variety of material effects.
Their technique is called "Radially Symmetric Reflection Maps". I discovered that my earlier observations weren't entirely correct, as I saw it on normal-mapped surfaces in the demo. Apparently it only looked bad in my case because my test surface was completely flat, and pointing straight up. Also, the fact that the look-up texture will only be used for reflections means that I can just use the trick where I draw a dark line across the bottom to provide a "horizon" in the reflection.
So, that's where things are right now. I'm still trying to figure out a scheme for how to port my existing code-base to using GLSL shaders. Chances are good that I will use a fair number of macros and type-definitions to reuse my Cg shader code as best I can. My demo code is not about specific APIs, so I am trying to abstract things in a way that will hide the underlying details, whether they be DX9, DX10, or OpenGL.