Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 610
  • Last Modified:

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
0
panJames
Asked:
panJames
1 Solution
 
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now