Git Product home page Git Product logo

starlight's Introduction

Starlight (Fabric)

Fabric mod for completely rewriting the vanilla light engine.

Known Issues

At this point in Starlight's development, I expect problems with mod conflicts.

Download

CurseForge (Fabric) Modrinth (Fabric)

Contact

Discord

Results

Please note that I do not expect this mod to improve FPS client side. This is mostly going to affect chunk generation speed and FPS drops when people are building on large platforms in the sky. Starlight also fixes MC-162253, which only affects lag spikes specifically from lighting. An increase in chunk generation speed can also negatively affect FPS by making the client render more chunks per frame. However, I only noticed this effect, even on non-optimal hardware, when generating amplified worlds which see a very significant chunk generation speed uplift.

The graph below shows how much time the light engine was active while generating 10404 chunks: Light engine time chunk generation Graph

  • Tested via LightBench
  • World seed: vanillakekw
  • CPU: Ryzen 9 5950X

Below is a graph detailing how long light updates took for breaking/placing a block on a large platform at y = 254 down to a large platform at y = 0: Block update at height graph

  • Tested via LightBench
  • World is just a flat world with bedrock at y = 0 and grass at y = 254
  • CPU: Ryzen 9 5950X

Below is a graph detailing light update times for a simple glowstone place/break: Simple glowstone block update

  • Tested via LightBench
  • World is just a flat world with bedrock at y = 0 and grass at y = 254
  • CPU: Ryzen 9 5950X
  • Tested breaking and placing the glowstone on the bedrock platform, where skylight could not interfere with the test.

The results are pretty clear. Starlight is the fastest, by an unbelievable margin.

If you want more details on these graphs (and how Starlight achieves these numbers), you can check out TECHNICAL_DETAILS.md, but that document is mostly for people who understand programming.

Purpose

The performance of the Vanilla engine is just awful. Existing modifications like Phosphor or Paper's light engine changes (some of Paper's changes include Phosphor's) fail to fix this issue, even though they improve it.

Phosphor's changes to the existing light engine are very good, but there's only so much that can be done to Vanilla's code to improve performance. Paper also suffers from the same issue as Phosphor, as they also opt for changing Vanilla code.

On inspection of the light engine code to see what was causing such regressions in performance, it became obvious that there were performance problems were everywhere in how Vanilla processed updates, It seemed like Vanilla was optimised to try and reduce light updates, but it came at the cost of slowing down each light update. So even when it did fewer updates, it took more time.

So, If I wanted to fix them I would effectively have to end up rewriting most of the light engine, and at that point it's easier to write a new one than rework the one old. The Vanilla light engine simply had too many problems to fix.

starlight's People

Contributors

aeiouenigma avatar jpenilla avatar kennytv avatar noahvdaa avatar spottedleaf avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.