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

Occlusion culling no longer works following the Embree 4 upgrade when using builtin_embree=no #90586

Closed
Calinou opened this issue Apr 12, 2024 · 5 comments · Fixed by #91684
Closed

Comments

@Calinou
Copy link
Member

Calinou commented Apr 12, 2024

Tested versions

  • Reproducible in: 4.3.dev 029aade
  • Not reproducible in: 4.2.1.stable, 4.3.dev5

System information

Godot v4.3.dev (029aade) - Fedora Linux 39 (KDE Plasma) - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4090 (nvidia; 550.67) - 13th Gen Intel(R) Core(TM) i9-13900K (32 Threads)

Issue description

Occlusion culling no longer works following the Embree 4 upgrade. It doesn't seem to work in the Occlusion culling and mesh LOD demo either, even though it worked when I was testing the PR.

4.3.dev 5 (working)

image

4.3.dev 029aade (broken)

image

I bisected the regression to c43eab5 (#88783). cc @Chubercik

Steps to reproduce

  • Open the MRP linked below.
  • Switch to the Overdraw debug draw mode in the Perspective menu of the 3D viewport in the editor.
  • Move around in the scene with freelook. Cubes behind the discs should disappear when they are occluded.

Minimal reproduction project (MRP)

test_occluder_runtime_bake.zip

@AeioMuch
Copy link
Contributor

AeioMuch commented Apr 12, 2024

Can't reproduce on my side. It look like the first screenshot for me
Godot v4.3.dev (029aade) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.5212) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)

@Chubercik
Copy link
Contributor

Can't reproduce on my side either, occlusion seems to be working as intended.

  • Godot 4.3.dev6 (64520fe)
  • Windows 10.0.19045
  • Vulkan 1.3.277 (Forward+)
  • dedicated NVIDIA GeForce GTX 1080 Ti (NVIDIA; 552.22)
  • 7th Gen Intel(R) Core(TM) i7-7700K @ 4.20GHz (4 cores, 8 threads)

screenshot_1

screenshot_2

screenshot_3

@Calinou
Copy link
Member Author

Calinou commented May 7, 2024

It turns out what broke was builtin_embree=no, not Embree itself (builtin_embree=yes is the default). This option is designed to use dynamically linked Embree from system repositories (I use this to speed up linking times a bit). I have embree-devel-4.2.0 installed from the Fedora 39 repositories.

builtin_embree=yes makes the occlusion culling work again. Therefore, it appears the issue is that system Embree can no longer be used, even though the builtin_embree SCons option is still listed in scons --help.

@Calinou Calinou changed the title Occlusion culling no longer works following the Embree 4 upgrade Occlusion culling no longer works following the Embree 4 upgrade when using builtin_embree=no May 7, 2024
@Chubercik
Copy link
Contributor

Might've found the culprit:

if not env["builtin_embree"] and env["arch"] in ["x86_64", "arm64"]:
# No pkgconfig file so far, hardcode expected lib name.
env.Append(LIBS=["embree3"])

I don't have a setup to test it currently, but changing embree3 to embree4 (or maybe embree? judging by the Fedora packages website: embree3 vs embree4) should fix the issue.

@akien-mga
Copy link
Member

akien-mga commented May 7, 2024

Yes it should be embree4. But I'm surprised you get a surprisingly non working build, as opposed to a linking issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Bad
Development

Successfully merging a pull request may close this issue.

4 participants