Full screen effect - fade in/out?

Any idea how could i make a simple fade in/out for whole rendered image?

I tried having a plane which fades using obj.color. It did work but now that I use blender Text objects for my game, the text always shows through and it ignores any object in front of them.

Would there be any post_draw method or such to change the brightness of the current render frame?

You could put a full flat in front of the camera and adjust the transparency based on time/animation. Think of it like a HEALTHBAR animation but instead it’s transparently not scale and you can probably adjust it via code, which is easier than animating it IMO. http://www.youtube.com/watch?v=w3WG2W_Hi8I is a good 4 part health bar breakdown. The guy sounds A LOT like Goran IMO.

I’m not sure if this would work, but try putting the plane on an overlay scene. Either that, or you can use a 2d filter :). Heres one I quickly made, hope it helps :slight_smile:


uniform sampler2D bgl_RenderedTexture;
uniform float Fade;
    void main(void)
    {
        gl_FragColor = texture2D(bgl_RenderedTexture, gl_TexCoord[0].st).rgba*percent;
    }

Just have a property on the object that adds the 2d filter called Fade. Setting it to 0 is faded out, while 1 is no effect. To make the fade out work just subtract from Fade each frame :).

This one might help:

Fading and Transparency for all Shading modes