CaffeineMC/sodium-fabric

Layered translucent blocks do not render correctly

RdSt14 opened this issue ยท 28 comments

Expected Behavior

Water will be visible inside glass stained pipes, commonly used in water elevators

Actual Behavior

Water is not visible through stained glasses, although items can be seen flowing

Reproduction Steps

Make a water tube, doesn't matter if its flowing or a water elevator type.

Attachments

https://cdn.discordapp.com/attachments/389371678859460611/726798724206166066/received_707934516451025.png

System Information

  • Java Version: [Java 8 Update 251]
  • CPU: [Intel Core i5-7200U]
  • GPU: [Intel HD Graphics 620]

also it show other weird thing like the sky rendering black instead of white or stained glass can't show other stained glasses behind them

Sodium does not implement quad sorting for translucent block faces, leading to all kinds of translucency issues. I'll be making this a tracking issue for other problems caused by it.

Can confirm all kinds of weird behaviour with translucent blocks.
2020-07-15_20 38 01
2020-07-15_20 40 25

You can even see chunk borders in ice:
2020-07-15_20 44 41
2020-07-15_20 44 46

More images of the issue

no rendering issue when water rendering isn't effecting the block
2020-07-17_18 25 40

Only top texture on the block renders through water
2020-07-17_18 08 09

As a result of the issue above, you cannot see certain transparent blocks above you while inside of water
2020-07-17_18 12 42

Issue applies to flowing water as well
2020-07-17_18 14 41

Also, portals are invisible behind glass.

See this video by Xisumavoid for another example of this issue with Honey Blocks (they are almost as see-through as glass, even though they shouldn't be that translucent).

With Sodium:
image

Without Sodium:
image

Nether Portals also not showing up
2020-08-28_20 09 29
2020-08-28_20 10 56

Just in case this is useful, not sure if I'm rehashing what's already known -

I'm getting same rendering as @zLauch on f577eb2 (and also on ishland's 1.16.2 support PR, though evidently that's not the actual cause) but not 0.1.0. Hardware is AMD Mullins, happens with all of sodium's rendering modes.

Java is version 1.8.0_262, using 64-bit architecture.

AMD A8-7410 APU with AMD Radeon R5 Graphics
Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R4/R5 Graphics] (rev 45)

Subsystem: Dell Device 06bf

Kernel driver in use: amdgpu

OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.1.6

Not sure if this is helpful/already known but it seems like on chunk borders translucency effects are less broken? I've only tested it with honey/slime blocks but it seems like when you have two blocks on either side of a chunk border the middle part gets rendered correctly. The image should be a bit better at explaining.
2020-09-27_20 20 38

when looking throught stained glass, air and then more stained glass, parts of it are missing:
2021-03-03_12 52 49

Not sure if this is helpful/already known but it seems like on chunk borders translucency effects are less broken? I've only tested it with honey/slime blocks but it seems like when you have two blocks on either side of a chunk border the middle part gets rendered correctly. The image should be a bit better at explaining.
2020-09-27_20 20 38

Note that this issue affects subchunk borders, not just chunk borders. You'll see the same effect on the vertical axis, if you cross borders.

Screenshot from 2021-06-27 16-08-22

The issues with slime and honey blocks seem to be at least partly fixed in the 1.17 beta version.

1.17 beta version "seems" fix this issue, but in some cases it's still werid(For example the slime block behind white stained glass).
ZV05LX_`HLW$34}Y8@O) F8

2021-09-26_21 45 31
2021-09-26_21 45 52
more pics ig, havent seen anyone mention how borked kelp is (except for the topmost part for some reason?)

I notice this bug while viewing a column of water threw a multichunk plane of glass and notice it only effected the water and stained glass in the same sub chunk
2021-10-13_22 39 53
.

I noticed the kelp and water appear to render incorrectly with many blocks, not just glass. This was on version 0.3.2+build.7
image
image
image

Also, all one-block tall ice appears to not render any submerged parts.
image

This bug is:

  • issues related to interactions between multiple layers semi-transparent blocks, such as water, ice, stained glass, nether portals, etc.

This bug is not:

  • issues related to blocks with clip transparency, such as glass
  • issues related to one layer of translucency, such as the water + kelp rendering issues reported in #932

We know a lot about this bug already. Please refrain from posting unless you have something new to add.

I want to add to this issue two further things that I noticed:

  1. only happens with stained glass
  2. weird things happen on chunk borders

Here are two pictures from 1.18.1 (0.4.0-alpha5+build.9)

image
image

image

image
image

Water in a water column renders with strips and breaks off directly on the borders it seems like.
This changes while you move through the column where you can see random vertical and horizontal "panes" of darker water.

image

image image

Water in a water column renders with strips and breaks off directly on the borders it seems like. This changes while you move through the column where you can see random vertical and horizontal "panes" of darker water.
java_oz3Hll8vpO
Not sure if it's been referenced elsewhere but on subchunks it adds slices/faces to water

I have the same problem with glass not rendering through water.
2022-04-16_11 53 30
2022-04-16_11 54 47

is there an actual implementable fix for this yet? or am I gonna be stuck not viewing the waterfalls in my terrarium?

is there an actual implementable fix for this yet? or am I gonna be stuck not viewing the waterfalls in my terrarium?

No, it's a WIP. See: pull request

Don't know if anyone has noticed - but this only affects things that are placed in Translucent render layers. This includes water, tinted glass, stained glass, honey, slime, etc. It would appear that faces are simply sorted by some insertion order.
2022-07-19_14 28 24
2022-07-19_14 28 07
2022-07-19_14 28 17

Posted another issue about water rendering issue in stained glass, but I feel like I should add it here as well
First pic (with continuity). Second pic (without continuity)
2022-07-20_19 11 51
2022-07-20_19 31 40

Please stop!

...adding yet more images of the same thing

This bug is being actively worked on, and we don't need any more information about it.
Instead, sit down, relax, and wait patiently.

Thanks!