stackotter / delta-client

An open source Minecraft Java Edition client built for speed.
https://deltaclient.app
GNU General Public License v3.0
322 stars 33 forks source link

Correctly render light levels based on time of day and dimension #132

Closed stackotter closed 1 year ago

stackotter commented 1 year ago

In vanilla Minecraft, the rendered brightness and tint of a block is determined by using a light level texture that has one pixel per pair of sky light and block light (source). At the moment Delta Client just uses a linear brightness scale ranging from light level zero meaning the block is pure black and light level 1 meaning it looks pretty regular.

It's probably best to look into the Minecraft source code to see how the light level texture is generated and how often it is updated, etc.

This would also be a good time to add a brightness setting to the client which should be pretty easy once this feature is implemented (because iirc the light level texture generation code takes in a brightness/gamma parameter).

stackotter commented 1 year ago

Working on this now