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

Relief Mapping causes floor waves #9243

Closed
HybridDog opened this issue Dec 24, 2019 · 6 comments
Closed

Relief Mapping causes floor waves #9243

HybridDog opened this issue Dec 24, 2019 · 6 comments
Labels
@ Client / Audiovisuals Shaders Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible

Comments

@HybridDog
Copy link
Contributor

Minetest version
Minetest 5.2.0-dev-37f771a9-dirty (Linux)
Using Irrlicht 1.8.4
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_GETTEXT=1
USE_SOUND=1
USE_CURL=1
USE_FREETYPE=1
USE_LUAJIT=1
STATIC_SHAREDIR="/usr/local/share/minetest"
OS / Hardware

Operating system: linux
CPU: intel

GPU model: intel
OpenGL version: 4.5

Summary

I think that Parallax Occlusion in Relief Mapping mode (the default mode) does not work well together with fastfaces:
fast
fast_w
nofast
nofast_w

If you place a single node, the 3D surface looks fine, but when there is a fastfaces stripe, it looks distorted.
If you strafe along the stripe direction, it looks like the floor is slowly going up and down.

Steps to reproduce

Enable Parallax Occlusion, set parallax_occlusion_scale to 0.3, use this texture pack: https://github.com/HybridDog/HybridTP, and place bricks.
The bricks should look protruded as shown on the screenshots above.

@HybridDog HybridDog added the Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible label Dec 24, 2019
@SmallJoker
Copy link
Member

Duplicate of #6694 ?

@HybridDog
Copy link
Contributor Author

Duplicate of #6694 ?

No, that issue is about the scale field in the tile definition. This one is about textures repeated via fastfaces and the distorted Relief Mapping. Nonetheless, the bugs are probably related to each other.

@Warr1024
Copy link
Contributor

Warr1024 commented Jan 1, 2020

Is this related to the "jiggling textures" bug? This screencap was sent by one of my players. The changing light levels nearby cause the mapblock geometry to change (since light falloff is baked into textures) which causes textures to shift. You can see the same effect when you start digging a node, as the introduction of the crack texture also changes the block tessellation.

demo

Notably, disabling the Parallax Occlusion shader made this bug go away.

@HybridDog
Copy link
Contributor Author

HybridDog commented Jan 1, 2020

Is this related to the "jiggling textures" bug?

Yes it is. When neighbouring nodes have different light values, fastfaces are not used at those positions:
2020-01-01-124146_974x615_scrot
2020-01-01-124148_974x615_scrot

Notably, disabling the Parallax Occlusion shader made this bug go away.

I think Parallax Occlusion only does something useful if you have normalmap textures with height information in their alpha channel or use the normalmap generation setting.

@hecktest
Copy link
Contributor

I've had something like this happen in another project of mine, the problem was malformed tangent space and varying texel density. Accounting for those things in the meshgen and the shader should fix it. There's no inherent reason why parallax occlusion should not work on arbitrary geometry.

@SmallJoker
Copy link
Member

Parallax occlusion removed, see #10479.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client / Audiovisuals Shaders Unconfirmed bug Bug report that has not been confirmed to exist/be reproducible
Projects
None yet
Development

No branches or pull requests

5 participants