Iris Shaders

Iris Shaders

36M Downloads

Sodium causes fluids to render slightly darker than vanilla Minecraft

EminGT opened this issue ยท 5 comments

commented

What happened?

The sky lightmap on water is very so slightly lower that usual in Iris. This causes water reflections to go darker in the distance in Complementary+Iris (Applied a workaround in Complementary v4.3_dev1).

Screenshots

Here is a test that checks if the water sky lightmap is below a specific value. Iris returns yes while Optifine returns no.
unknown

Relevant log output

No response

Iris and Minecraft Version

"iris-and-sodium-mc1.17-1.1.2+build.9" with the "iris-fabric-loader" in Minecraft 1.17.1

Are you running Sodium along with Iris?

Yes

Operating System

Windows 10

What is your GPU?

RTX 3070

Java Version

Java 16

Additional context

No response

commented

Appears to be linked to this issue
CaffeineMC/sodium#883

commented

Relevant file shared on Discord:

baseWaterLightmapCheck.zip

commented

Confirmed with Iris 1.2.2 on 1.16.5.

image

It seems like Sodium's changes to fluid rendering reduce the brightness of top faces of water by one light level in some cases. The root cause of this appears to be that vanilla's fluid renderer checks the light level of the fluid block & the light level of the block above for lighting the top face, while Sodium just checks the fluid block itself?

commented

An interesting observation made by @Lolothepro: On the branches with glsl-transformer patching, this issue is fixed (only small pink water areas) in both 1.16.5 and 1.17.1. I'm not sure what this means, but I wanted to add it to this thread. The lighting is weird too, so I'm not sure if this is a good or a bad thing.

1.17.1 with glsl-transformer:
Screenshot 2022-08-01 at 17 28 38

1.16.5 without:
Screenshot 2022-08-01 at 17 20 27

1.16.5 with glsl-transformer:
Screenshot 2022-08-01 at 17 21 48

commented

This was caused by a bug in the transform patcher. You can disregard this.