Broken Ambient Occlusion applied to slabs on wide-version-support servers (e.g. Hypixel)
NaiNonTH opened this issue ยท 3 comments
Version information
mc1.18.2-0.4.1+build.15
Expected Behavior
The lighting (ambient occlusion) should be applied on slabs normally on the border, just like the other blocks.###
Actual Behavior
Ambient Occlusion applied to the slab covers way too wide on servers that support multiple versions of Minecraft, including old versions (e.g. Hypixel, CubeCraft, etc.).
Reproduction Steps
- Install Sodium
- Launch the game
- Launch any server that covers multiple versions of Minecraft. (In my case, it's Hypixel)
- Find some places that slabs are placed.
- There you go. You've found the issue.
Java version
Java 17
CPU
Intel Core i5-8400
GPU
Nvidia GeForce GTX 1060 6GB
Additional information
Screenshots:
This issue occurs because Hypixel sends a light level of 0 for slabs, stairs, and farmland.
In versions 1.13 and prior, these blocks were treated as full blocks, meaning light could not pass through them. This also meant their light level was always 0. When the lighting engine was updated in 1.14, it became possible for light to pass through slabs, stairs, and farmland, giving them the ability to have a light level other than 0.
Before this change, the rendered brightness of slabs, stairs, and farmland was determined by adjacent blocks since their own light level was always 0. However, in 1.14 the rendered brightness was changed to correlate with the brightness of the block itself since it could have a light level other than 0.
So, when a modern client joins a legacy server using a protocol translator, it receives the old light values causing slabs, stairs, and farmland to always appear dark.
From previous observations, Sodium makes this issue more apparent than vanilla due to its handling of smooth lighting. You can see this issue in vanilla and Sodium by disabling smooth lighting.
This issue is primarily caused by incorrect data being sent from the server to the client. While Sodium does exhibit different behavior from vanilla, it likely has good reason for doing so. Considering these things, I don't believe it is Sodium's responsibility to fix this issue. Instead, you can report the bug to Hypixel.
Seems to be like that, as ambient occlusion on some wide-version-support servers works just fine. Thank you.
I'm not interested in fixing this. Hypixel is sending invalid data here, and this is broken in vanilla as well (it's just less dramatic.) The more patches we add to fix broken third-party server software, the more complicated and difficult it becomes to maintain the mod.
It's also not very clear how we would detect this issue, without resorting to older-style lighting from earlier versions of the game.