Jump to content
  • Advertisement
Sign in to follow this  
directNoob

Fading between two screens/scenes.

This topic is 4171 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 looking for some papers or resoureces where fading is described. The problem is, I haven't the correct "keywords" to search for, again! I could imagine some techniques. One could be, just to handle the alpha values, when simultaneously render two objects to one render target. The other method could be to render each scene simultaneously on a separate render target and then blend them together, smoothly... Just like this: A is scene A; B is scene B; Then blend scene B over scene A, smoothly, to gain scene C. So the complete scene C starts to display scene A, because scene A has alpha = 1.0 The alpha value of scene B starts at 0.0 Than, alpha A must be decreased. Where alpha B has the following equation alpha B = 1 - alpha A. This is what I have in my head. But maybe I'm completely wrong. But it sounds logically to me. If you have some opinion or resources of any help, please post it. Thanks Alex

Share this post


Link to post
Share on other sites
Advertisement
Fading and blending are considered to be two separate transition effects. Whereas a fade dips to a given color (usually black) during the transition, blending overlays the old image with a new one. To accomplish blending in the simplest possible way, set up two screen capture buffers in VRAM, then draw the old scene, capture, draw the new scene, capture; next draw either of the textures as one whole quad across the entire screen with respective alpha values (A goes from 1 to 0, B goes from 0 to 1). It's as simple as that.

Share this post


Link to post
Share on other sites
Whether it is a good idea depends on what you're trying to accomplish. As far as blending from one scene to the next goes, the method I proposed should be the fastest and most portable since it doesn't require the use of a shader.

Share this post


Link to post
Share on other sites
isn't it as simple as drawing scene A and render that to texture, currently with an alpha of 1. then draw B , render that to texture and as you start to draw B, starting with an alpha of 0.0

you increase B towards 1.0 in whatever increments you wish(depending on how fast you want to change scenes) and then decrease the alpha in scene A. all this while continuing to render both scenes to texture.

this is the gist of it, no?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!