ZeroK-RTS / Zero-K

Open source RTS game running on the Spring/Recoil engine
https://zero-k.info
GNU General Public License v2.0
690 stars 207 forks source link

Maps are too bright #1290

Closed GoogleFrog closed 8 years ago

GoogleFrog commented 8 years ago

Dev engine causes many old maps to have increased brightness. They can be too bright.

https://springrts.com/mantis/view.php?id=5108

gajop commented 8 years ago

This should solve it (haven't tried):

Spring.SetSunLighting({groundSpecularColor = {0,0,0,0}})

Add that code in a widget. It basically overrides groundSpecularColor in mapinfo.lua, which is how engine used to work in 100.

The problem was that we had this parameter present in mapinfo for a while now (https://github.com/jk3064/Map-Blueprint/blob/master/mapcontainer.sdd/mapinfo.lua#L149), but it was never used (this was a bug). Now it's used for maps that don't contain a specular texture, which is at least something. My personal preference was that it should be used for all maps, but then you'd just have different lighting everywhere. At least it would have been consistent (both groundDiffuseColor and groundAmbientColor work with SSMF maps)

GoogleFrog commented 8 years ago

Just to make sure, will that affect maps which have specular texturess?

gajop commented 8 years ago

No, those aren't affected by groundSpecularColor. It's either groundSpecularColor or specularTex: https://github.com/spring/spring/blob/develop/cont/base/springcontent/shaders/GLSL/SMFFragProg.glsl#L433-L437