1
0
Fork 0
Commit Graph

83 Commits

Author SHA1 Message Date
Thaddeus Crews b17aa3343a
Revert "SCons: Add `CPPEXTPATH` for external includes" 2025-10-06 13:09:22 -05:00
Rudolph Bester a54df7fdb7 Move occlusion culling back to being based on euclidian distance but with some distance calculation using double precision 2025-07-08 13:38:36 +02:00
Hugo Locurcio be1f9a878b
Use SSE 4.2 as a baseline when compiling Godot
This lets the compiler do more optimizations, leading to increased
performance for demanding CPU tasks.
2025-05-30 23:49:47 +02:00
Thaddeus Crews 2242bf9b3d
Merge pull request #105697 from akien-mga/scons-x86_32-mfpmath-sse
SCons: Explicitly enable `-mfpmath=sse -mstackrealign` for x86_32
2025-04-28 10:01:31 -05:00
Rémi Verschelde 57640dd806
embree: Update to 4.4.0 2025-04-24 17:51:03 +02:00
Rémi Verschelde 08fa148310
SCons: Explicitly enable `-mfpmath=sse -mstackrealign` for x86_32
Passing `-msse2` doesn't seem to be sufficient to opt into SSE floating point math
instead of the less stable x87.

`-mstackrealign` also seems necessary when using SSE on x86_32.
2025-04-24 12:36:29 +02:00
Thaddeus Crews 1be843f77a
Merge pull request #103798 from Rudolph-B/new-97712
Switch occlusion culling to be based on depth instead of Euclidean distance
2025-04-10 10:18:17 -05:00
Thaddeus Crews f25fc34439
SCons: Add `CPPEXTPATH` for external includes 2025-04-02 07:29:08 -05:00
Jamie Pate 8e3e2a8f44 Calculate the viewport location correctly in OpenXR
Fixes #104193

In OpenXR the viewport location is not centered on the transform origin
2025-03-19 10:04:37 -07:00
Rudolph Bester 18eb1c1072 Fix occlusion culling by using depth instead of Euclidean distance when selecting the closest point
Co-authored-by: Florent Guiocheau <florent.guiocheau@gmail.com>
2025-03-08 08:48:34 +02:00
Thaddeus Crews 324512e11c
Style: Replace header guards with `#pragma once` 2025-03-07 17:33:47 -06:00
Yufeng Ying 33817b186f Remove unused header in drivers and modules.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
2024-12-24 00:40:47 +08:00
Rémi Verschelde f86b3696f6
SCons: Properly set SSE2 as baseline on x86_32
Setting it only for release templates on Windows and macOS was inconsistent,
and Jolt requires it as a minimum.

Drop the `-mxsave` flag from the raycast module, this doesn't seem to be
used explicitly by Embree, and unnecessarily makes our config and baseline
muddy.
2024-12-12 22:44:44 +01:00
Thaddeus Crews 533091ae22
Merge pull request #99974 from Flarkk/improve_occlusion_jitter
Optimize Occlusion culling jitter
2024-12-09 14:33:08 -06:00
Rudolph Bester 329d25b1fa Fixed occlusion culling buffer getting overwritten in larger scenes 2024-12-05 18:54:13 +02:00
Florent Guiocheau c7895ca226 Optimize Occlusion jitter 2024-12-04 17:39:51 +01:00
Florent Guiocheau 6960b33cbb Fix occlusion culling jitter 2024-12-02 20:46:13 +01:00
Rudolph Bester 4089a6cb8c Fixed occlusion culling for double builds by enforcing float conversion for Embree. 2024-11-23 13:49:12 +02:00
Rudolph Bester 0f0e24016c Fix Occlusion Culling Buffer getting corrupted. 2024-11-02 12:52:19 +02:00
Rudolph Bester 76c20383d1 Fix Occlusion Culling not working for an orthogonal camera. 2024-10-26 20:07:34 +02:00
Rudolph Bester ed3f990952 Alternative fix to occlusion culling where all math is based on Euclidean distance. 2024-10-17 05:59:37 +02:00
Thaddeus Crews 9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Thaddeus Crews fdc6ffd264
Style: Update `ruff` & `mypy` to latest versions 2024-09-20 09:36:09 -05:00
bruvzg 04d70c11fc [Windows/ARM64] Fix raycast/embree ARM64 build with LLVM/MinGW. 2024-06-20 15:52:04 +03:00
bruvzg 986d297ed3
Fix arm64/Windows build. 2024-04-30 16:26:42 +03:00
Rémi Verschelde acfcdbd291
Merge pull request #88783 from Chubercik/embree-4.3.1
embree: Update to 4.3.1
2024-04-04 14:31:02 +02:00
lawnjelly 691854d589 Jitter raster occlusion camera to reduce false positives.
Due to the low resolution of the occlusion buffer, small gaps between occluders can be closed and incorrectly occlude instances which should show through the gaps. To ameliorate this problem, this PR jitters the occlusion buffer over time, making it more likely an instance will be seen through a gap. This is used in conjunction with an occlusion timer per instance, to prevent instances flickering on and off rapidly.
2024-04-03 12:18:45 +01:00
Jakub Mateusz Marcowski c43eab55a4
embree: Update to 4.3.1 2024-03-27 22:10:35 +01:00
A Thousand Ships 4933fa8bf5
[Buildsystem] Fix encoding when reading files 2024-03-24 18:02:56 +01:00
Thaddeus Crews d9fa40f2df
Enforce `\n` eol for Python writes
• Ensure utf-8 encoding if previously unspecified
2024-03-09 14:29:24 -06:00
bitsawer 7654e7852e Fix RaycastOcclusionCull World3D scenario memory leak 2023-09-26 21:53:17 +03:00
A Thousand Ships 517e9f8aef [Modules] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable 2023-09-26 16:44:52 +02:00
Pedro J. Estébanez f34d580861 Revert "Implement parallel foreach() for easier multithreading"
This reverts commit e28868e30c.
2023-07-27 13:41:27 +02:00
Yuri Sizov 2a595c26d9 Merge pull request #72784 from myaaaaaaaaa/parallel-foreach
Implement parallel `foreach()` for easier multithreading
2023-07-14 18:48:49 +02:00
Rémi Verschelde 25b2f1780a
Style: Harmonize header includes in modules
This applies our existing style guide, and adds a new rule to that style
guide for modular components such as platform ports and modules:

