Commit Graph

1759 Commits

Author SHA1 Message Date
Rémi Verschelde 4c5a934408
Merge pull request #68960 from lawnjelly/multirect
Batching - Add MultiRect command
2023-04-17 17:25:20 +02:00
lawnjelly 910ddd13c4 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.
2023-03-10 10:58:04 +00:00
lawnjelly 18d7d36b63 Eliminate collision checks between geometry in rendering BVH.
Later logic using the `pairable_mask` would catch cases preventing pairing callbacks between geometry. However the collision checks were still taking place, wasting performance.

Here we utilize the `tree_mask` feature of BVH to totally eliminate unnecessary collision checks between geometry.
2023-03-09 11:16:30 +00:00
Rémi Verschelde 89788cdcc2
Merge pull request #70514 from stmSi/fix-editor-hanging-audio-pitch-scale-nan
[3.x] Fix hanging if audiostream's pitch_scale is NaN
2023-02-17 12:15:27 +01:00
Rémi Verschelde 1426cd3b3a
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".

Backported from #70885.
2023-01-10 15:26:54 +01:00
stmSi 28e1fc4af9 Fix Editor hanging if audiostream's pitch_scale is NaN 2022-12-24 12:34:22 +06:30
Rémi Verschelde 39edf7ee8a
Merge pull request #70365 from lawnjelly/octree_pairing_fix
Fix pairing crash in physics Octree
2022-12-22 08:56:30 +01:00
lawnjelly 6a2912c856 Fix pairing crash in physics Octree
Remove section of code that should not run and was causing crash.
2022-12-20 19:25:34 +00:00
smix8 17e6d76de6 Fix Navigation agent callback wild pointer crash
Fixes crash in sanitizer builds when callback agent or object are already freed.

(cherry picked from commit 194c1c44e0)
2022-12-18 10:32:04 +08:00
Ricardo Buring 40357471dc Fix typo bug in heightmap shape
(cherry picked from commit 55eceb5150)
2022-12-12 14:00:37 +08:00
dzil123 aa0b91ca52 [3.x] Fix shader compiler asan out of bounds 2022-11-17 19:24:15 -08:00
BimDav de40dfaac0 Correctly compute inverse_mass when inertia is defined by user 2022-11-14 18:39:57 +01:00
avemort 872e36b8f9 expose ARVRInterface::get_transform_for_eye to gdscript 2022-11-10 15:25:07 -03:00
clayjohn 7e840ae883 Properly initialize use_aabb_center in visual server 2022-10-11 09:53:59 -07:00
Haoyu Qiu f33dfe8236 Fix crash executing `MultiMesh.reset_instance_physics_interpolation` 2022-10-02 15:30:55 +08:00
Rémi Verschelde 24ebc32126
Merge pull request #61841 from markusneg/cull-masked-shadows 2022-09-23 09:43:20 +02:00
Hugo Locurcio d3c9817300 Use verbose prints when registering cameras in CameraServer
This prevents lines from being printed every time the editor or project
starts in the editor Output log.

(cherry picked from commit b83e0b6447)
2022-09-05 15:35:45 +02:00
Rémi Verschelde 2ee933bb77
Merge pull request #64920 from lawnjelly/bind_physics_interpolation
Bind Physics Interpolation functions in VisualServer
2022-08-30 22:02:58 +02:00
lawnjelly 96a1b86717 Bind Physics Interpolation functions in VisualServer
To allow maximum flexibility in the initial rollout, VisualServer functions were not bound in order to prevent compatibility issues if the API changed.

These functions are now bound to allow direct use from the VisualServer.
2022-08-30 18:06:12 +01:00
QbieShay acdcbefa4e added options for sorting transparent objects
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2022-08-30 13:39:32 +02:00
fabriceci b3210c5cd6 Hack as a hot fix for Bullet's collision margin issue 2022-08-25 16:32:48 +02:00
Rémi Verschelde a86da2eb8b
Merge pull request #64608 from RandomShaper/safe_audio_threading_3.x 2022-08-25 10:12:44 +02:00
Yuri Sizov 39f46613bb Backport fixes to documentation for paths, curves and navigation servers 2022-08-19 15:52:03 +03:00
Pedro J. Estébanez c92ceca5ce Make audio thread control flags safe 2022-08-19 11:55:23 +02:00
Cory Petkovsek d7ba3b73a9 Clarify invalid RID errors in Server free() functions. 2022-08-12 23:02:09 +08:00
Rémi Verschelde 36fc99158d
Merge pull request #63971 from paddy-exe/spatial-shader-built-ins 2022-08-08 15:50:25 +02:00
Rémi Verschelde ee3bad3f92
Merge pull request #63430 from lawnjelly/audioserver_optimize 2022-08-08 15:44:04 +02:00
Ryan Heath 4f5c268a60 Add area monitor callback error checking 2022-08-07 13:57:06 -07:00
Manuel Moos 9fbdace917 Remove redundant thread sync counter draw_pending
The functions that used it already use a threadsafe FIFO queue
to communicate between threads and a sync to have the main thread
wait for the render thread.

Fixes #35718
2022-08-06 14:09:25 +02:00
Rémi Verschelde d9d3861f76
Merge pull request #55764 from tinmanjuggernaut/validate_rid
[3.x] Validate RIDs before freeing
2022-08-05 22:38:49 +02:00
Rémi Verschelde 144f3ec94e
Merge pull request #51676 from Calinou/shader-add-hint-transparent-texture-3.x
Add `hint_transparent` to use a transparent black placeholder texture (3.x)
2022-08-05 22:34:05 +02:00
Patrick Exner be3d331f26 Backport spatial shader built-ins
Backport of this PR: https://github.com/godotengine/godot/pull/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
2022-08-05 21:19:15 +02:00
Rémi Verschelde ccbe083949
Merge pull request #63071 from lawnjelly/skinning2d_bounds 2022-08-05 19:34:48 +02:00
Hugo Locurcio ab9a95f266
Add `hint_transparent` to use a transparent black placeholder texture 2022-08-02 23:32:07 +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
lawnjelly b0d2f839bc Optimize AudioServer::_driver_process()
Move expensive calculations outside inner hot loops.
2022-07-25 11:06:19 +01: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
lawnjelly 18bb668a2e 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".
2022-07-18 19:47:23 +01: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