Sodium

Sodium

61M Downloads

EDIT: Fixes in 0.6.7 Break Tripwire Render Type Behavior

Closed this issue ยท 3 comments

commented

Bug Description

dc1d913 changes how the RenderType.TRIPWIRE is rendered (while fixing some other bugs) and thus does not replicate the Vanilla behavior of discarding all pixels of low opacity. This previously replicated the Vanilla behavior. This then leaves large portions of blocks cut out from others.

Reproduction Steps

Using a cross model with RenderType.TRIPWIRE and a partial-opacity layer on top of a full opacity layer - such as the one found here - boot up the game and find the blocks to be rendered incorrectly. Releases of my mod this file is pulled from can be found here to use with Sodium for testing.

Log File

https://gist.github.com/voidsong-dragonfly/362562ffdccd03b56eb7838f26eedb2e

Crash Report

N/A. Was told on the Discord I did not need one.

commented

The only commit I can find that touches something related to this is dc1d913, but I don't see how this could have broken it. I have not bisected this.

Correct appearance on 0.6.5:

Image

Incorrect appearance on 0.6.7:

Image

It's broken because the alpha cutoff isn't performing discard on nearly-translucent pixels. From what I can tell, we've never done fragment discard on the translucent render pass, so I don't now why it worked to begin with.

commented

This issue actually happens due to fixes with how render layers are applied. I have been advised (and implemented) a better method of my intended visuals, as can be seen here. Discovery of the cause of the issue can be seen here.

commented

The reasoning is this: In vanilla there's fragment discard in the tripwire pass, which makes it look correct. In Sodium we've never had and don't currently have fragment discard in the translucent pass, which the tripwire material is rolled into. The model is entirely tripwire because until now the author did not use separate materials for different parts of the model. In sodium you'd expect this to break, because without discard the render order of the quads is wrong so you see broken translucency sorting. Prior to 0.6.7 this did not break even though we were lacking fragment discard because we had material downgrading, which turned the grass part of the model into cutout, thus fixing the render order as the grass quads were no longer breaking the sorting. In 0.6.7 we changed the downgrading mechanism to not downgrade a model if it has non-default materials, which once again made the entire model render as translucent and broken. The fix is to use a composite model where the translucent overlay parts of the model have the translucent material and the grass part has cutcout, which fixes the problem by rendering in the right order. Separately, though one should not rely on this behavior to fix this type of problem, 0.7 will also separately make this render correctly by quad-splitting the entire model and solving the translucency sorting artifacts.