promotional bannermobile promotional banner

Pulsar Lighting Engine

Bringing a Starlight-based lighting engine to CleanroomLoader

Pulsar

Pulsar is an async lighting engine for CleanroomLoader. It reimplements Starlight-style lighting algorithms for 1.12.2 and moves most server-side block-light and sky-light propagation off the main server thread.

Unlike vanilla and Alfheim, Pulsar performs most propagation work on dedicated worker threads. Its goal is to provide an actively developed Cleanroom-native alternative to lighting engines such as Alfheim and Phosphor.

Requirements

Features

Pulsar is designed to reduce server-thread stalls when lighting has a large amount of work to resolve, such as during chunk generation, explosions, large building-tool operations, or machine-driven block changes.

  • Runs server-side block-light and sky-light propagation on dedicated worker threads.
  • Batches large groups of block changes instead of lighting every edit separately.
  • Stores completed Pulsar light data in each chunk's NBT, avoiding unnecessary full relights when valid cached chunks are loaded again.
  • Keeps Minecraft's standard block-light and sky-light data synchronized, so the additional Pulsar cache can be discarded safely if Pulsar is removed.
  • Fixes vanilla propagation and rendering problems involving stairs, slabs, liquids, emissive blocks, paintings, empty sections, and chunk borders.

The largest gains appear under heavy lighting load. At lighter loads, Pulsar's main benefit is lower light-update latency rather than higher TPS.

Fixed Vanilla Issues

Pulsar includes fixes for the following vanilla lighting and rendering issues:

Compatibility

Pulsar should work with most biome, cave, world-generation, and dimension mods that use Minecraft's standard chunk and world APIs. Please report combinations that do not work as expected.

Supported integrations

Incompatible

Performance

In controlled tests, Pulsar 0.3.0 achieved lower median lighting-update times than Alfheim 1.6 in all four tested workloads, with the largest gains in skylight updates.

Results depend on your hardware and workload. These improvements do not translate directly into higher FPS or TPS.

<details> <summary>Light-update benchmark — Pulsar 0.3.0</summary>

Light-update benchmark

Lower is better. Markers show the median of three run medians; horizontal lines show their range. Each update was timed until lighting completed.

Vanilla* shows older measurements under different conditions, provided for reference only.

</details>

<details> <summary>Chunk-generation benchmark — historical results</summary>

This benchmark used Pulsar 0.1.0, not 0.3.0.

Historical chunk-generation benchmark

The previous 10,404-chunk test recorded median totals of 48.831 s for Pulsar, 49.615 s for Alfheim, and 56.461 s for Vanilla. This includes terrain generation and lighting.

No new generation-speed comparison is published for 0.3.0 because the latest runs produced differing terrain and lighting results.

</details>

Measurement details and raw data

Credits

  • Starlight by Spottedleaf, for the architecture and core algorithms on which Pulsar is based
  • SuperNova by GTNewHorizons, a Minecraft 1.7.10 port of Starlight that served as the basis for early versions of Pulsar
  • Alfheim by Red Studio, as a reference for fixing MC-92
  • CleanroomModTemplate by CleanroomMC

The Pulsar Lighting Engine Team

profile avatar
Owner
  • 6
    Followers
  • 4
    Projects
  • 33.5K
    Downloads

:thinking:

More from pepe_yu