• Advertisement
Sign in to follow this  

Fading effects

This topic is 4578 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sounds like a good idea, would that work even if I use 16 bit RGB565? I have no alpha bits in this.

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
Sign in to follow this  

  • Advertisement