-
-
Notifications
You must be signed in to change notification settings - Fork 102
Shatter
Simon (darkside) Jackson edited this page Aug 21, 2020
·
6 revisions
Area | Submitted | Type |
---|---|---|
Games: 3D Graphics, Games: Content Pipeline, Games: Graphics, Games: Shaders | 9/27/2007 | Code Sample |
This sample shows how you can apply an effect on any model in your game to shatter it apart. The effect is simulated with a vertex shader.
The shatter effect operates on every triangle in the model independently. For every triangle in the model, the vertex shader rotates the vertices of the triangle around the x, y, and z axes by random velocities. At the same time, the triangle is translated along its normal. This creates the appearance of the entire model shattering outwards into small pieces. To get this effect to work properly, the model must be processed beforehand with a custom processor that derives from ModelProcessor.
All content and source code downloaded from this page are bound to the Microsoft Permissive License (Ms-PL).
Download | Size | Description |
---|---|---|
ShatterEffectSample_4_0 | 11.41MB | Source code and assets for the Shatter Sample (XNA Game Studio 4.0) |
ShatterEffectSample_4_0.zip | 11.41MB | Source code and assets for the Shatter Sample (XNA Game Studio 4.0) |