Shaders are Magic
Monday, June 22nd, 2009In a world where random is king and seamless is required and visuals need to be spot on, shaders wear the crown. Our game is no exception to this rule. We’ll be using the graphics hardware at our disposal as well as we can of course, and that means new things to learn. We expect them to be able to do everything from making our landscapes seamless to our characters and objects having nice shading to the time of day changing as you play.
Shaders can do all that and so much more it’s almost silly. If you can think of it and then come up with a way to cram it into HLSL (High Level Shader Language) you can make it happen almost as an aftertought. Almost. Thankfully we started looking into this stuff well before it qualified as an afterthought because we realized that how we were doing things in XNA and the services provided by SpriteBatch and the like were somewhat lacking for this new idea. Which of course meant another round of adjustments to our code base to better support it. SpriteBatch itself doesn’t play especially nicely with pixel shaders that require frequent texture changes, so however much it pained us to lose some of the nice things it provided, we had to send it packing.
We have a good deal of features in our current shaders after seemingly countless hours of tweaking and adjusting by Alan, but we have grand plans to extend them into new realms in the quest of a beautiful game. It should be an interesting thing indeed to see how this all comes out.