Just posted v2.7b with
many changes, most of which streamlined or fixed problems with old code. I'm still looking at color definitions, but overall this version has more realistic lighting (mathematically, anyway) and far fewer dynamic lights. Here's a summary:
- Removed the old mod's limits.
- As described I rewrote almost all of the light code to refactor gradients based on the inverse square law. I've made allowances for emitted, ambient, and volume dispersed light with a few adjustments for very close light sources.
- Instead of getting the closest light, all visible light is found.
- Refactored and clamped dynamic lighting to eliminate banding.
For now the PLR works but doesn't gradually increase. I also revised and simplified the menus (some of which dealt with limits I've removed), and I'm still working through that. Some of the colors are also odd looking, since I corrected many of the lighting and color issues.
That took waaaaaaaaaaaaaaaaaaaaaay too much time.
Screenshots (compass direction is North all all shots):
MAP11
MAP06
MAP14
E1M3 - that actually
looks cold
E1M1 - note the light direction and nukage tint bleeding onto the structure
MAP05
E1M4
But, well, see for yourself.
So while what this does is no longer that simple - well, it's 2000 steps of simple - again it starts with whatever the minimum light level is and works up from there based
only on definition files. Hopefully this is more realistic. Most of those screenshots were taken just now, some in areas I've not seen with the new code ("Inmost Dens" looks incredible, I think). Let me know what you think!
Update: FYI bug fix for the adventuresome in "relighting_actors.zs" line 238 - change first calculation to this:
Code: Select all
clamp(nearby[i].args[SECVOLUME] / 4096, 0.666, 20)
This fixes some stairway glitches and the closet at the start of E1M4. Probably other stuff.
Another tweak for areas such as MAP02. A recessed area can provide minimal ambient light with this new code. Add this to the end of "rl_textures.txt"