Rendering Sprites with Transparency

We need to put the new Vector3 and Sprite classes through some minor tests to determine how well they function together. We’ll explore transparency while testing the Sprite class.

D3DXSprite doesn’t care whether your sprites’ source images use a color key or an alpha channel for transparency—it just renders the image as requested. If you have an image with an alpha channel—for instance, a 32-bit targa—then it will be rendered with alpha, including translucent blending with the background if your image has partial alpha ranges defined. But if your image has no alpha because you are using a background color key for transparency—for instance, a 24-bit bitmap—then it will be drawn without the color-keyed pixels.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset