Commit graph

1730 commits

Author SHA1 Message Date
Ricardo Buring
7ccffd6bb8 Fix typo bug in heightmap shape
(cherry picked from commit 55eceb5150)
2022-12-12 14:14:38 +08:00
QbieShay
a945538eae added options for sorting transparent objects
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
(cherry picked from commit acdcbefa4e)
2022-12-12 13:33:52 +08:00
BimDav
e639cb40e9 Correctly compute inverse_mass when inertia is defined by user
(cherry picked from commit de40dfaac0)
2022-12-05 09:43:13 +08:00
dzil123
d6812ff7b9 [3.x] Fix shader compiler asan out of bounds
(cherry picked from commit aa0b91ca52)
2022-12-05 09:36:51 +08:00
Haoyu Qiu
1aaaed8131 Fix crash executing MultiMesh.reset_instance_physics_interpolation
(cherry picked from commit f33dfe8236)
2022-12-05 09:19:12 +08:00
fabriceci
6029200662 Hack as a hot fix for Bullet's collision margin issue
(cherry picked from commit b3210c5cd6)
2022-08-30 11:48:24 +02:00
Yuri Sizov
d92b207189 Backport fixes to documentation for paths, curves and navigation servers
(cherry picked from commit 39f46613bb)
2022-08-30 11:20:03 +02:00
Pedro J. Estébanez
519bc3a1e8 Make audio thread control flags safe
(cherry picked from commit c92ceca5ce)
2022-08-30 11:16:44 +02:00
lawnjelly
ec82655ca0 Fix skeleton 2D stale bounding rect
Adds special logic for handling skeleton bounding rect updates. Previously these were never being updated because the canvas item is never set to "rect_dirty".

(cherry picked from commit 18bb668a2e)
2022-08-08 13:35:18 +02:00
Rémi Verschelde
818f1eed31 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 14:53:37 +02:00
Rémi Verschelde
270f5a3bd1
Merge pull request #63384 from lawnjelly/portals_room_hint_invalid
Portals - Fix invalid room hint when reconverting room graph
2022-07-24 20:10:25 +02:00
lawnjelly
d4dc7c4b32 Portals - Allow more logging to be disabled
Some logging messages were still being issued when portals/debug/logging was false. This could be annoying in games that stream in parts of levels and repeatedly call `rooms_convert()`.

This PR allows all but essential logging to be disabled.
2022-07-24 13:44:59 +01:00
lawnjelly
88b7d928c5 Portals - Fix invalid room hint when reconverting room graph
In situations where rooms are converted multiple times, the previous room hint ID can reference a room number that is out of range of the new number of rooms. This fixes the bug by checking the room hint ID is within range.
2022-07-24 11:46:38 +01:00
Hugo Locurcio
ed4976d1d5
Expose VisualServer.viewport_set_use_32_bpc_depth() to the scripting API
Previously, only the Viewport methods/properties were exposed to the
scripting API.
2022-07-23 03:52:38 +02:00
Rémi Verschelde
df70aa1772
Merge pull request #57566 from Calinou/viewport-shadow-atlas-clamp-sizes 2022-07-03 03:08:03 +02:00
Pedro J. Estébanez
f971c886fa Add safe defaults for async shader compilation 2022-06-28 11:50:38 +02:00
smix8
721c99a530 Add NavigationServer map_force_update() function
Adds map_force_update() function to NavigationServer. This function immediately flushes the Navigationserver command queue and recalculates all navigationmeshes and region connections for a specific map.

(cherry picked from commit fdea269805)
2022-06-24 10:19:00 +02:00
smix8
f0069cc1e9 Add NavigationServer.region_owns_point() helper function
Adds a helper function to check if a world space position is currently owned by a navigation region.

(cherry picked from commit e57360d8df)
2022-06-24 10:19:00 +02:00
smix8
38ee593b76 Add Navigation function to get all navigation maps
Added new function that returns all created navigation map RIDs from the NavigationServer. The function returns both 2D and 3D created navigation maps as technically there is no distinction between them.

(cherry picked from commit c0fed1d4e8)
2022-06-23 16:29:11 +02:00
lawnjelly
e4f252d94f Physics Interpolation - fix continuous updating in unmoving objects
Adds instances to the transform update list as well as the interpolate update list when unhiding them. This ensures that the system auto-detects non-moving objects, and removes them from the interpolate update list on the next tick, preventing unnecessary updates.
2022-06-19 11:26:13 +01:00
Marcel Admiraal
b257d552e7 Cleanup AudioEffectRecord thread_active variable 2022-06-17 08:52:20 +01:00
Rémi Verschelde
4e7363cac7
Merge pull request #61996 from smix8/navigation_bp_update_3.x
[3.5] Update NavigationServer backport
2022-06-16 00:17:16 +02:00
Rémi Verschelde
17e472fb9b
Merge pull request #61995 from Calinou/gles3-shader-compilation-default-asynchronous-cache
Enable asynchronous shader compilation + cache by default in GLES3
2022-06-16 00:13:43 +02:00
lawnjelly
991687cc10 Physics Interpolation - fix stale interpolation data when unhiding
A previous optimization prevented instances being added to the interpolation lists when hidden to save processing. This caused a regression when unhiding nodes outside of the physics tick - the interpolated transforms would be stale until the next physics tick, causing a glitch.

