I created a
sunlighttest branch for this in the gzdoom repository. At the moment it uses a global sunlight source that can be calibrated with some CVARs.
The visuals on that branch make it pretty clear that we can't apply this ever to old maps (not that it was suggested, just saying). We also probably can't get away with a single global setting - I think we probably need to apply it on a per sector basis or something.
The good news is that at least with the test map Nash provided it gives a pretty good visual improvement.
Edit: The sunlight on the test branch also doesn't do diminished light on the sunlight. It probably needs to do that in a final version or the contrast between the back (sector light) and front (sun) won't remain the same there.
Edit 2: after toying a bit with it with fake contrast turned off, and with the gl_sunlight_str set to 0.25, it actually looks better than fake contrast in some situations. I do wonder how that will look once it takes diminished light into account.