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

Sodium changes fluid rendering compared to vanilla

Open coderbot16 opened this issue 3 years ago • 11 comments

A water flow rendered by the current Sodium next branch:

2021-03-26_23.56.16.png

The same water flow, rendered in vanilla:

2021-03-26_23.59.03.png

I'm not sure if this is intended behavior or not.

coderbot16 avatar Mar 27 '21 04:03 coderbot16

This is #38 - lack of translucency sorting - right?

LucilleTea avatar Mar 27 '21 04:03 LucilleTea

That's what I originally thought, however if you look closely at the top of the water flow, you can see that the geometry of the diagonal faces is quite different (a flat face instead of a "V" face). It seems like this is separate from the previous translucency sorting issues.

coderbot16 avatar Mar 27 '21 04:03 coderbot16

It's possible that this is actually related to the fact that vanilla is generating degenerate non-coplanar quads here, and since Sodium changes the orientation of vertices in quads due to lighting, it might be changing the appearance of the quads too.

coderbot16 avatar Mar 27 '21 04:03 coderbot16

A non-coplanar quad will render differently depending on how it is converted to triangles, and changing the orientation of the vertices changes how it is converted to triangles:

ridge_valley.gif

coderbot16 avatar Mar 27 '21 04:03 coderbot16

Not sure if this is the correct place to post this, but I have had some other weird issues with water that seem similar to what your are having: 2021-05-20_16 06 17 2021-05-20_16 05 34 2021-05-20_16 05 43 2021-05-20_16 05 52 2021-05-20_16 06 00

mscatloaf avatar May 20 '21 23:05 mscatloaf

@mscatloaf The problem you are showing here is #38. This issue is about the particular shape of the water flow, not the translucency problems when they overlap.

LucilleTea avatar May 21 '21 02:05 LucilleTea

This issue is still valid in 0.4.10. The difference is really hard to see though.

MeeniMc avatar May 11 '23 02:05 MeeniMc

I've got similar issues with my water as well. However, I've got an issue where water makes ice transparent for whatever reason.

2023-06-21_16 41 04 2023-06-21_16 40 54 2023-06-21_16 40 17

EnterGerald avatar Jun 22 '23 01:06 EnterGerald

this is a duplicate of #38, it’s a translucency sorting issue. the fix is non-trivial, but the dev team is working on it.

astridellensdottir avatar Jun 22 '23 02:06 astridellensdottir

The original report is not #38, but the followup images are.

MeeniMc avatar Jun 22 '23 04:06 MeeniMc

As coderbot mentioned, the orientation of the crease is changed. I've discovered that the orientation of the crease is differs between the inside-facing and outside-facing quad of such a piece of water. I've attached two screenshots from within and outside of water with the crease highlighted. 2023-10-10_01 19 49 2023-10-10_01 20 03

douira avatar Oct 09 '23 23:10 douira

I made a PR to fix this issue with https://github.com/CaffeineMC/sodium-fabric/pull/2467. Does it work as expected?

douira avatar May 05 '24 17:05 douira

yes it does.

MeeniMc avatar May 08 '24 01:05 MeeniMc