This PR readds instances immediately to the interpolation lists when they are unhidden, preventing this glitch.
2022-06-14 10:25:23 +01:00
smix8
8bd7c6188b [3.5] Update NavigationServer backport
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
2022-06-14 05:55:14 +02:00
Pedro J. Estébanez
f46d7583ff Add INFO_SHADER_COMPILES_IN_FRAME to GL ES 3 render info 2022-06-13 18:53:15 +02:00
Hugo Locurcio
70d8e71b0e
Enable asynchronous shader compilation + cache by default in GLES3
This reduces stuttering when a material is displayed for the first
time, and prevents stuttering from occurring entirely after the
project is restarted when a similar situation is encountered.
2022-06-13 16:32:19 +02:00
lawnjelly
f8df04ed50 More low priority redraw request cases
Some more cases of textures etc causing continuous updates in vital updates only mode are fixed.
2022-06-12 06:44:59 +01:00
Hugo Locurcio
46b7133967 Add a 3D suffix to relevant physics profiler categories
2D physics categories already had a 2D suffix: "Physics 2D"

(cherry picked from commit 36428305a6)
2022-06-01 00:29:46 +02:00
lawnjelly
e7a73579e3 Portals - force full check on adding moving object
Moving objects being added during instance_moving_create() were incorrectly not forcing a full check to find which room they were within. This could result in moving objects being re-added not correctly identifying their current room, and thus culling incorrectly. This PR forces a full check on calling instance_moving_create.
2022-05-29 15:53:25 +01:00
Haoyu Qiu
067e738cb8 Fix various typos 2022-05-19 19:07:45 +08:00
Haoyu Qiu
b657d0c76c Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NOEDITOR
2022-05-19 11:31:35 +08:00
smix8
3977eb9107 Add NavigationServer2D/3D API functions to find missing RID info
Utility functions for NavigationServer2D/3D to find missing RID information when working with Server API directly. e.g. from map to regions and agents, from agent or region to map, from region to map and agents and so on ....

Requirement to work with NavigationServer API exklusive without SceneTree nodes and when juggling agents and regions between multiple navigation maps.

(cherry picked from commit 371054e3e5)
2022-05-16 21:10:36 +02:00
Rémi Verschelde
5e693b6d84 Fix warnings found by Emscripten 3.1.10
Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.

(cherry picked from commit d8935b27a9)
2022-05-16 16:38:26 +02:00
lawnjelly
ec9a17cfad Physics Interpolation - optimize hidden nodes
In order to prevent glitches when unhiding nodes, set_transform() is still called to the VisualServer even for hidden nodes when the node is interpolated. This activates a lot of logic which is not necessary just to keep the previous transform updated.

This PR adds an early out which misses out on the unnecessary logic when instances are invisible.
2022-05-10 08:59:34 +01:00
lawnjelly
f1bef3c592 Physics Interpolation - improve warnings with NodePath
It has been pointed out to me that it is far more useful to display the NodePath in the warning than the name of the node, as there may be lots of nodes sharing the same name in a project. This PR fixes this.
2022-05-04 18:46:14 +01:00
Rémi Verschelde
f06e68f2a2
Merge pull request #54682 from smix8/textureproxy 2022-04-28 19:47:20 +02:00
smix8
ca1216fcef Expose VisualServer.texture_set_proxy() to GDScript
Expose VisualServer.texture_set_proxy() to GDScript
2022-04-28 18:53:29 +02:00
Rémi Verschelde
4cfc96fea7
Merge pull request #60531 from lawnjelly/fti_usage_warnings 2022-04-28 12:00:49 +02:00
lawnjelly
ad9b2b3794 Physics Interpolation - add helper warnings
When physics interpolation is active on a node, it is essential that transforms are updated during "_physics_process()" rather than "_process()" calls, for the interpolation to give the correct result.

This PR adds optional warnings for instances, cameras and multimeshes which can flag updates being incorrectly called, and thus make these problems much easier to fix.
2022-04-26 13:56:02 +01:00
Rémi Verschelde
d063bc4277
Merge pull request #60381 from clayjohn/3.x-sorting
[3.x] Sort based on camera position when using perspective camera
2022-04-26 12:26:31 +02:00
Rémi Verschelde
24307bd074 MultiMesh: Fix potential crash found by fuzzing
Fixes #58293.
2022-04-25 16:55:54 +02:00
clayjohn
76ff41cad1 Sort based on camera position when using perspective camera 2022-04-19 14:54:51 -07:00
tdetoy
8e57aae57d mesh_surface_get_format_offset and mesh_surface_get_format_stride will now provide an error with an invalid array index 2022-04-19 00:36:59 -04:00
Rémi Verschelde
e1eb3c2fb1
Merge pull request #60147 from lawnjelly/interpolation_out_of_scenario 2022-04-13 17:08:08 +02:00
lawnjelly
d2b1d29634 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.
2022-04-11 15:04:24 +01:00
Haoyu Qiu
f24312380f Rename NavigationServer's free method to free_rid 2022-04-08 17:31:04 +08:00
Rémi Verschelde
21c3048397 Add missing argument names in bindings 2022-04-04 12:56:59 +02:00
Yuri Rubinsky
385515431b
Merge pull request #59775 from Chaosus/shader_fix_3.x 2022-04-01 21:37:47 +03:00
Bartłomiej T. Listwon
df39e0f472 Fix crash in AudioServer when switching audio devices with different audio channels count (connecting PS5 controller, bluetooth 5.1 headphones etc.) 2022-04-01 10:45:42 +02:00