Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make glass panes/iron bars cull each other properly when stacked vertically #153

Open
muzikbike opened this issue Mar 30, 2023 · 6 comments
Labels
suggestion A suggestion, enhancement, feature or request

Comments

@muzikbike
Copy link

Vanilla issue https://bugs.mojang.com/browse/MC-50349 - this has been the case for glass panes since 1.7 and for iron bars since 1.8.

In vanilla, glass panes on top of other glass panes don't cull the other glass panes, and likewise for iron bars. This results in some rather obvious stripes in large sheets formed of the blocks when seen at the correct angles, especially for iron bars.
2023-03-30_06 31 15

It's possible to manually add in cullface arguments to the models in order to have faces be culled, however a perfect solution cannot be reached through this alone. If we assign cullface only to the "post" element, we get this:
2023-03-30_06 32 09

This is obviously incomplete, so we'd want to have the parts extending off of the post also have their tops and bottoms culled. If we add cullface accordingly, they get culled, but another issue arises: they're culled regardless, with no regard for the geometry actually above them, resulting in faces disappearing that we don't want to disappear.
2023-03-30_06 34 33

In the worst case, one single post can cause four adjacent panes to not render their tops if positioned atop a cross:
2023-03-29_19 26 01
2023-03-29_19 26 02
2023-03-29_19 26 25

Continuity has a built-in resource pack which implements cullface for panes, however since it's just a resource pack it's subject to all of the same issues (PepperCode1/Continuity#74). A resource pack cannot fix this issue alone - there needs to be something that takes the actual shape of blocks above it into account, rather than simply their presence.

Here are two resource packs for testing - one which only adds cullface to posts, and another that adds it to the rest of the pane:
pane-post-cull-only.zip
pane-all-cull.zip

@FxMorin
Copy link
Owner

FxMorin commented Mar 30, 2023

I'll attempt to add the ability to modify this cullface ;)

@muzikbike
Copy link
Author

I haven't tested this in OptiFine yet. It may already be fixed there, or may previously have been at one point according to this issue: sp614x/optifine#193

@muzikbike
Copy link
Author

Indeed, OptiFine for 1.19.4 gets rid of this issue: we can clearly see the top plane of that pane still exists. This happens for Fast and Fancy connected textures. Fixing this is entirely possible.
2023-03-30_15 30 28

Note: the weirdness of the side textures is due to multiple separate issues.

@FxMorin
Copy link
Owner

FxMorin commented Apr 10, 2023

Ya I believe I know how to fix this without the optifine jank, ill try to make some time to fix it

@muzikbike
Copy link
Author

This specific issue is now reported under https://bugs.mojang.com/browse/MC-264676.

@FxMorin
Copy link
Owner

FxMorin commented Jan 8, 2024

Don't have enough time to do this, however I think if you split the top part into multiple pieces and only give a cullface to one it might work. Not sure tho

@FxMorin FxMorin added the suggestion A suggestion, enhancement, feature or request label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion A suggestion, enhancement, feature or request
Projects
None yet
Development

No branches or pull requests

2 participants