It's done, I merged the changes.
Also did a quick fix for the lightgem; it turns out that the lightgem was rendering to the window, not the FBO. That should have been fine, but for some reason it didn't quite work. I haven't figured out why, yet. Possibly a clear missing somewhere or something similarly trivial. But for now I switched lightgem to the (primary) FBO, and that works fine on my machine. A separate FBO could still be worthwhile, especially if MSAA is enabled, because we really don't need to render the lightgem with MSAA...
New test executable: https://github.com/f...eDarkModx64.zip
Tested this on No Honor Among Thief's, got graphical problems, water was black and showed what looked like a small white dot pattern on it and the sky flickered like crazy. On the vanilla 2.06 x64 exe, water looks fine but the sky shows a translucid blueish plane moving with the view, if I noclip towards the blue plane it disappears and the sky looks normal, if i look down i can see it show up in the top of the screen, but if i look up it goes away, very strange, could be the fog acting bad again.
Video showing the problem.
Some important info, because of a problem on my mobo, i add to go back to a old AMD GPU i add, the HD 5770 and because its a old GPU AMD has put its driver support into the legacy section, what that means is that there are no new drivers for it. So the last supported driver for this GPU is the Radeon Crimson 16.2.1.
Don't know if this would happen on my newer R9 270X with new drivers but i can't test it until i fix the mobo problem.