Sodium Reloaded (Unofficial)

Sodium Reloaded (Unofficial)

0 Downloads

Terrain vertex attribute "a_LightAndData.xy" would be set to 8 instead of 0 when light level is 0.

Tahnass opened this issue ยท 3 comments

commented

Bug Description

Terrain vertex attribute "a_LightAndData.xy" would be set to 8 instead of 0 when light level is 0.
This problem started to appear in version 0.6.0 beta.1 (not tested with alpha versions).
It has no effect on vanilla rendering, but may cause some shaders to calculate block lighting incorrectly.
2024-09-17_12 53 36

Reproduction Steps

Launch Minecraft 1.21.1 with sodium-fabric-0.6.0-beta.2 only.
Capture a frame with RenderDoc. And randomly select a triangle with no lighting.
0 1
image

Log File

No useful infromation.

Crash Report

No useful infromation.

commented

resource pack terrain shaders are not supported

commented

Sodium clamps the light map coordinates between (0.5, 0.5) and (15.5, 15.5) in the vertex data rather than in the shader code to avoid some additional instructions. So these values are to be expected for the minimum and maximum brightness levels.

commented

If you are authoring a shader pack with Iris and this behavior causes compatibility issues, then you should open a bug report with them. They are copying the clamping behavior, but it probably doesn't make sense for OptiFine-style shaders that expect it to work identically to Minecraft.