I want to achieve a effect where a black image that covers the whole screen slowly fade away, revealing what's behind it, by decreasing its alpha value in its fragment shader.
The way I do it is create a quad that covers the whole screen. Its texture is a complete black image. I declared a variable a whose value is 1.0, and a uniform dt for which i will send the delta_time, the difference between the last frame and the current frame, each frame. And then I subtracted dt from a, and used a as the alpha value for the final color's alpha value. But it seems that the result is the image is still completely black. I guessed the variable a is still 1.0. I'd like to ask if there's a proper way to fade away the black image?