Fading between two screens/scenes.

Started by
4 comments, last by OpenGL_Guru 16 years, 12 months ago
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
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.
And what about linear interpolating between two pixel colors?
Is this bad or good, or how is it?

Alex
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.
Ok, thanks.

I will just try some things and ask again, if something
isn't clear.

Thanks
Alex
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?
heh

This topic is closed to new replies.

Advertisement