Alpha Handling for OpenGL Renders
The glitch above is the cumulative result of two changes made (or rather pushed for) by the "strict technical correctness" (*) color-grading/video-editing crowd...
(*) On an off-topic note: The world of color representation (i.e. color spaces, color coordinate space systems, gammas/mappings/LUT's, illuminants, color perception, etc.) is a bottomless pit of endless depravity... The worst part is that some of the things out there (e.g. the 3+ versions of "Delta-E" aren't even all that entirely accurate for what they for all but a few special use cases). Gah! You have been warned - You probably should know about it all, but you will also wish you didn't know/don't need to know/shouldn't have tried to know... </end rant>
1) If alpha < 1, all chromaticity information is inherently invalid. Therefore, if alpha < 1, you get to have any colour under the sun, provided it's a shade of gray. This is at least half the bug, as this change now affects any image buffer in Blender where there are partial alpha values anywhere, which happens to be on just about every bloody Grease Pencil stroke, because that's the way we usually use them, and that's the only way we can implement them to accumulate the way they do to look nice in the normal viewport!
2) Colours need to be in linear colour space for certain processing steps. This wouldn't really be that much of an issue, except that the sequencer uses a special version of this processing, which ends up outputting colours which are consistently 1-2 notches "brighter" (aka whiter, less saturated, and fainter-looking)...
As a result of these glitches, we get the following crappy situation:
What it looks like in the viewport - This is what the end result should be!
After a lot of experimentation, the only solution I found was to manually knock out the alpha channel values (i.e. forcibly set all alpha values on the entire OpenGL renders) to only have alpha = 1.0. An alternative may have been to only do a GL_RGB read of the pixels, but then that wouldn't have worked with all the other image render machinery that Blender uses :(
There is another downside here in that by knocking out the alpha values like this, we effectively make it impossible to do certain types of background-replacement effects in the Sequencer with such renders later, since the alpha channel will have been made to say that the whole image is fully opaque.
Sky Background Colors
From a test file from pepeland, I discovered that currently the sky background gradients are NOT drawn in OpenGL playblasts, despite the fact that we can do it perfectly fine in the viewport for realtime usage. There really isn't any excuse here that we only use the bland horizon colour here... It makes things look quite crap, as below:
Combined color + alpha in the Image Editor - Things are looking quite gray and weird already...
At this stage, I'm not sure what the best way to patch our way out of this mess is going to be...
Option 1: Fix the sky backdrop issue by itself, then add an option to the OpenGL Playblast operator to nuke the alpha channel (aka set all alpha values to 1.0) when reading out the screen buffer (and prior to saving).
This would likely be the least controversial of all the approaches, though it would be less user friendly from a Grease Pencil for art/final output perspective, as then we have to find ways of exposing the new option.
Option 2: Create a new dedicated operator for rendering out Grease Pencil stuff, all OpenGL powered, for which we can have full control over which quirks we support/don't support.
This would be better for artists in having a tool optimised for these use cases, which still uses the same infrastructure used for viewport drawing (i.e. same engine, same processing). But, code-wise, we'd end up with a duplicate codebase for the rendering output part (namely, a near complete copy of render_opengl.c)
Option 3: We forget about OpenGL output as being the solution for output of such shots from Blender, and concentrate instead on getting GPencil Strokes -> Freestyle Strokes working, allowing us to have higher quality line drawing + the nicer output the renderers can do for the other bits and pieces.
This one we will still do eventually, but whether it's so easy to accomplish without delaying the release of the rest of this functionality is another matter...