Sprite not appearing when using `GraphicsDevice.Clear(Color.White);`

Hello guys,

So, I am trying to get a black sprite to appear on a white background. This following snippet is how I think it should work, but nothing appears.

_spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Additive);
_spriteBatch.Draw(_player.PlayerSprite, Vector2.Zero, Color.Black);

It shows up fine when swapping the white and black colours around. I am unsure why it isn’t showing and have tried looking around for any help but to no avail.

Any guidance would be greatly appreciated :slight_smile:

EDIT: Added sprite I’m trying to use

Found the solution! Typically as soon as I post this on the forum :man_facepalming:

I had to change the BlendState from Additive to AlphaBlend.

1 Like

Yea, additive, does what it says, adds the colors in each pixel overlaying each other, white will result in 1,1,1,1, and 1,1,1,1 is the max RGBA (float) for a color :slight_smile:

1 Like

Your solution is still a little off, by the way.

Sprite.Draw(whatever,whatever,Color.Black) will frequently produce undesired results when drawing. You’ve circumvented the problem by using alphablend, but if you want untinted, unmodified versions of your sprite, you should use Color.White instead.