XNA Tutorials, Samples and Thoughts
Can a 2D image intersect a 3D model?
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.
| Print article | This entry was posted by Catalin Zima on May 19, 2008 at 2:01 am, and is filed under 2D, 3D, HLSL, XNA. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
