Sign in to follow this  
Yalpe

Fading effects

Recommended Posts

Hi, I'm trying to find a tutorial or anything related to fadein/fadeout effects with directdraw. I tried to play with the gamma of the surface but that did not work out too well, maybe my *ahem* video controller can't handle it? The chip is : SiS M650_651_650_740. Whatever that means. I got crappy framerates everywhere.

Share this post


Link to post
Share on other sites
You could try alpha blending, if you draw a black surface over everything and then decrease the alpha value it would create a fade in effect and you could do the same in reverse, I've always wondered about how a proper fade in/out effect was done but that method has worked pretty well for me. What I cant do is fade-to-color [grin]. Hope that helps

Share this post


Link to post
Share on other sites
Assuming that you are referring to the format of your back buffer, then yes it will work. When you do alpha blending for fading effects, rarely would you use the alpha of the destination surface (in this case, the back buffer).

For fading, set your source blend factor to the source alpha and your destination blend factor to the inverse of your source alpha. This will allow you to vary the alpha value like clockwise suggested.

[Edited by - skittleo on July 10, 2005 4:02:57 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this