
Z-fighting with Sodium and its ports
soir20 opened this issue · 8 comments
Describe the bug
When Sodium or one of its ports is present, z-fighting occurs in certain directions for some solid blocks.
To reproduce
- Put a solid block in the world that has an overlay (like iron ore)
- Observe z-fighting from certain angles
Expected behavior
No z-fighting
Screenshots or videos
See #8
Which Minecraft versions does this bug affect?
1.16.5-1.20.1
Mod loader
Which mod loaders does this bug affect?
- Forge
- Fabric
Mods list
MoreMcmeta core, MoreMcmeta emissive plugin, Sodium or Embeddium
Resource pack
Stay True Emissive
Additional context
This issue is likely due to Sodium's compact vertex format, which handles coordinates with less precision.
Originally reported in #8 by @nathanpaulyoung.
Potential return of this issue? Emissives no longer see functionality.
Are you seeing z-fighting or no emissive textures at all? Can you please create a new issue for this, since this is a new problem?
Please also ensure that you're using Indium if you're using Sodium on Fabric.
@nathanpaulyoung @DominikGrz MoreMcmeta emissive plugin v2.0.1, which contains a fix for this issue, has been released. It will take a few minutes for the files to be approved by CurseForge. Please report any issues you encounter with the new version.
Works amazingly. Not sure if this is an actual thing or if it just seems like it, but I think the FPS is higher and more stable, too.
My guess is there wasn't a real increase, or something about the change is causing the Java runtime to do a better JIT compilation of that code.
Yeah, reasonable take. But after playing on it for a good bunch of hours since updating, it definitely feels smoother to me. If that's placebo, then it's a damn good placebo haha.
Thanks again, dude.
I noticed this as well, though I didn't do a thorough investigation to definitively confirm whether there's been an improvement. It's surprising to me because there were no explicit changes to improve performance. For 1.20.1, more calculations were added (see here), so I would have assumed the performance would be slightly worse or about the same. My guess is there wasn't a real increase, or something about the change is causing the Java runtime to do a better JIT compilation of that code.
I'm not sure if this matters, but the new Sodium 0.6 beta 2 appears to have a fix for the underlying issue mentioned in the changelog.
https://modrinth.com/mod/sodium/changelog?g=1.21.1
Fixed a problem where z-fighting would occur with some block overlays, such as emissive textures.
I'm not sure if this matters, but the new Sodium 0.6 beta 2 appears to have a fix for the underlying issue mentioned in the changelog. https://modrinth.com/mod/sodium/changelog?g=1.21.1
Fixed a problem where z-fighting would occur with some block overlays, such as emissive textures.
It's only for 1.21 :(