XNA, fading images

Posted on 2011-05-05
Last Modified: 2012-05-11
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:


It does not work at all for:


in this case, alpha channel seems to be irrelevant.

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

thank you!

Question by:panJames
    LVL 11

    Accepted Solution


    Author Comment

    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?


    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    Article by: Najam
    Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
    This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now