This is an archive of my old blog (2008–2013), kept online because people still use it. XNA has been discontinued; MonoGame is its open-source successor, and the techniques still apply. Comments are closed.

Source to XNA shaders

Microsoft has just released the source code for the two most popular shaders used in the XNA Framework. Go to the Education Catalog on the Creator's Club site, and see them for yourself: the SpriteBatch shader and the BasicEffect shader.

This is awesome, as it provides lots of insight on how things work in the background, and also offer a good place to learn from. Beware that these are complex shaders, and you should only delve into them after you have a good understanding of HLSL. Until then, you should use the XNA classes, as they are :)

5 comments on “Source to XNA shaders”

  1. When I saw this news I thought "I'm gonna take a pick at those shaders, they must be pretty simple. Let's see how they to things"
    As soon as I opened them. Ouch. They're not so simple after all.
    But they do seem a very good way to learn from.
    Array of shaders? Never thought that could be possible.

Comments are closed.