-
Notifications
You must be signed in to change notification settings - Fork 38
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
lcd panel: increase the offset of the text plane to the nodebox to avoid z-fighting #57
Conversation
This is not perfect. 🙁 |
It can never be perfect, not until Minetest allows directly compositing arbitrary text onto the surface of a node. Just go with ±0.42 to be safe. |
|
I thought that world-edge issue was fixed already (it used to badly affect mesecons and other nodeboxes)? |
Fwiw, https://gitlab.com/VanessaE/signs_lib/blob/master/init.lua#L92-107 signs_lib.regular_wall_sign_model = {
nodebox = {
type = "wallmounted",
wall_side = { -0.5, -0.25, -0.4375, -0.4375, 0.375, 0.4375 },
wall_bottom = { -0.4375, -0.5, -0.25, 0.4375, -0.4375, 0.375 },
wall_top = { -0.4375, 0.4375, -0.375, 0.4375, 0.5, 0.25 }
},
textpos = {
nil,
nil,
{delta = { x = 0.41, y = 0.07, z = 0 }, yaw = math.pi / -2},
{delta = { x = -0.41, y = 0.07, z = 0 }, yaw = math.pi / 2},
{delta = { x = 0, y = 0.07, z = 0.41 }, yaw = 0},
{delta = { x = 0, y = 0.07, z = -0.41 }, yaw = math.pi},
}
} I haven't heard/seen any complaints... |
Screenshots removed, they only showed problems arisen by mipmapping.
|
aeed5ef
to
99b8d3f
Compare
I've changed the number to |
Well it IS the answer to life, the universe, and everything. 😄 |
(The most reliable fix might be to make the front face of the node transparent and adding the face instead as the entities texture. And the loading problems could be fixed by making the text object non-static. Anyway, this little PR's fix here should be fine enough.) |
Making the LCD surface a part of the text entity would prevent the use of texture packs. Better to yell at MT devs here: luanti-org/luanti#1367 |
17.5mm (7/16−0.42) is too far. It’s barely noticeable currently, but to fix problems mipmapping causes (see #58), background is needed in the entity, not in the nodebox, so the gap will be visible: |
Plus floating point inaccuracies at high values, so the situation gets worse the further away from the origin you go. |
Since 5.0.0 this should no longer be an issue. Can anyone confirm whether it's fixed now? |
@SmallJoker thats not fixed |
I retested with a distance of 0.43 and could not get any Z-fighting with this value. Committed as 9c2b980 |
Fixes #56.
Z-fighting is more rare.