I’ve started work again on the Shader Series of XNA Creators Club samples. I left off with Shader Series 4: Materials and Lights. I’m working on the documentation for my next sample now, in which I show multiple pass (additive) opaque lighting. It’s another atomic technique in the arsenal of what every graphics programmer should know, and the visual results are an excellent payoff for a small amount of work.
As an aside, this isn’t really my day job anymore. Though I can contribute to the XNA Creators Club in a professional capacity, my function at Microsoft now operates primarily on the online space. Writing samples is a way for me to keep my managed development skills sharp.
The main problem I have with the sample is that it doesn’t really introduce anything new into shader programming – it’s just a way to take advantage of what a shader developer would already know from previous samples.
As I move into progressively more advanced shader techniques, it becomes harder to construct the lessons as serial teachings. I think I can do it a couple more times, but then the topics will begin to resemble the articles in GPU gems: a set of tools, not an end-to-end story.
I’ve focused on lighting opaque geometry as a vehicle for teaching HLSL. I still have a couple tricks up my sleeve here. I would love to do a full-on Bilinear Reflectance Distribution Function (BRDF) sample. I could show off a variety of BRDFs that are effective replacements to Phong reflectance. I might also be tempted into implementing the BTDF I implemented for River’s End to simulate light transfer through porous or fibrous material. I’d really like to put that in whitepaper form first though, so it likely won’t make the cut.
My primary goal with the shader series is to get people to a place where they feel comfortable cracking open GPU Gems or Shader X and implementing the techniques therein. My secondary goal is to pick some of those excellent techniques and apply them in the context of the hobbyist developer. Modern GPUs are ridiculously powerful, but the level of 3D art assets typically available to an independant developer undercuts that potential by a huge amount. You can still make great looking games, but this requires a creative approach to the application of rendering techniques and asset usage. I like to say that I "throw math at" my game until it starts to look good.
After that though, I can go a lot of places. Here are some of the ideas I’ve been throwing around.
· Static mesh ambient occlusion generation and implementation. This is a science fair project, but if I could nail it, the benefits would be dramatic. Imagine being able to just drop in a content processor and automatically add an ambient occlusion map (or vertex data) with near zero dev cost. Of course, your build times would take a heck of a beating.
· Spherical harmonic lighting. This advanced lighting mechanism makes for some incredible lighting environments. However, there is some CPU cost when certain scene parameters are changed. I’m not convinced this is a good fit for hobbyist XNA Game Studio games yet. It doesn’t have the “drop-in” appeal of some of the other techniques.
I considered doing an E/N post about where I’ve been for the last five months, but thought better of it. Also, my apologies to folks posting comments – I get so much spam from this blog I pretty much can’t keep up.
With the recent announcement that game creators will be selling their titles via XNA Community Games, it puts me in an awkward position talking about game design practices. I’ve been vetting my model on a title that I plan to provide through the service, but talking about it here might be a conflict of interest. My choices are to not talk about my real-world findings at all, or to move to a different blog system. I’m not excited about either prospect.