Sodium

Sodium

35M Downloads

Light values are incorrectly truncated to 4 bits when encoding vertex data

jellysquid3 opened this issue ยท 3 comments

commented

Sodium 0.5.0 introduced a 16-byte vertex format, which reduced the precision of light values from 8 bits to just 4 bits. We need to revert this change, since it doesn't provide sufficient resolution for even trivial cases, and breaks things like stained glass (#2052) and dynamic lighting mods.

commented

I'm considering simply restoring the 20-byte vertex format as a stop-gap solution for Sodium 0.5.x, at least until we can use features like vertex pulling to more efficiently encode the data.

commented

This is also necessary to fix a regression we have that is causing the world to render a very slight shade too bright compared to vanilla, since it seems their light values are clamped at 15.5 rather than 16.0.

commented

Resolved with 53a673d.