Alpha issue with SharpDX SpriteBatch in WPF
Posted
by
Kingdom
on Game Development
See other posts from Game Development
or by Kingdom
Published on 2013-10-17T16:40:31Z
Indexed on
2013/10/17
22:22 UTC
Read the original article
Hit count: 956
.Hi devs, I'm coding a game using SharpDX in a WPF context.
void Load() {
sb = new SpriteBatch(GraphicsDevice);
t2d = Content.Load<Texture2D>("Sprite.png");
}
void Draw() {
sb.Begin();
sb.Draw(t2d, new Rectangle(0, 0, 64, 64), Color.White);
sb.End();
}
I made Sprite.png, an object with pink color (alpha = 0%) for the background. The output show me my object but with the pink square at more or less 50% rate! So if I try to draw more sprites, it's like a little poney dream.
Note If I apply Color.Black on the Draw method, the sprite is like expected :|
© Game Development or respective owner