Draw Transparent Sprites

July 2, 2009 3:16 PM Published by

Use the Color = (Red,Green,Blue,alpha) to assign white or whatever color and alpha for transparancy.

Sample:

Color transparent = new Color(255, 255, 255, 128);

spriteBatch.Draw(backgroundTexture, new Vector2(MouseState.X, MouseState.Y), transparent );

Categorised in:


Tag Cloud