-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Port raycast module to Embree 4 #78332
Comments
Sure, feel free to open a pull request for this 🙂 However, in the long run, we aim to replace Embree with a simpler BVH/software raytracing implementation such as https://github.com/madmann91/bvh or https://github.com/lighttransport/nanort. This will allow decreasing binary size and compile times significantly, as Embree is a large, complex library. OpenImageDenoise was removed from core for similar reasons (it was moved into a separate CLI program and eventually a dynamic library). Replacing Embree entirely is more difficult than updating to Embree 4 though. |
How long will it be until Embree is replaced? |
There's no ETA for replacing Embree, so I don't know. |
So currently it looks like we need to manually update |
Probably not - those lists are written manually because we want to have precise control over which files we build, and not build any file that we don't need. It's the same for all thirdparty libraries, we trim them down to only include and compile what we will actually use. Unless of course your script can automate figuring out which is the minimal subset of files in upstream embree that Godot needs, but in my experience that's best done with human reasoning and changes from release to release, hence the manual listing. |
This project is to hard for me right now. so I am going to give up. |
What about performance? (source: https://github.com/madmann91/bvh?tab=readme-ov-file#performance) From what I understand, Embree is the fastest solution out of the (popular) available ones (at least it was in version 3, no idea how 4 compares, but I wouldn't expect much of a regression in this area). |
@Chubercik It's true that Embree is generally faster across the board, but smaller binary size and maintainability is something that tends to be valued a lot in Godot. |
Godot version
4.1.beta (5983785)
System information
All
Issue description
The
raycast
module uses the thirdparty Embree library, currently version 3.13.5.Upstream released Embree 4 as a new major, compatibility breaking release, and we need to adapt our usage of the library API if we want to use it.
The current latest version is 4.1.0. Release notes:
#73631 was an attempt at adding support for both majors at the buildsystem level, but due to the API changes the embree4 variant wouldn't compile at all so I abandoned it.
Doing this upgrade is not urgent, and once evaluating it we might find reasons not to (e.g. I see 4.1.0 just re-added support for Linux ARM64 which 3.13.5 already had, so there might be other such downgrades for our use case). Anyone is welcome to have a look.
The text was updated successfully, but these errors were encountered: