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

Fix Z-fighting on enchanted models with coplanar intersecting faces #2487

Closed
muzikbike opened this issue May 9, 2024 · 3 comments
Closed
Labels
T-enhancement Type: Enhancement

Comments

@muzikbike
Copy link

Request Description

This issue (https://bugs.mojang.com/browse/MC-262933) is much the same as #2454, and I assume could be fixed in a similar way - compute some outer shape for the model and apply the enchantment glint to that, rather than just throwing it on the textures directly.

The easiest way to reproduce this without a resource pack is to enchant a wall, then observe it from below - despite the texture being mapped identically in the area of intersection, Z-fighting arises nonetheless.

2024-05-09_10 43 46
2024-05-09_10 43 54
2024-05-09_10 43 59

@muzikbike muzikbike added S-needs-triage Status: Needs triage T-enhancement Type: Enhancement labels May 9, 2024
@jellysquid3
Copy link
Member

Minecraft uses a VertexConsumer proxy to generate new geometry for the glint overlay, and it does this at render time so we don't have any opportunity to bake. It would probably be to slow/error prone to try and de-duplicate geometry as well. The only solution in my mind is to stop generating geometry and apply the effect directly in the shader, which the game doesn't do already for some reason.

@jellysquid3
Copy link
Member

I'm not going to rule this as "out of scope" quite yet, since fixing this inherently means solving a major performance issue that does appear in the real world.

But probably we should merge #2487 and #2486, since they're symptoms of the same problem (inappropriately using additional geometry.)

@jellysquid3
Copy link
Member

Closing in favor of #2497 since the issues you have reported about enchantment glint are fundamentally the same problem.

@jellysquid3 jellysquid3 closed this as not planned Won't fix, can't repro, duplicate, stale May 12, 2024
@jellysquid3 jellysquid3 removed the S-needs-triage Status: Needs triage label May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-enhancement Type: Enhancement
Development

No branches or pull requests

2 participants