I'd like to propose and submit a bugfix code submission for the "software" sector light mode that emulates the software renderer's lighting in the gl renderer.
At lower light levels the "software" sector light mode incorrectly makes the area in front of the player literally 100% black and 0% visible. This is something that the software renderer does not do. It also makes things significantly harder for the player. I took some screenshots in a simple test level to demonstrate what I'm talking about.
"software" sector light mode
software renderer
The fix I propose is very simple
In "gzdoom.pk3" -> "shaders" -> "glsl" -> "main.fp" change this section
I've noticed that GZDoom incorrectly enforces pitch black on all sector light settings at "0". This would apply correctly for Heretic and Hexen since their colormap definitions actually fade to black, but in Doom it does not.
I've quickly hacked together a map that looks very much like the screenshot.
GZDoom assumes that 0 is absolute blackness in Doom. While that is true for Heretic, Hexen, and Strife, it is not true for Doom. (And it seems, for Heretic, it's not even black, just the darkest available gray)
However, 0 brightness for Doom is actually really really dark. So dark, that most CRT monitors of its day do see it as pitch black without gamma correction. So that leaves a little bit of a dillema:
If you correct the problem for Doom, it will break both Heretic and Hexen. If you leave it as is, obviously, it breaks Doom.
And another problem is, you cannot just release one shader file to fix the problem. The shader has to be recustomized for both GZDoom 2.x and 1.x variants. (The calculations will remain the same, however the code itself will not). Do note, however, that the end screen result will look the same with both GZDoom versions, it's only the code under the hood that's changed.
Personally, I think it would be better to just support a user option, which defaults one way in Doom and another way everywhere else, but can be recustomized with any game.
I've noticed that ZDoom has the opposite problem: It actually assumes that 0 blackness is the same in other games as it is in Doom. Which complicates things even more.
Unfortunately, the spoiler tags break the Lightbox mod on this forum (dunno how I wanna fix that, yet) but you can still right-click each image and download them for a full view. I think even their small size is enough to show the problem though. If not, turn up your display's gamma correction to see it.
Spoiler: Screenshots Side-by-side - Doom 2 - ZDoom, then GZDoom
Spoiler: Screenshots Side-by-side - Heretic - ZDoom, then GZDoom
Here's the level used to generate these shots: (It's the same one I posted before, except the sector brightness is now 0)
Graf Zahl wrote:Well, it all looks pitch black to me.
Here it is with a horrible looking 3.0 gamma correction then.
NotPitchBlack-Gamma3.0.png (198.92 KiB) Viewed 1386 times
At any rate, yes it is somewhat important to me because I do play using monitors that show darker color values differently than pitch black. I can't imagine playing with a monitor that does not get those correct.
But, I can always just customize the shader myself, anyway.
Graf Zahl wrote:Ok, added the new value. But since the shader in GZdoom 2.x has changed, the results can be a bit different.
Sorry for the slow response. There's a problem with the way you implemented this fix in GZdoom 2.x. You implemented the 0.03 value in the wrong section. As a result, the absolute darkness in front of the player remains.
To fix this, you need to undo the incorrect implementation (commit 3334b28a02da663b904280de951b3a158c75aace), and then, In "gzdoom.pk3" -> "shaders" -> "glsl" -> "main.fp" change this section