sodium-fabric icon indicating copy to clipboard operation
sodium-fabric copied to clipboard

Sodium still can't render water correctly

Open Obscure2020 opened this issue 2 years ago • 10 comments

Version information

sodium-fabric-mc1.17.1-0.3.3+build.8

Expected Behavior

When I began using Sodium a few months ago, I immediately noticed the performance improvements. This was expected/as advertised. However, I also expected Sodium to render things to look the same as they do in Vanilla Minecraft. This turned out to not be the case. For months now, Sodium has completely failed to render water columns correctly.

Actual Behavior

To demonstrate the problems that have existed in Sodium and still exist in Sodium with water rendering, I constructed a hollow column of barriers, into which I poured a water bucket. Only the top water block is a source block; the rest of the column is downward-flowing. It looks like this: Setup

I then positioned myself at a specific angle, looking at the water column, and I took screenshots of the column in Sodium 0.3.2, Sodium 0.3.3, and Vanilla 1.17.1. Here are the results: FlowingColumn

  1. Sodium 0.3.2 produced strange, segmented blotches of darker color in water columns when looking at them from odd/oblique angles. I am glad to be rid of this strange behavior.
  2. Sodium 0.3.3 produces a plain, translucent, completely untextured column. How the heck did you guys let this happen?

Next, I converted the entire column of water into water source blocks by placing kelp all the way up the column. I then positioned myself at the same angle as before, and took screenshots in the same three versions as before. Here are the results: KelpColumn

  1. Sodium 0.3.2 strangely refuses to render any of the water in a column of water sources filled with kelp. Once again, I am glad to be rid of this wacky behavior.
  2. Sodium 0.3.3 renders both the kelp and the water, but once again, the water is completely untextured.

Reproduction Steps

Make a column of water, then run/fly around and look at it from assorted angles. Seriously, that's all you have to do.

Java version

16.0.1 64bit

CPU

Intel Core i7-10510U

GPU

NVIDIA GeForce MX250

Additional information

No response

Obscure2020 avatar Nov 25 '21 03:11 Obscure2020

Layered translucency effects are not yet implemented, so the behaviour you're reporting with just water in 0.3.2 is a duplicate of #38 The kelp issue is a duplicate of #913, which as you can see is fixed in 0.3.3. The untextured water situation is new to me, and I can confirm it. Not sure if this may have the same root cause as #38.

LucilleTea avatar Nov 25 '21 03:11 LucilleTea

damn, i forgot to test barrier blocks, this will be broken also for light blocks.

now on to why did this happen? simply i never tested with barrier blocks, totally forgot they existed and turns out they have a totally different interaction with water. Glass and other transparent objects will set the water to a non-animated texture. Special blocks such as these go against that assumption.

it'll be caused by this here https://github.com/CaffeineMC/sodium-fabric/pull/892/files#diff-3486df2d697d632a02fa5eaeb85a0590a3a1e89df7c11488eeb9cf8b92d41fbbR324

the fix looks to be pretty simple, instead of checking for air i should have been checking adjBlock.getRenderType() != BlockRenderType.INVISIBLE which seems to work correctly

Altirix avatar Nov 25 '21 05:11 Altirix

For months now, Sodium has completely failed to render water columns correctly.

... produces a plain, translucent, completely untextured column. How the heck did you guys let this happen?

Once again, I am glad to be rid of this wacky behavior.

Please keep this tone out of issues in the future.

This is a free project that attempts to re-implement the entire chunk rendering pipeline. Like all software, it is subject to bugs. Water rendering in Minecraft is full of special cases and has been continuously hacked on to with every update of the game. It is not entirely straight forward to fix all these cases, and we sometimes miss regressions when one hacky behavior breaks another hacky behavior.

jellysquid3 avatar Dec 01 '21 22:12 jellysquid3

Please keep this tone out of issues in the future.

You know what, you're totally right. My bad. Compared to a few other mods on which I've reported bugs, you guys pleasantly surprised me with how quickly you addressed this issue. You have my thanks and my apologies for the manner in which I originally reported this.

Real quick, can I ask a question about the labels you have added to this issue? I'm curious about the B-1.17 label. Does the addition of this label mean anything about whether or not this will be addressed in 1.18 Sodium?

Obscure2020 avatar Dec 01 '21 23:12 Obscure2020

This plain texture is used in vanilla for water which is against glass, but Sodium appears to use it much more liberally. For example, it appears next to signs, and also results in the inside of water just not having any texture planes: 2022-03-05_00 38 23 2022-03-05_00 38 26

muzikbike avatar Mar 05 '22 00:03 muzikbike

Yeah, I've noticed some stuff like that. I mean, I really appreciate how much optimization Sodium is able to pull off. Without Sodium, my computer can't get any better than like 20 fps in Minecraft. I just wish they could figure out how to make water look right.

Obscure2020 avatar Mar 05 '22 00:03 Obscure2020

Still happens sadly and it's really jarring to look at. It's especially jarring behind ice or even worse behind tinted glass. Some of the water textures vanish and some remain in form of odd squares and rectangles poking out. Like so: https://github.com/CaffeineMC/sodium-fabric/issues/1214

Lythael avatar Mar 07 '22 18:03 Lythael

Still experiencing what looks like faces inside flowing water rendering incorrectly on sodium 0.4.1 - is there a way to fix this on my end I am unaware of? As you can see in the screenshot below, it happens when the water is not next to a solid block.

2022-05-29_20 10 44

theothertored avatar May 29 '22 18:05 theothertored

Closing this issue and moving to a new one at #1369, as this issue is still present in newer versions of Sodium and Minecraft.

Obscure2020 avatar Jun 29 '22 22:06 Obscure2020

We know the issue still happens, and it is being worked on. Creating new issues to report the same problem so that it "gets looked at" is not going to result in anything but the issue tracker getting spammed.

jellysquid3 avatar Jun 29 '22 22:06 jellysquid3

According to the author of PepperCode1/Continuity#245, this bug still happens, but when the overlay texture is used should not deviate from vanilla since commit a2bb59e0408300c4912233b2189c57d4339c89dc. Does this issue still happen or is there a different but seemingly related issue?

PepperCode1 avatar Apr 14 '23 17:04 PepperCode1

The incorrect water overlay sprite has been fixed. The water having "holes" inside of it when looking at it from certain angles is a different issue (#38).

pajicadvance avatar Jun 15 '23 19:06 pajicadvance