Commit graph

923 commits

Author SHA1 Message Date
lawnjelly
49d3161ce0 Physics Interpolation - Fix behaviour on pause 2024-06-20 10:50:30 +01:00
lawnjelly
d80b206643 Physics Interpolation - refactor client interpolation pump
* Move client interpolation pump to earlier in the iteration before 3D physics synced
* Allow `get_global_transform_interpolated()` to prime the client interpolation inside a physics tick
2024-06-19 08:44:33 +01:00
lawnjelly
0b30d77384 Physics Interpolation - refactor Camera and fix get_camera_transform()
* Moves 3D Camera interpolation scene side.
* Automatically switches `get_camera_transform()` to report interpolated transform during `_process()`.
* Fixes `ClippedCamera` to work with physics interpolation.
2024-06-09 12:08:27 +01:00
lawnjelly
0f5cadfb56 Fix Viewport interpolation mode
Viewport interpolation mode is a special case, which should be set to ON instead of INHERIT.
2024-05-20 10:28:58 +01:00
kleonc
b045a7c92e
Always look for unique node names in owner if not found in owned nodes
(cherry picked from commit 95ced4bbdc)
2024-05-01 12:04:27 +02:00
lawnjelly
a73715cf55
Merge pull request #58577 from pfertyk/issue_58543_audio_not_paused
[3.x] Fix AudioStreamPlayer not paused on pause mode change
2024-04-20 09:18:46 +01:00
lawnjelly
d56d1ff4d2 Deprecate NOTIFICATION_MOVED_IN_PARENT
* NOTIFICATION_MOVED_IN_PARENT makes node children management very inefficient.
* Replaced by a NOTIFICATION_CHILD_ORDER_CHANGED (and children_changed signal).
* Most of the previous tasks carried out by NOTIFICATION_MOVED_IN_PARENT are now done not more than a single time per frame.

This PR breaks compatibility (although this notification was very rarely used, even within the engine), but provides an alternate way to do the same.
2024-04-20 07:52:05 +01:00
Haoyu Qiu
33043c63d5 Fix SceneTree not respecting virtual process methods
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2024-04-16 18:49:02 +08:00
Haoyu Qiu
fe65682937 Add Node.is_node_ready 2024-04-08 17:44:23 +08:00
Paweł Fertyk
90cf873979 Fix AudioStreamPlayer not paused on pause mode change
Fixes #58543.
2024-04-05 14:20:44 +02:00
Ansraer
b9cbffd957 add ORMSpatialMaterial 2024-02-08 20:34:11 +01:00
lawnjelly
8b79135538 Add MergeGroup node to simplify merging Meshes at runtime 2024-01-31 08:28:51 +00:00
Rémi Verschelde
721eba5d5d
Merge pull request #87539 from SysError99/3.x-get_first_node_in_group
[3.x] Add `SceneTree::get_first_node_in_group` following 4.x
2024-01-29 23:29:04 +01:00
Rémi Verschelde
6f3c5e63f3
Merge pull request #82584 from lawnjelly/lightcull_23
[3.x] Shadow volume culling and tighter shadow caster culling
2024-01-29 23:27:56 +01:00
Rémi Verschelde
4e741ec2ba
Merge pull request #64493 from Mickeon/3.x-editor-group
[3.x] Add Node editor description group
2024-01-29 23:27:07 +01:00
SysError99
99284482bc [3.x] Add SceneTree::get_first_node_in_group following 4.x 2024-01-26 21:26:40 +07:00
lawnjelly
8ca631a466 Shadow volume culling and tighter shadow caster culling
Existing shadow caster culling using the BVH takes no account of the camera. This PR adds the highly encapsulated class VisualServerLightCuller which can cut down the casters in the shadow volume to only those which can cast shadows on the camera frustum.

This is used to:
* More accurately defer dirty updates to shadows when the shadow volume does not intersect the camera frustum.
* Tighter cull shadow casters to the view frustum.

Lights dirty state is now automatically managed:
* Continuous (tighter caster culling)
* Static (all casters are rendered)
2023-11-14 14:17:57 +00:00
lawnjelly
3e19cf834a CPUParticles2D - Add ability to follow physics interpolated target
Allows a non-interpolated particle system to closely follow an interpolated target without tracking ahead of the target, by performing fixed timestep interpolation on the particle system global transform, and using this for emission.
2023-09-18 16:05:03 +01:00
lawnjelly
5162efbfe9 2D Fixed Timestep Interpolation
Adds support to canvas items and Camera2D.
2023-08-01 16:07:48 +01:00
Rémi Verschelde
29eeb461f2
Merge pull request #68738 from lawnjelly/faster_canvas_item
[3.x] Canvas item hierarchical culling
2023-06-27 08:40:22 +02:00
Rémi Verschelde
83e91ab818
Merge pull request #76323 from aaronfranke/3.x-t2d-basis-det
[3.x] Expose `determinant` in Transform2D, rename internal method
2023-04-26 12:17:00 +02:00
lawnjelly
b777a9e5f9 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.
2023-04-25 20:17:33 +01:00
Aaron Franke
141783d90f
[3.x] Expose determinant in Transform2D, rename internal method 2023-04-22 13:47:47 -05:00
lawnjelly
1730fab22a Consistent render ordering for CanvasLayers
Maintains scene tree ordering for CanvasLayers that share identical layer ID.
2023-03-12 05:00:13 +00: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
Rémi Verschelde
1ee7c5a62c
Merge pull request #62444 from lawnjelly/faster_queue_free3
[3.x] Faster queue free
2023-01-10 10:55:36 +01:00
necrashter
147de75e52
Set touch input as handled only after _gui_call_input 2022-12-26 11:58:32 +03:00
Rémi Verschelde
3b7bb812fd
Merge pull request #70310 from Sauermann/3x-fix-follow-viewport-transform
[3.x] Include the follow-viewport-transform into CanvasLayer transform calculations
2022-12-22 08:55:28 +01:00
Rémi Verschelde
76bcc90da8
Merge pull request #70228 from Calinou/add-transparent-viewport-project-setting-3.x
Add a project setting to make the root viewport transparent (3.x)
2022-12-22 08:55:21 +01:00
Markus Sauermann
608cbd8296 Include the follow-viewport-transform into CanvasLayer transform calculations
The follow-viewport-transform was missing from several calculations

3.x version of #59682
2022-12-19 19:18:54 +01:00
Haoyu Qiu
b2e5c8fe10 Fix possible Tween leak on exit
(cherry picked from commit e173710963)
2022-12-18 10:32:04 +08:00
FireForge
0d602ce881 Add Vector2/3 linking to more properties
- Camera2D.zoom
- CanvasLayer.scale
- ParallaxBackground.scroll_base_scale
- ParallaxLayer.motion_scale
- Polygon2D.texture_scale
- SpatialMaterial.uv1_scale
- SpatialMaterial.uv2_scale

(cherry picked from commit 92817aa72f)
2022-12-18 10:32:04 +08:00
Hugo Locurcio
65465f309c
Add a project setting to make the root viewport transparent
This allows creating a project with a transparent window without having
to write any script.
2022-12-18 00:38:05 +01:00
Rémi Verschelde
6963ba631e
Fix typos with codespell 2022-12-15 12:26:59 +01:00
Haoyu Qiu
a6a89356b7 Fix CanvasLayer visibility toggle can only run once per frame 2022-12-04 14:49:19 +08:00
Rémi Verschelde
af635f05bf
Merge pull request #68630 from m4gr3d/fix_input_event_screen_drag_routing_3x
[3.x] Fix routing of `InputEventScreenDrag` events to `Control` nodes
2022-12-01 18:13:52 +01:00
Markus Sauermann
0ae562c9dc Update root order on layer change
When the layer of a CanvasLayer changes, the order of roots needs to be recalculated.

(cherry picked from commit 8d60e8b5d4)
2022-12-01 10:23:04 +08:00
Lyuma
099e90e00d Make Node editable_instance methods available to GDScript
(cherry picked from commit 7eb6ae2798)
2022-12-01 10:15:06 +08:00
Fredia Huya-Kouadio
b28bcb4cfc Fix the logic used to route InputEventScreenDrag events to Control nodes. 2022-11-30 14:16:26 -08:00
Haoyu Qiu
3b869e8027
Fix crash of queue_free() when main loop is not SceneTree
(cherry picked from commit 3b08d0e852)
2022-11-30 15:44:49 +01:00
Nong Van Tinh
ffbaa7fff0 Enhance null checking for input event 2022-11-27 15:01:34 +07:00
lawnjelly
edc85d22fc Faster queue free
Calling queue_free() for large numbers of siblings could previously be very slow, with the time taken rising exponentially with number of children. This looked partly due to ordered_remove from the child list and notifications.

This PR identifies objects that are nodes, and sorts the deletion queue so that children are deleted in reverse child order. This minimizes the costs of reordering.
2022-11-25 09:53:50 +00:00
Rémi Verschelde
80b50e59d5
Merge pull request #67612 from timothyqiu/who-ami-i-3.x
[3.x] Fix get_path() error when calling get_node()
2022-10-31 12:25:12 +01:00
Haoyu Qiu
5d6dc206bc Fix get_path() error when calling get_node() 2022-10-19 13:05:41 +08:00
Micky
6102f3cfc2 [3.x] Rename set_indexed & get_child's params to be clearer
3.x backport of #67300 and #64463.
2022-10-12 20:55:41 +02:00
lawnjelly
17f42e8e66 Improve signal already connected error message
The signal already connected message is improved to provide the names of the objects involved.
2022-09-21 07:52:30 +01:00
kobewi
0511f48c49 Fix Viewport size change not updating textures
(cherry picked from commit 3a4a4aeade)
2022-09-05 15:35:45 +02:00
kobewi
737bfa57d3 Allow to change the Stop shortcut used at runtime
(cherry picked from commit 409613ba7b)
2022-09-05 15:35:45 +02:00
Rémi Verschelde
c551a79084
Merge pull request #65063 from Atlinx/fix/65033_fix-hdr-warning
Disable HDR warning for Viewport on GLES2 projects
2022-08-30 08:38:06 +02:00
Atlinx
e3b3462187 Remove HDR warning if on low end 2022-08-29 19:14:30 -04:00