Commit Graph

177 Commits

Author SHA1 Message Date
f09ab537e0 Clang-format everything. 2024-04-21 15:27:36 +02:00
lawnjelly
4496c11437 Tighter shadow culling - fix light colinear to frustum edge
In rare situations if a light is placed near colinear to a frustum edge, the extra culling plane derived can have an inaccurate normal due to floating point error.
This PR detects colinear triangles, and prevents adding a culling plane in this situation.
2024-04-14 16:35:26 +02:00
f6d9ca069f Fix build. 2024-04-06 13:46:57 +02:00
lawnjelly
909acac329 Discrete Level of Detail
Add scene side discrete level of detail.

New node `LOD` for UI, and `LODManager` within `World` for automatically updating child visibilities based on distance from cameras.
2024-04-06 12:06:01 +02:00
lawnjelly
bb9cd55575 Physics Interpolation 2D - change transform API to use const ref 2024-04-06 10:55:53 +02:00
053b283c47 Reworked RendetingServer's canvas_item_add_texture_rect_animation's last parameter. Now instead of bool randomize_start_time it's real start_time. This should make it more versatile. 2024-03-12 17:52:12 +01:00
90ae8d4791 Tweaks to CommandRectAnimation's destructor. 2024-03-12 06:15:35 +01:00
588b50e9ce Added randomize_start_time optional parameter to canvas_item_add_texture_rect_animation(). 2024-03-11 20:53:05 +01:00
8a8193e8d3 Fix memleak. 2024-03-11 20:51:14 +01:00
2934369381 Added a new canvas_item_add_texture_rect_animation() method to the RenderingServer. 2024-03-11 18:21:05 +01:00
34ddcc3694 Fix build on MSVC. 2024-02-15 20:38:16 +01:00
7ce8e97b13 Disabled the WindowServer for now. 2024-02-08 23:45:33 +01:00
2abfd57704 Fix error. 2024-02-08 22:44:02 +01:00
a5d8696021 Ported: Vertex cache optimizer
Optimizes indices to make good use of vertex cache on GPU.
- lawnjelly
0aa22b8f13
2024-02-08 21:35:01 +01:00
c3c6d64a50 Portred: Add MergeGroup node to simplify merging Meshes at runtime.
- lawnjelly
8b79135538
2024-02-08 21:00:07 +01:00
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
lawnjelly
f09cdf5954 Portals - include in bound and special cases in start room
* Re-introduces a property for portals to decide whether they are included in room bounds during room conversion.
* Adds a special case for portals that extend into the start room, which may be caused by level design inaccuracies.
2024-02-08 15:10:00 +01:00
Bartłomiej T. Listwon
7101e4aed7 Prevent shuffling custom shader functions (shader cache requires determinism) 2024-02-08 14:48:50 +01:00
562fe84f67 Don't print error when there is no default NavigationMeshGenerator. 2024-01-02 13:05:52 +01:00
Rémi Verschelde
1c70f86950 Fix various GCC 13 warnings
Fixes occurrences of `-Wtype-limits`, `-Wmaybe-uninitialized`,
`-Wduplicated-branches`.
2023-12-20 22:57:54 +01:00
5133ef182d File copyright header updates pt10. 2023-12-18 00:31:04 +01:00
70f749688b Renamed DisplayServer to WindowServer. 2023-12-12 14:51:08 +01:00
a99e07563d Initial DisplayServer method setup. 2023-12-12 14:39:28 +01:00
c11e564b4e Added a new dummy DisplayServer class. 2023-12-12 13:35:51 +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
238bf1b331 Moved the RenderingServer to core. 2023-12-10 19:04:24 +01:00
0dfba6c552 Moved AudioStreamSample. 2023-12-10 15:26:43 +01:00
deccaed2cc Moved materials into a new subfolder. 2023-12-10 14:59:22 +01:00
4cbc387c53 Moved the navigation relatred resources into subfolders. 2023-12-10 14:23:24 +01:00
59ae5c4662 Ported from godot: add support for 3 dir shadow splits
- Ansraer
54bc6a300e
2023-10-02 18:12:54 +02:00
f4339d2a49 Ported: CPUParticles2D - fix interpolated transforms and culling
1) Physics interpolated particles in global mode are specified in global space. In VisualServer they should therefore ignore local transform.
2) Additionally, the expected final_transform should be passed on to children, rather than the identity transform used on the local item.
3) Local bounds in hierarchical culling are fixed for items using identity transform, by calculating their local bound in local space from the global space particles.
- lawnjelly
723632a76a
2023-10-02 17:32:07 +02:00
Wilson E. Alvarez
8aa9b59eaf Fix AudioEffectRecord circular reference 2023-10-02 16:29:43 +02:00
e3e6e9e231 Bind missing method in NavigationServer. 2023-09-10 08:44:29 +02:00
0ff2bbdf70 Make sure that all parameters are properly set into PathQueryResults. 2023-09-05 11:58:36 +02:00
8880722565 Removed cell height getters and setters from the Navigation2DServer. 2023-09-05 11:57:34 +02:00
a222159442 Backported from godot4: Add NavigationServer API to enable regions and links
Adds NavigationServer API to enable regions and links.
- smix8
69fad39cf5
2023-09-04 20:22:28 +02:00
b37e0e6a4e Backported from godot4: Update navigation obstacle API
Updates navigation obstacle API.
- smix8
c1fc331b88
2023-09-04 19:55:32 +02:00
aeb4d3fbe2 Backported from godot4: Add agent pause mode to NavigationServer
Adds agent pause mode to NavigationServer.
- smix8
https://github.com/godotengine/godot/commit/ae9dd47d0c1c237d0733439862aa5ff651dcac2
2023-09-04 19:04:29 +02:00
8485b37515 Ported from godot4: Fix Navigation API abbreviations inconsistency
Schema for navigation to name user facing API with  "navigation" without abbreviation and e.g. NavigationServer internals with abbr "nav".
- smix8
34e7628f5f
2023-09-04 17:09:39 +02:00
e81f25ac7b Added init and finish methods to the NavigationMeshGenerator. Also small tweaks in initialization. 2023-09-03 11:51:09 +02:00
9ae3aa65b7 Added finish method to the NavigationServers. 2023-09-03 11:46:46 +02:00
9fd4b941e2 Backported from godot4: Unbind NavigationServer3D.process()
Unbinds NavigationServer3D.process().
- smix8
f1026450bf
2023-09-03 09:26:48 +02:00
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