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

Very small nodeboxes z-fighting with overlay tile of neighboring node #15674

Open
kno10 opened this issue Jan 12, 2025 · 4 comments
Open

Very small nodeboxes z-fighting with overlay tile of neighboring node #15674

kno10 opened this issue Jan 12, 2025 · 4 comments
Labels
@ Client rendering Not a bug The behaviour is working as intended and won't be changed Possible close Regression Something that used to work no longer does

Comments

@kno10
Copy link
Contributor

kno10 commented Jan 12, 2025

Luanti version

Luanti 5.11.0-dev-9eac0126b (Linux)
Using LuaJIT 2.1.1723681758 (OpenResty)
Built by GCC 14.2
Running on Linux/6.11.6 x86_64
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="/usr/local/share/luanti"
STATIC_LOCALEDIR="/usr/local/share/locale"

Note: SDL disabled, because of its horrible input lag.

Operating system and version

Debian sid

CPU model

Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz

GPU model

Intel Corporation UHD Graphics 620 (rev 07)

Active renderer

Irrlicht (4.6 / opengl3 / X11)

Summary

With current HEAD:
screenshot_20250112_215235

With 5.10 release:
screenshot_20250112_215418

Notice how pink petals textures are cut off based on distance. Possibly due to some z-fighting, so that the petals disappear after a certain distance.

Steps to reproduce

Probably affects any node with a texture at -7.9/16, so rather close to the node below.

@kno10 kno10 added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Jan 12, 2025
@Desour
Copy link
Contributor

Desour commented Jan 12, 2025

What are the node defs for these nodes? Are the petals separate nodes?


Possibly related: #15634

@sfan5
Copy link
Collaborator

sfan5 commented Jan 12, 2025

I can't find the revision "9eac0126b" anywhere. If your build is older than 4774e65 you should update first.

@Zughy Zughy added Action / change needed Code still needs changes (PR) / more information requested (Issues) @ Client rendering labels Jan 12, 2025
@kno10
Copy link
Contributor Author

kno10 commented Jan 13, 2025

It is #15027 rebased on 464cc92 (which is master yesterday).
So 4774e65 is included.

Node definition is here: https://git.minetest.land/VoxeLibre/VoxeLibre/src/commit/d0dd2bc13738b1f7e21800435898604443820c9f/mods/ITEMS/mcl_cherry_blossom/nodes.lua#L105-L117

        drawtype = "nodebox",
	node_box = {type = "fixed", fixed = {-1/2, -1/2, -1/2, 1/2, -7.9/16, 1/2}},

to test, you should be able to download https://git.minetest.land/VoxeLibre/VoxeLibre/archive/mapgen-test-branch.tar.gz
and use /findbiome CherryGrove.

@sfan5 sfan5 added Regression Something that used to work no longer does Bug Issues that were confirmed to be a bug and removed Action / change needed Code still needs changes (PR) / more information requested (Issues) Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible labels Jan 13, 2025
@sfan5
Copy link
Collaborator

sfan5 commented Jan 13, 2025

This is actually a regression from 5b14c03 and does not interact with #15531 at all.

This happens when rendering the overlay tiles of grass, since the bias is high enough that it intersects with the petals.
I tried some different values for PolygonOffsetSlopeScale but there's none that fixes both the grass z-fighting and petals.
Unless some magic solution pops up I think you will have to live with the fact that 0.00625 is not enough leeway for the engine to apply other overlays problem-free, and adjust the nodebox.

@sfan5 sfan5 changed the title z-fighting depending on rendering distance regression Very small nodeboxes z-fighting with overlay tile of neighboring node Jan 13, 2025
@sfan5 sfan5 added Not a bug The behaviour is working as intended and won't be changed Possible close and removed Bug Issues that were confirmed to be a bug labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client rendering Not a bug The behaviour is working as intended and won't be changed Possible close Regression Something that used to work no longer does
Projects
None yet
Development

No branches or pull requests

4 participants