Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
WIP: set a minimum amount of lighting #199
The last time I updated The Dark Mod, I got a bug: there was no lighting. But I noticed everything was still visible. So I discovered that this stealth game relying a lot on darky zones never has pure black dark zones:
I remembered the usual complain about the Unvanquished game being too darky, and I thought the idea was nice and I wanted the feature in Dæmon too, it's a gameplay issue.
Then I was yet another time annoyed by the ugly darky blotches of our non-sRGB lightmaps. And then the light came to my mind. If there is no pure dark zones, there can't be dark blotches.
Dark blotches come from the fact the current color curve does not have so much steps in the dark part, hence the shadows coming from average grey to pure black in one step.
So I implemented this hack. For every shadow color component between
I really have no idea about the way to name this feature. Currently, the cvar is named
It's an easy hack to greatly improve the looking of our maps. sRGB lightmaps will tamper the need for such hack for good looking purpose, but since it's a good feature to always keep a minimum amount of light, it may be good to keep the feature and just adjust the numbers for the sRGB curve.
Note: it looks less good in thumbnails because the dark stuff being less contrasted, but it looks better in game this way:
There is one issue though, the usual "black" texture hack does not work anymore:
Well this is a great cheat code for the humans
Do we really want to have settings like that though? Which give an advantage to people who know to turn them on?
Alternatively, it could be turned on by default, but it seems bad that the renderer is not faithfully rendering what the output image should be according to the inputs.