XNA Tutorials, Samples and Thoughts
Archive for May, 2008
Small pre-pre-beta shadow mapping lirary
May 28th
I’m releasing a small library for shadow mapping in XNA. This is the beginning of a library that will allow using shadow maps in XNA without writing a new shader, or setting up your models. Just using some calls to a library class.
I also included a small example of using the library with 1 object. The main class of the library is ShadowMapRenderer, and it implements PCF shadow mapping, with screen-space bluring.
Remember, this is a very early version, I will probably change the API very much until a real beta version. I just thought I’d put it out to help people who want to have quick shadows in their 3D games.
You can download it here: ShadowMapRenderer
Have Fun!
Can a 2D image intersect a 3D model?
May 19th
Yes it can
My may sample is also my first public sample written in XNA Game Studio 3.0 CTP, and it shows how to restore the depth buffer from a depth texture.
This way, models drawn to a render target, with post processing applied to them can intersect and obscure normal models, drawn after all the post processing is done.
For more details, jump to the sample’s page: Restoring the Depth Buffer, where you can find a short explanation on how the sample works.
To dive right into the code, download it here. Please note that the sample is written in XNA Game Studio 3.0 CTP, but the technique also works just fine in 2.0.
April Sample Online!
May 2nd
I finally finished the April sample. I know it’s May already but the MVP Summit and the Easter Holiday took most of this month
So for April we have Dynamic 2D Shadows. Check it out in the Samples section, and let me know what you think. Or download it directly, here.
I hope you will enjoy this sample.
