Embeddium

Embeddium

37M Downloads

direction-dependent z-fighting on some mekanism blocks

skelzie2 opened this issue · 6 comments

commented

seen and tested with qio dashboard (only when lit with any color) and modification station, though i wouldnt be surprised if it showed up in a few more places too. the blocks in question have z-fighting on one face when that face points east, south, or up.
Screenshot_2023-10-07_18-39-45
Screenshot_2023-10-07_18-40-08

commented

In release 0.3.12, a new system was added that attempts to patch simple block models automatically, which should fix this issue without needing to disable CVF.

commented

I caved under pressure of enough people having requested this and added an option to disable the optimization, provided that Oculus is not installed... it will be in the next release.

commented

notably also happens with rubidium; in fact that's how i found this mod, looking for a sodium that doesnt break mekanism. perhaps it's not meant to be, hehe

commented

This is a limitation of a Sodium optimization - to reduce load on the GPU, block coordinates are stored with reduced precision. If mods use extremely small offsets for the parts of their models, the models will z-fight when Sodium is installed. In layman's terms, Sodium can only represent offsets to a precision of roughly 0.008 units, while many mods go as low as 0.001, even though the difference is not perceivable.

On 1.16, the optimization that does this can be disabled, but on newer versions it cannot be disabled. There are some tweaks I can try to implement to reduce the number of cases this occurs in, but a proper fix is to ask the mod to increase the offset.

commented

Yeah, I cannot fix this easily from my end, without removing that optimization (which would significantly regress performance on iGPUs). I tested the tweak I had in mind and it only solves the issue in some placements; in others the z-fighting is still perceivable.

commented

This can be fixed in Embeddium 0.2.0+ by disabling "Use Compact Vertex Format" in Video Settings -> Performance; the old behavior remains the default as disabling the CVF will impact FPS on some systems.