Sodium

Sodium

44M Downloads

Vanilla 1.17 changed ambient sunlight, but Sodium reverts this change.

thescyphozoa opened this issue ยท 4 comments

commented

Version information

sodium-fabric-mc1.17.1-0.3.2+build.7

Expected Behavior

Ambient sunlight in 1.17 and 1.17.1 should be darker than in previous versions of Minecraft. I reported this to Mojang as a bug, but it was confirmed as "working as intended". (my report) (same issue, working as intended) Therefore, the behavior of Sodium should follow suit.

Actual Behavior

Installing Sodium for 1.17 actually increases the brightness of the entire game, making it look as it did before 1.17.

Sodium 0.3.2: 2021-09-02_14 28 38
Vanilla 1.17.1: 2021-09-02_14 29 22
Sodium 0.3.2: 2021-09-02_14 45 09
Vanilla 1.17.1: 2021-09-02_14 45 43

Reproduction Steps

  1. Take a screenshot in vanilla 1.17.1, ideally using /gamerule doDaylightCycle false to preserve lighting conditions.
  2. Load the same world in Sodium and take a screenshot from the same angle.
  3. Compare brightness.

Java version

Java 16

CPU

AMD Ryzen 5 5600x

GPU

Nvidia GeForce RTX 3060 Ti

Additional information

lithium-fabric-mc1.17.1-0.7.4

commented

I don't actually know why Sodium is brighter. There were a lot of changes in Minecraft 1.17, and looking through them hasn't revealed anything obvious. It seems more like a bug Mojang has introduced in 1.17 and simply has no willingness to debug/fix it.

If anyone has any pointers as to how we can fix this, please drop a comment.

commented

Figured out this is the result of a change to the shader assets made in 21w11a rather than game code

commented

The relevant change is the switch from texelFetch(Sampler2, UV2 / 16, 0) to minecraft_sample_lightmap(Sampler2, UV2) in the vertex shader for all block render passes (other than tripwire). The latter returns texture(Sampler2, clamp(UV2 / 256.0, vec2(0.5 / 16.0), vec2(15.5 / 16.0)))

commented

This has been fixed and should be included in the 0.5.0 release.