Skip to content

Improve lamps rendering and reduce their allocations - #87

Merged
boubou19 merged 9 commits into
masterfrom
improve_inverted_lamps
Aug 9, 2026
Merged

Improve lamps rendering and reduce their allocations#87
boubou19 merged 9 commits into
masterfrom
improve_inverted_lamps

Conversation

@boubou19

@boubou19 boubou19 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

This PR improve greatly the performances of the lamps. They were both FPS killers in relatively high quantities and ram bombs (A degenerated test setup made it allocate up to 1.5GB/s).
A breakdown of the changes done in this PR:

  • Lamp light values now come from a per-world packed hash table instead of tile entity lookups (byebye allocations for light updates)
  • Inverted lamp state is re-derived from metadata + live redstone on tick, and the cache self-heals on tile recreate
  • Halos are no longer rendered by the TESR
  • Removed the config to select the amount of lamp halo to render now that they are fixed
  • Halos are batched into a single static VBO, sorted by colour, rebuilt only when the cache changes

Tested on daily 658. Enjoy spamming the lamps now 😎

Checklist

  • I have tested this PR in DevEnv
  • I have tested this PR in Fullpack
  • This PR is in compliance with the GTNH AI Policy
  • This PR requires another PR in order to merge

@boubou19
boubou19 force-pushed the improve_inverted_lamps branch from ba78124 to 0c3beaa Compare August 9, 2026 02:42

@Algent Algent left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛋️

@boubou19
boubou19 merged commit d611a79 into master Aug 9, 2026
1 check passed
@boubou19
boubou19 deleted the improve_inverted_lamps branch August 9, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants