Sodium

Sodium

35M Downloads

[1.18 alpha] Water stops translucent blocks from rendering below it

NotADinosaur opened this issue ยท 4 comments

commented

Version information

1.18 0.4-alpha 5

Expected Behavior

vanilla
2021-12-01_18 50 26

Actual Behavior

with sodium installed
2021-12-01_18 49 16

Reproduction Steps

1: Place translucent blocks
2: put water on top of them

Java version

17.0.1

CPU

intel i7-3770

GPU

NVIDIA GTX 760

Additional information

This does not happen the other way around; water correctly renders beneath translucent blocks.

commented

#38 Pretty sure.

commented

Yep, seems to be that issue. I've always had issues with translucents and sodium but never this severe before so I thought it might be something different. This doesn't happen for me in 0.3.2 1.17.1 (yes I know that's outdated, I haven't tested with 0.3.3 yet)

commented

I just noticed that that issue has been open for over a year and a half, why isn't it fixed yet? I don't know much about mod dev, but is it really that hard to fix?

commented

@NotADinosaur Long-winded answer to your question.

Rendering translucent geometry in a performant manner is an unsolved problem in computer graphics. ignoring raytracing. Most games have problems with it and generally avoid translucent geometry for a reason.

Getting exact results requires sorting all the geometry in the scene from back-to-front or some form of depth-peeling, which is already very slow and only gets exponentially slower as the scene becomes more complex.

Alternatively, you can use an approximate method (often referred to as Order-Independent Transparency or OIT) which doesn't require expensive sorting or depth-peeling, but it doesn't produce exact results and is significantly more complicated.

MBOIT is one such algorithm and is the most promising option for good accuracy and high performance (and they provide a video demonstration against depth-peeling and some other approximate algorithms) but it's not straightforward to implement.

Anyways, to answer bluntly, it's a hard problem to fix and especially so if you care about performance.