Includes from the platform port or module ("local" includes) should be listed
first in their own block using relative paths, before Godot's "core" includes
which use "absolute" (project folder relative) paths, and finally thirdparty
includes.

Includes in `#ifdef`s come after their relevant section, i.e. the overall
structure is:

- Local includes
  * Conditional local includes
- Core includes
  * Conditional core includes
- Thirdparty includes
  * Conditional thirdparty includes
2023-06-15 14:35:45 +02:00
myaaaaaaaaa e28868e30c Implement parallel foreach() for easier multithreading 2023-06-09 08:27:32 -04:00
Samuele Panzeri 4aaa2e6477 Fix wait for thread not started 2023-04-27 20:28:22 +02:00
kobewi 615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
Rémi Verschelde 2118f8e8a3
Merge pull request #70684 from filiperinaldi/fix_arm64_build_clang
Fix arm64 build when using Clang
2023-01-16 09:15:44 +01:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Filipe Rinaldi 2841144096 Fix arm64 build when using Clang
The commit b5a8055b5c should target GCC builds only as
-flax-vector-conversions has different behaviour in Clang and is
currently making the build fail.

Signed-off-by: Filipe Rinaldi <filipe.rinaldi@gmail.com>
2022-12-26 20:39:27 +00:00
Rémi Verschelde b5a8055b5c
embree: Fix Linux ARM64 build with `-flax-vector-conversions`
This is a change done upstream in the `devel3` branch for 3.13.6:
82ca6b5ccb

They also seem to define it for macOS, but for us it breaks the build...
¯\_(ツ)_/¯

Also change wrong use of CPPFLAGS (pre-processor) where CXXFLAGS (C++)
makes more sense.
2022-12-20 10:10:30 +01:00
Aaron Franke cee8f1a786
Improve architecture support logic in Raycast module 2022-12-12 21:42:10 -06:00
Rémi Verschelde b2373298a2
embree: Enable raycast module build for Web and Windows x86_32
Embree initially only supported x86_64, then got arm64 support added.
Now it seems to be possible to build it with Emscripten (wasm32) and
on x86_32 Windows.
2022-11-25 14:48:29 +01:00
DeeJayLSP 5e4158eb48
Update embree to 3.13.5 2022-11-25 13:09:04 +01:00
Rémi Verschelde d8268aae30 Fix MSVC warnings C4324, C4389, C4456, and C4459
Part of #66537.
2022-09-28 16:43:09 +02:00
Rémi Verschelde 49fcf4ffad Style: Cleanup header guards for consistency
Fix file names for {Static,Lightmap}RaycasterEmbree.
2022-09-26 13:51:17 +02:00
Rémi Verschelde 26e9145c26 SCons: Cleanup `DEBUG`, `_DEBUG` and `NDEBUG` defines
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
  Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
  outside thirdparty code, which we usually don't intend to debug, so it
  seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
  and `release_debug` targets. This used to be set for `release` for all
  platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
  code, which was only implemented for Unix anyway, should have been
  `DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
  target as we don't want OIDN and Embree asserting all over the place.
2022-09-23 15:21:26 +02:00
bruvzg 8dab4a2aa3
[Windows] Improve build environment detection, add support for Windows on ARM. 2022-08-27 16:10:53 +03:00
Aaron Franke 27b0f18275 Unify bits, arch, and android_arch into env["arch"]
Fully removes the `bits` option and adapts the code that relied on it.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-08-25 11:19:20 +02:00