Graf Zahl wrote:For a case like this, where it's only supposed to improve contrast, wouldn't it make sense to keep a certain amount of ambient light?, e.g.
float lightLevel = 0.4 + 0.6 * clamp(dot(l,n), 0.0, 1.0);
?
Yes, it would.
Overall doing this in the material shader is problematic anyway as it changes the base color that then in turn is used by dynamic lights. I created a
lightlevelcontrast branch that does it at right point in the fragment shader. Currently it is applying it to everything (so walls and flats, too), but both contrast strength and which object types we want to apply it to could be configurable by changing the strength variable to an uniform. Or the uniform could be controlled by the texture, like the SimSun Shader is doing.