XNA, fading images

Hello experts!

This is my first XNA game.

I try to make my images fade.

I use:

color.A = it changes
spriteBatch.Draw(anims2DArray[animacjaRamkaId], screenRectangle, color);

it works fine but only when I erase screen by:

GraphicsDevice.Clear(Color.White);

It does not work at all for:

GraphicsDevice.Clear(Color.Black);

in this case, alpha channel seems to be irrelevant.

1. Why is it?
2. How can I make my images to fade?

thank you!

panJames
panJamesAsked:
Who is Participating?
 
panJamesAuthor Commented:
It helped.

Now I use:

Color.White * (changing value)

which fades all color channels at once, it gives fading effect.

But why does transparency channel depend on the background color?

panJames
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.