Fading effects

Started by
3 comments, last by Yalpe 18 years, 9 months ago
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.
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
Sounds like a good idea, would that work even if I use 16 bit RGB565? I have no alpha bits in this.
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]
....[size="1"]Brent Gunning
Ok I will try this out, thanks for the help.

This topic is closed to new replies.

Advertisement