A slightly faster light engine for Forge 1.20.1. Built as a fork of Starlight with ScalableLux's multi-threading, and a number of optimizations of its own.
Starlight was always a solid lighting mod & unfortunately ScalableLux is not currently available on 1.20.1 Forge. Solix adds the performance benefits of both of these mods, but adds a few more fixes as well.
| Starlight | ScalableLux | Solix | |
|---|---|---|---|
| Multi-threaded light updates | ❌ | ✅ | ✅ |
| Queued light work ordered by distance to players¹ | ❌ | ✅ | ✅ |
| Brightest-first light spreading | ❌ | ❌ | ✅ |
| Skips re-sending unchanged light to players | ❌ | ❌ | ✅ |
| Working opacity cache (Forge) | ❌ | — | ✅ |
| Forge 1.20.1 Availability | ✅ | ❌ | ✅ |
¹ Server setup with parallel lighting enabled (more than one worker). Vanilla already hands off chunks to the light engine roughly closest-first; Solix also orders the light work that is already queued.
When you place a block in a lit room, Starlight darkens the entire area behind it and then re-lights it from scratch, even though almost all of those blocks are still lit from another direction. Solix checks first and only darkens the blocks that actually lost light. As a result, far less writes are necessary.
Light is spread from the brightest level down, so every block is lit once, at its final level, instead of being lit by a dim source and then overwritten by a brighter one.
In preliminary testing, placing and breaking single blocks in a lit room took ~14–20% less light time with 47% fewer light writes overall.
If a section's light ends up exactly the same after an update, Solix doesn't send it to players again. Every light packet a client receives makes it re-render that area and its neighbours, so skipping them should help client FPS while others place blocks nearby.
In my initial benchmarks, roughly 10–30% of updated sections were unchanged and are no longer sent.
Additionally a number of fixes that were never backported in original Starlight have been pushed to this release. Commits 6585522, 2084f46, 2b3204b, 4d59d86, and c4d051c specifically.
config/solix.toml (restart to apply):
parallel = true # multithreaded server lighting
parallelism = 0 # worker threads, 0 = automatic (CPU threads / 4)
throttle_ms = 10 # prevents C2ME's light thread from busy-waiting
propagation = targeted # targeted | ordered | classic (Starlight's original)
For diagnostic/benchmarking use: -Dsolix.debug.lightStats=true logs light engine statistics every 10 seconds.
Options allow for multi-threading to be disabled if desired. More a troubleshooting use in the odd chance of compatibility issue as opposed to actual performance benefit.
Will this improve my framerate?
Not a significant amount--it's more at scale that many of these benefits are seen, however as seen in usage with mods like C2ME, lighting bottlenecks can easily become an issue. Servers benefit far more: lighting work is lighter and spread across threads.
Will other versions be supported?
I may port to neighboring versions, currently I am more focused on polishing up the 1.20.1 version.
Solix is licensed under LGPL-3.0.