Skip to content

feat(render): tint entities from sampled block and sky light - #93

Open
sandexzx wants to merge 4 commits into
mainfrom
feat/entity-block-lighting
Open

sandexzx wants to merge 4 commits into
mainfrom
feat/entity-block-lighting

Conversation

@sandexzx

@sandexzx sandexzx commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Entities sample packed block/sky light at the eye block and tint materials with the same brightness curve as blocks.
  • Lighting in Newer Versions (1.13+) remains off by default. Enable it manually to test entity lighting. Off fullbrights both blocks and entities. Saved preferences are preserved; there is no false-to-true migration. The leaked migratedNewVersionsLightingDefault flag is stripped from saved options so it never appears in All Settings.
  • Light-only column reloads on 1.18+ WASM pass isLightUpdate and drop only the fused raw map_chunk cache, so blocks remesh from the updated JSON column. v16/v17 light overlays are unchanged.
  • Leather-armor (and other authored) color changes on a reused material are kept after lighting invalidation. Damage flash still restores the pre-flash base.
  • Distant column ingest no longer bumps the global light generation, so it does not retint every entity.

Out of scope

  • This PR does not implement client-side light recomputation. With no server light update after place/break, it cannot regenerate light by itself. Received server light updates are applied.

Relationship to #96

This PR remains independently mergeable for entity lighting. #96 includes this branch, including the opt-in defaults fix (465cf22), and adds the experimental 1.17.1 client-side light engine.

Validation of the defaults fix

  • Renderer defaults, entity-light controller, and renderer light-cache tests: 28 passed.
  • Formatting check passed.

UPD — entity lighting is now opt-in

Following review feedback, entity lighting has its own independent option, Entity Lighting, defaulting to off. Existing profiles—including those with newVersionsLighting: true—do not implicitly enable it.

  • Entity lighting is gated by both the world-lighting flag and the new entity-lighting flag. With either disabled, entities remain fullbright; enabling entity lighting does not change block lighting.
  • The new option is exposed in renderer settings with a tooltip and is synchronized to a dedicated runtime config flag. The entity controller notices live toggle changes and restores the original material color when lighting is turned off.
  • Updated the newVersionsLighting tooltip to clarify that it controls block and sky lighting, not entity lighting.

Validation: renderer unit tests (483 tests) and pnpm typecheck pass. The live toggle was also checked in-game.

Entities now sample packed column light on the renderer thread and multiply
material color, matching block lighting. Light-only 1.18+ reloads drop the
fused raw map_chunk so blocks remesh from the updated column. Authored
material retints (leather armor) keep their new base; distant column ingest
no longer retints every entity.

New Versions Lighting defaults to on. A leaked internal migration flag is
stripped from saved options so it is not a user setting. Torch spread in
singleplayer still needs Flying Squid to emit update_light.
@zardoy

zardoy commented Sep 23, 2026

Copy link
Copy Markdown
Owner

Also let's make such entity lighting opt-in as well for now

This branch has not been deployed

No deployments
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