All posts by kpark

XNA4 Collision Sample

Collision Sample
http://xbox.create.msdn.com/ko-KR/education/catalog/sample/collision


Ray structure
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.ray(v=xnagamestudio.40).aspx

BoundingSphere structure
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.boundingsphere(v=xnagamestudio.40).aspx

BoundingBox structure
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.boundingbox(v=xnagamestudio.40).aspx

BoundingFrustum class
http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.boundingfrustum(v=xnagamestudio.40).aspx

XNA4 Billboards Sample

http://xbox.create.msdn.com/en-us/education/catalog/sample/billboard

This sample shows how to efficiently render large numbers of billboard sprites by using a vertex shader to perform the billboard computations entirely on the GPU.
-The VegetationProcessor takes in a simple landscape mesh and randomly creates billboard polygons scattered across it. These new polygons are set to render using the Billboard.fx effect, and a number of different billboard textures and sizes are randomly selected.
-In the vertex shader, the billboard effect calculates vertex positions by examining the view matrix to ensure the billboard sprite will always face toward the camera. It also uses a per-billboard random number to make each billboard a slightly different shape, and to randomly mirror the textures on half of the billboards, adding variety to the results. etc…
-The billboards are rendered in two passes by using different alpha test and depth buffer settings to achieve almost correct depth sorting of alpha blended sprites without requiring them to be depth sorted on the CPU first.