HLSL Learning Resources

In response to some people asking me how to start learning shader programming, I made a list of some resources that could prove helpful when learning HLSL:

The Shader Series, found on creators.xna.com are a very good set of articles and samples, that explain the basic knowledge needed to understand and write shaders in HLSL.

Riemer Grootjans also has a series of tutorials on HLSL, which can be found on his site.

A good book on shaders is The Microsoft DirectX 9 Programmable Graphics Pipeline by Kris Gray. I found this book extremely useful, with very good explanations, and nicely structured. The code samples, however, are in C/C++, but for most people that shouldn’t be a problem.

After mastering the basics, you can explore other samples and articles, which can be found on www.ziggyware.com and creators.xna.com.

Another good place to find information on shaders are the web pages of the two big GPU manufacturers, NVIDIA and ATI. Each site has a section devoted to developers, which are great places for everyone, beginners are advanced users alike. Both sites provide code samples, documentation, tools and SDK’s. Out of these, my favorites are NVIDIA Shader Library, NVIDIA SDK and ATI SDK. Most important, these site contains lots of articles and presentations from various conferences, which explain a wide range of effects and techniques, and how they are achieved on the GPU. Admittedly, most of them do not provide HLSL code, but the idea and algorithm is almost always more important than the code itself.

For advanced effects and usages of the GPU, I recommend the GPU Gems series and the ShaderX series.

Finally, as a recommendations for those who want to learn HLSL, try to examine as many samples as possible, and play with the HLSL code to see what happens when changing values, until you understand why things happen the way they do. Don’t start by doing HDR Lighting, or Relief Mapping. Start with the small tutorials, and understand what happens and why before going on to the more spectacular samples. Last, but not least, don’t be afraid to look at C/C++ samples. The DirectX SDK contains some very good samples of HLSL. I know, they’re written in C/C++, but the shader code stays the same when going from C++ to XNA.

Categorized: HLSL, XNA
  • http://onet.pl ok

    good site mfquic

  • http://www.youtube.com/watch?v=fZUGErMGG4k Clash of Clans Free Gems

    I’m new to developing internet sites and I was wondering if having your site title relevant to your articles and other content really that critical? I notice your title, “Catalin’s Game Development Blog HLSL Learning Resources ” does seem to be spot on with what your blog is about yet, I prefer to keep my title less content descriptive and based more around site branding. Would you think this is a good idea or bad idea? Any help would be greatly valued.