Commit Graph

132 Commits

Author SHA1 Message Date
25ac0d8f49 Fix the initial value of _debug_enabled in NavigationServer. 2023-08-30 15:04:11 +02:00
a29d232a4c Ported: Physics Interpolation - add support for CPUParticles2D
Similar to the existing 3D CPUParticles physics interpolation.
- lawnjelly
a117a3307a
2023-08-27 21:59:54 +02:00
26bb16d86e Ported: Fix 2D MultiMesh hierarchical culling
Fixes updating local bounds for MultiMeshes used in canvas items by introducing a back link.
- lawnjelly
ad577e3c7e
2023-08-27 21:28:30 +02:00
17fa82ac02 Ported: Add debug_canvas_item_get_local_bound() function to VisualServer
Useful for debugging hierarchical culling.
- lawnjelly
61e41cc9a1
2023-08-27 19:00:01 +02:00
d977ed360e Ported: 2D Fixed Timestep Interpolation
Adds support to canvas items and Camera2D.
- lawnjelly
5162efbfe9
2023-08-27 18:48:25 +02:00
87b91721da Ported: Physics interpolation - Move out of Scenario
Move VisualServer interpolation data out of Scenario and into VisualServerScene, so the interpolation data and enabled status is now common to all Scenarios.

Fix physics interpolation in multithreaded mode by ensuring tick and pre-draw are called.
- lawnjelly
d2b1d29634
2023-08-27 17:25:38 +02:00
b223601445 Fix non-tools builds. 2023-08-27 13:06:06 +02:00
5ae44c4746 Ported: SCons: Disable C++ exception handling
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.

This is wasteful on multiple aspects:

- Binary size: Around 20% binary size reduction with exceptions disabled
  for both MSVC and GCC binaries.
