Translucent block models that extend past 1x1x1 may not render correctly
Altirix opened this issue ยท 5 comments
Bug Description
This is also a bug within vanilla. In one case however sodium is producing the right result.
There seem to be two categories of this bug.
- models with intersecting translucent quads.
- models that extend outside of their chunk.
Reproduction Steps
Test Scene | Sodium 0.6b2 | Vanilla |
---|---|---|
3x3x3 translucent intersecting with water | ||
3x3x3 translucent intersecting multiple | N/A | |
3x3x3 translucent intersecting neigbour chunk |
Log File
N/A
Crash Report
N/A
Even regular block-sized 1x1x1 models that intersect the water surface or have internal intersections are rendered wrongly. This is because order-based translucency sorting of quads that intersect is fundamentally impossible without splitting the quads into pieces along their intersection planes. Such splitting requires a bunch of math to figure out the pieces, and then writing more quads with some interpolated vertexes. I think it's possible but requires a significant conceptualization and engineering effort.
The case where geometry is wrongly sorted if it extends outside of the section would be fixed by splitting quads along the section's boundaries and rendering the quads that are then outside of the section as part of the neighboring sections. (this is another layer of complication)
btw I think one of your last screenshots got put into the wrong column.
Even regular block-sized 1x1x1 models that intersect the water surface or have internal intersections are rendered wrongly. This is because order-based translucency sorting of quads that intersect is fundamentally impossible without splitting the quads into pieces along their intersection planes. Such splitting requires a bunch of math to figure out the pieces, and then writing more quads with some interpolated vertexes. I think it's possible but requires a significant conceptualization and engineering effort.
btw I think one of your last screenshots got put into the wrong column.
fixed the last screenshot, they render identical. but yeah, i wouldnt be expecting it to be fix as it doesnt sound like its worth the engineering effort especially given this is just a test model and im not sure if anyone is running into this in real resource packs.
I'm experiencing similar or potentially the same issue? I can't quite tell but this is what water looks like when looking at it at specific angles. This is in 1.20.1 with version 0.5.11 of Sodium.
Edit: Also happens with connected textures for transparent blocks, like ConnectedGlass. Seems to happen right at the transition of chunks: