Commit Graph

54 Commits

Author SHA1 Message Date
5d2a594843 Ported: 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)
- lawnjelly
8ca631a466
2024-02-08 18:40:44 +01:00
5133ef182d File copyright header updates pt10. 2023-12-18 00:31:04 +01:00
88e9ad04f2 Moved back the servers and resources from core. 2023-12-10 23:11:07 +01:00
11945d7f1d Split material.h. 2023-12-10 21:26:28 +01:00
053f083e17 Moved the Physics 2d server to core. 2023-12-10 19:42:57 +01:00
dbcc6e33da Moved the physics server to core. 2023-12-10 19:36:00 +01:00
3902cf1924 Moved ScneeStringNames and PropertyUtils into scene/main. 2023-12-10 18:01:51 +01:00
191e9e152e Added quote_style argument to get_argument_options(). 2023-12-10 16:02:08 +01:00
9df5649c1b Moved CanvasItem, Control, Node2D and Spatial under scene/main. 2023-12-10 15:50:54 +01:00
763f662263 Moved meshes to a new subfolder. 2023-12-10 15:22:09 +01:00
deccaed2cc Moved materials into a new subfolder. 2023-12-10 14:59:22 +01:00
08160fd63f Moved fonts into a new subfolder. 2023-12-10 14:42:30 +01:00
cf2e53ebc3 Also remove now unnecessary if. 2023-09-09 04:01:26 +02:00
f592c170d1 Go back to using no context Nodes directly to save on lookup, as Nodes shouldn't be deleted like this. 2023-09-09 04:00:47 +02:00
93f4077e73 Stop processing no context node inputs when the input gets handled. Also use ObjectIDs in case Nodes get deleted. 2023-09-09 03:41:19 +02:00
4637f73099 Backported the shortcut context system from godot4. 2023-09-07 12:57:34 +02:00
9a2bf73280 Backported _shortcut_input() virtual from godot4. 2023-09-07 09:56:16 +02:00
66e080d766 Fix typo. 2023-09-07 07:55:48 +02:00
7fcc653a0e Backported the CallInputType parameter for SceneTree::_call_input_pause() from godot4. 2023-09-07 07:40:45 +02:00
6be43d2ec6 Backported SceneTree::get_first_node_in_group() from godot4. 2023-09-06 08:54:55 +02:00
1e5f9895e7 Backported from godot4: Remove SceneTree debug avoidance hint
Removes SceneTree debug avoidance hint.
- smix8
f1d8ddd9bd
2023-09-04 21:43:06 +02:00
8467cf9e94 Backported from godot4: Keep NavigationServer active while SceneTree is paused.
- smix8
4b0dee080e
2023-09-02 12:57:35 +02:00
eb8943a4f6 Backported from godot4: Add Path2D/3D debug options
- smix8
e12e239ab4
2023-09-02 11:38: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
decade59c8 Implemented a new ProcessGroup Node. It can be used to multithread scenes updates.
It was insipred by godot 4's ProcessGroup system, however while Godot 4's implementation tries to hide threaded processing as much as possible, this implementation focuses on making it explicitly known and obvious to the user, in a (hopefully) almost bolierplate free way.

Also with the available options this node can be used for other purposes, like multi threaded cron job like method calls when paired with a Timer in manual mode.
2023-06-13 15:08:35 +02:00
d4175f9676 Ported parts of : Refactor Node Processing
* Node processing works on the concept of process groups.
* A node group can be inherited, run on main thread, or a sub-thread.
* Groups can be ordered.
* Process priority is now present for physics.
This is the first steps towards implementing godotengine/godot-proposals#6424.
No threading or thread guards exist yet in most of the scene code other than Node. That will have to be added later.
- reduz
98c655ec8d
- Only got the smaller improvements, and the thread safety for Node and SceneTree. I'm planning to implement a similar system, but I have a different way of doing it in mind.
2023-06-12 21:13:26 +02:00
f058c87868 Backported from godot4: Rework Navigation Avoidance
Rework Navigation Avoidance.
- smix8
a6ac305f96
2023-06-10 20:58:49 +02:00
25078b1437 Ported from godot4: Remove / Replace old Navigation Debug Visualization
- removes / replaces leftovers from old navigation debug code
- cleanes SceneTree and ProjectSettings from old navigation debug
- smix8
d7f75fab60
2023-06-05 18:56:41 +02:00
40a9b72afb Ported from godot-plus: Add ability to mute AudioServer.
Adds the option to change the audio driver to the Dummy driver and back at runtime, with a set of MuteState flags - Disabled (user control), Silence (period of silence), Focus Loss (when app is not in focus), and Paused (when app is paused).
Control for the flags is added for the editor in EditorSettings, and for the project in ProjectSettings.
Editor defaults to muted (Dummy driver) when there is no audio output, and automatically switches to active on output. This significantly reduces CPU usage.
- lawnjelly
cedb01fb84
2023-04-10 19:42:23 +02:00
lawnjelly
85a4c5369b 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.
2023-01-16 14:24:25 +01:00
2cd4e4d828 Renamed Set to RBSet. 2023-01-15 19:42:08 +01:00
1b0aac6028 Renamed Map to RBMap. 2023-01-15 19:12:50 +01:00
Haoyu Qiu
520f6d19f6 Fix possible Tween leak on exit
(cherry picked from commit e173710963c3316833ac2e2c26ab3830551fd790)
2022-12-22 14:06:21 +01:00
98039d80f6 Fix include. 2022-09-16 23:12:05 +02:00
kobewi
65e1217d59 Allow to change the Stop shortcut used at runtime
(cherry picked from commit 409613ba7ba50e6cc985c61f6dcc482bac68746e)
2022-09-16 22:59:29 +02:00
27316923d3 Moved ThreadPool to core. Also it can change it's thread count now when it has time for it. 2022-09-10 04:16:50 +02:00
b886d14cf5 Added _3d postfix to the end of the World3D related getters and setters in Viewport. 2022-08-29 17:54:41 +02:00
24a1580dbf Renamed the files aswell. 2022-08-29 17:33:10 +02:00
e4ae7f2ebc Renamed Environment to Environment3D, and WorldEnvironment to WorldEnvironment3D. 2022-08-29 17:21:40 +02:00
2aee6ab0bb Renamed World to World3D. 2022-08-29 16:49:00 +02:00
cffe742085 Renamed the VisualServer to RenderringServer like in Godot4, as I think it's a lot better name for it. I did not yet rename the files. 2022-08-19 20:50:20 +02:00
04feb63860 Moved Engine and projectSettings. 2022-08-17 15:35:28 +02:00
220b2db443 Moved String and related classes under a string folder in core. 2022-08-17 14:19:55 +02:00
dc9cc716c7 Moved Object related classes under core/object. 2022-08-17 13:45:14 +02:00
Marcel Admiraal
ef7646924a Set initial SceneTree processes times to 0.0 2022-07-29 20:55:06 +02:00
cb6e070227 ported: Make auto_accept_quit and quit_on_go_back properties. - timothyqiu
58650af062
2022-07-27 18:26:15 +02:00
lawnjelly
da628411d2 Physics Interpolation - Flush transforms after physics tick
Leftover transforms from the physics tick were being flushed during idle, which was causing problems for physics interpolation.

This PR flushes the transforms at the end of the physics tick when physics interpolation is active.
2022-07-27 14:14:36 +02:00
b9fb0ae733 Ported: Backport the new Tween system as SceneTreeTween - timothyqiu, KoBeWi
153dc4d57e
2022-07-27 13:37:17 +02:00
c9b612f012 Added StringName as a variant type, with eventually the help of 3c0059650d . 2022-03-21 21:29:06 +01:00