- Compile time:
  * More than 50% build time reduction with MSVC.
  * 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.

Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.
- akien-mga
55550da68b
2023-08-27 13:04:04 +02:00
34e2ebe8cc Fix build. 2023-08-27 12:54:44 +02:00
lawnjelly
ca171817a8 MultiRect - Fix flushing in TextEdit
The FontDrawer used in TextEdit was previously not being flushed before drawing auto-completion boxes. This was causing rendering artifacts.
This PR also increases the backward compatibility of the MultiRect OFF mode, by forcing a flush after each character.
2023-08-27 11:45:09 +02:00
834cbe8cef Ported: Single Compilation Unit build.
Adds support for simple SCU build.
This speeds up compilation by compiling multiple cpp files within a single translation unit.
- lawnjelly
43e181a00a
2023-07-11 16:07:36 +02:00
5b869f8b54 Ported from godot: Canvas item hierarchical culling
Adds optional hierarchical culling to the 2D rendering (within VisualServer).
Each canvas item maintains a bound in local space of the item itself and all child / grandchild items. This allows branches to be culled at once when they don't intersect a viewport.
- lawnjelly
b777a9e5f9
2023-06-28 20:25:48 +02:00
de1763d40d Renamed neighbor_dist properties / getters / setters for the navigation server. 2023-06-12 08:37:57 +02:00
6b95f31b70 Also fix method qualifiers. 2023-06-11 18:35:22 +02:00
975e5c4a9e Rethink the previous fix. 2023-06-11 18:32:15 +02:00
50c96d5414 Fix building with ptrcall on. 2023-06-11 18:02:58 +02:00
552226ab5d Backported: Backport spatial shader built-ins
Backport of this PR: godotengine#63597
This adds these as new Built-Ins to Spatial Shaders
* Object's Position in World Space
* Camera Position in World Space
* Camera Direction in World Space
* Object's Position in View Space
- paddy-exe
be3d331f26
2023-06-11 09:37:10 +02:00
f058c87868 Backported from godot4: Rework Navigation Avoidance
Rework Navigation Avoidance.
- smix8
a6ac305f96
2023-06-10 20:58:49 +02:00
8b18898609 Backported from godot4: Rework const on NavigationServer methods
`const` is used on all methods, even when they cause modification of the server.  This reworks the methods of the server to only use `const` on method that don't change the state of the server.
- DarkKilauea
a0715b30f9
2023-06-09 22:03:42 +02:00
6384b9624f Ported from godot4: Make navigation mesh edge connections optional
Makes navigation mesh edge connections optional.
- smix8
f986b52b3c
2023-06-09 20:54:05 +02:00
29784d5d5b Ported from godot4: Enable assigning an owner to navigation regions and links
This allows users of the server APIs to get back the nodes that created certain regions and links.
- DarkKilauea
5769b0e8d8
2023-06-09 19:46:44 +02:00
160cb38a50 Ported from godot4: Add support for emitting a signal when entering a NavLink
- DarkKilauea
5d8ba2b2d1
2023-06-09 19:08:38 +02:00
19fac49904 Turn PoolVectors in NavigationPathQueryResults into Vectors. 2023-06-09 16:27:24 +02:00
ae018648fe Added missing binds. 2023-06-09 14:19:41 +02:00
268645ff0b Ported from godot4: Add NavigationAgent Path Debug Visualization
Adds path debug visuals for NavigationAgent2D, NavigationAgent3D and NavigationServer.
- smix8
0ab764e84b
2023-06-09 14:17:54 +02:00
11c84049fa Ported from godot4: Fix NavigationMesh debug visuals for non-triangulated meshes
Fixes NavigationMesh debug visuals for non-triangulated meshes.
- smix8
4490a3303b
2023-06-09 13:03:30 +02:00
23daaf95a6 Ported from godot4: Fix 2D navigation debug visuals ignoring half the ProjectSettings
Fixes that NavigationRegion2D and TileMap debug visuals ignored more or less half the ProjectSetting. E.g. random color could not be disabled, edges did not display.
2b19c70664
2023-06-09 11:29:33 +02:00
c11500d480 Ported from godot4: Rename Navigation uses of 'location' to 'position'
Contrary to the entire rest of the engine NavigationAgent's and NavigationLinks decided to deal with locations instead of positions.
- smix8
bf1571979c
2023-06-09 10:28:31 +02:00
b940854ca9 Ported from godot4: Add NavigationServer Performance Monitor
Adds Performance Monitor for NavigationServer3D.
- smix8
9802914f97
2023-06-09 10:17:43 +02:00
2b4d3e69de Fix non tools build. 2023-06-09 09:12:30 +02:00
a5a07d8ff6 Backported from godot4: Add NavigationServer2D debug functions
Adds debug functions to NavigationServer2D to mirror NavigationServer3D functions for 2D users.
- smix8
d254f0fa5f
2023-06-09 09:03:33 +02:00
9c95fade84 Backported from godot4: Fix navigation debug not toggleable in scripts
Fixes that navigation debug was not toggleable in script while even the docs mentioned it.
- smix8
aecad7bb25
2023-06-09 09:01:01 +02:00
d434a1c4e5 Backported from godot4: Fix Editor Navigation debug edge connection visuals
Fixes missing Navigation debug edge connection visuals in Editor due to disabled NavigationServer.
- smix8
8bfea7dcb4
2023-06-09 08:55:21 +02:00
0438c3cc3f Backported from godot4: Added node for Navigation links .
- DarkKilauea
3dd59013f4
2023-06-08 20:46:09 +02:00
f6e65112d7 Backported from godot4: Add NavigationPathQuery
Adds NavigationPathQueryParameters objects that can be used with NavigationServer.query_path() to query a customized navigation path.
- smix8
63dcb9aa80
2023-06-08 18:23:48 +02:00
7ce5f939a9 Ported the docs from the navigation mesh generator rework pr. 2023-06-06 16:52:04 +02:00
890d6f1b28 Removed region_bake_navmesh from the NavigationServer. 2023-06-06 09:36:19 +02:00
654cfb81b7 Renamed NavigationRegion2D back to NavigationPolygonInstance, as I think it fits the engine better. 2023-06-05 18:09:53 +02:00
68b9f4c90e Ported from godot4: Add more detailed Navigation Debug Visualization
- Adds more customization options to ProjectSettings.
- Displays navregion edge connections and navigation polygon edges in editor and at runtime.
- Majority of debug code moved from SceneTree to NavigationServer.
- Removes the irritating debug MeshInstance child node from NavigationRegion3D and replaces it with direct RenderingServer API.
- smix8
c394ea518e
2023-06-05 18:05:15 +02:00
5578afc3d6 Fix scons warning. 2023-06-05 14:56:10 +02:00
57153f4a33 Make overrides consistent again. 2023-06-04 13:11:04 +02:00
6136f0b802 Fix the type of the CreateNavigationMeshGeneratorCallback. 2023-06-04 09:41:39 +02:00
0a3d1d6cf5 Added in NavigationMeshGeneratorDummy and set up initialization. 2023-06-03 20:00:42 +02:00
9a35d6c7d3 Cleaned up NavigationMeshGenerator and added it to the build. 2023-06-03 18:45:20 +02:00
8cbb1bb879 Started porting pull request from godot 4: Rework NavigationMeshGenerator
Reworks NavigationMeshGenerator and navigation mesh parse and bake process. Adds navigation mesh baking for 2D.
- smix8
https://github.com/godotengine/godot/pull/70724
38699a8259
2023-06-03 18:22:12 +02:00
2114b2239b Split NavigationPolygon and NavigationPolygonInstance into 2 files. Also renamedNavigationPolygonInstance to NavigationRegion2D. 2023-06-03 16:54:48 +02:00
f4a4956b7a Ported: Fix Polygon2D skinned bounds (for culling)
The bound Rect2 was previously incorrect because bone transforms need to be applied to verts in bone space, rather than local space. This was previously resulting in skinned Polygon2Ds being incorrectly culled.
- lawnjelly
dd6c213dac
2023-05-01 13:34:35 +02:00
belzecue
ad1464d9e5 Backport from Godot 4 - Fix RigidDynamicBody gaining momentum with bounce #55313 2023-05-01 12:24:31 +02:00
1263101396 Ported: Batching - Add MultiRect command
Large groups of similar rects can be processed more efficiently using the MultiRect command. Processing common to the group can be done as a one off, instead of per rect.

Adds the new API to VisualServerCanvas, and uses the new functionality from Font, BitmapFont, DynamicFont and TileMap, via the VisualServerCanvasHelper class.

- lawnjelly

910ddd13c4
2023-04-20 23:09:37 +02:00
45ffb33025 Add init() virtual methods to the navigation servers. 2023-04-16 18:23:56 +02:00