Commit Graph

7734 Commits

Author SHA1 Message Date
561a8eaf6e Merge pull request #88207 from lawnjelly/view_mesh_stats
[3.x] Editor 3D view mesh stats
2024-04-21 19:31:57 +01:00
36474d6142 Merge pull request #90928 from timothyqiu/toggle-tab-icon-3.x
[3.x] Fix TabContainer not updating content rect after toggling tab icon
2024-04-21 19:29:38 +01:00
bdf0f78e07 Editor 3D view mesh stats
Similar to information window, add a small optional window to display face count and other stats.
2024-04-21 08:20:18 +01:00
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
30dead8a5e Fix TabContainer not updating content rect after toggling tab icon 2024-04-20 16:12:45 +08:00
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
1869243644 Merge pull request #88807 from lawnjelly/portals_fix_enter_tree_order
[3.x] Portals - defer setting active in `VisualServer` until enter tree
2024-04-19 10:24:37 +02:00
ea68c2bfab Merge pull request #88946 from lawnjelly/fix_physics_on_floor_body
[3.x] Fix physics `on_floor_body` crash
2024-04-16 15:02:00 +01:00
db3fe5e5c3 Merge pull request #90669 from timothyqiu/owner-id-3.x
[3.x] Store `ObjectID` instead of pointer for KinematicCollision owner
2024-04-16 13:49:58 +01:00
33043c63d5 Fix SceneTree not respecting virtual process methods
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2024-04-16 18:49:02 +08:00
43862fbf44 Store ObjectID instead of pointer for KinematicCollision owner 2024-04-15 12:32:17 +08:00
ed952f82bd Add is_zero_approx methods to Vector{2,3} 2024-04-10 19:02:42 +08:00
fe65682937 Add Node.is_node_ready 2024-04-08 17:44:23 +08:00
90cf873979 Fix AudioStreamPlayer not paused on pause mode change
Fixes #58543.
2024-04-05 14:20:44 +02:00
a0f130e23c Optimize AnimationTree::_process_graph()
Removes redundant lookups on HashMap.
2024-03-18 09:01:41 +00:00
f8438601ef Physics Interpolation 2D - fix light and light occluder resetting
It turns out `NOTIFICATION_TRANSFORM_CHANGED` is deferred for these nodes, which can mean the transform is not set in the `VisualServer` until after the reset has been sent, even if the transform is set before the reset in script. This prevented the reset from acting correctly.

Here we explicitly set the transform prior to each reset, to ensure the `VisualServer` is up to date.
2024-03-16 16:02:22 +00:00
0f6d2c3441 Fix building with disable_3d 2024-03-16 11:31:23 +01:00
1ad9e856a0 Merge pull request #88198 from lawnjelly/fix_facecount_bug
[3.x] Fix `Mesh::get_face_count()`
2024-03-08 17:54:04 +01:00
ae7dfd1f13 Merge pull request #85437 from lawnjelly/lod_scene_side
[3.x] Discrete Level of Detail
2024-03-08 17:53:58 +01:00
9a9dccbaa2 Fix physics on_floor_body crash
Physics body previously stored the RID of a collision object and accessed it on the next frame, leading to a crash if the object had been deleted.
This PR stores the ObjectID in addition to the RID, and checks the object still exists prior to access.
2024-02-28 07:54:00 +00:00
788567987a Portals - defer setting active in VisualServer until enter tree
`set_portal_active()` was being called loading packed scenes prior to entering the tree, visual server portals had not been fully created at this point hence the call was being ignored with an error flagged.
This PR defers the call until after entering the tree.
2024-02-25 10:11:06 +00:00
1e7c60174e fix crash on mat creation after orm refactor 2024-02-16 20:51:27 +01:00
a32a2613e9 Fix Mesh::get_face_count()
This fixes a minor bug whereby facecount was actually returning the facecount * 3.
There were no major problems from this, but it did mean the optional threshold poly count used when merging was out by a factor of 3.
2024-02-11 12:19:52 +00:00
1b5fa74e39 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-02-10 18:54:25 +00:00
b9cbffd957 add ORMSpatialMaterial 2024-02-08 20:34:11 +01:00
0aa22b8f13 Vertex cache optimizer
Optimizes indices to make good use of vertex cache on GPU.
2024-02-07 09:35:50 +00:00
e96ebf9218 Merge pull request #61568 from lawnjelly/merge_node
[3.x] Add MergeGroup node to simplify merging Meshes at runtime
2024-02-07 09:49:45 +01:00
dc776e46b6 Merge pull request #60246 from Calinou/directional-light-add-fade-start-3.x
[3.x] Backport DirectionalLight `fade_start` property
2024-02-07 09:49:21 +01:00
5eeb4f220d Merge pull request #87713 from lawnjelly/portal_include_in_bound
[3.x] Portals - include in bound and special cases in start room
2024-02-07 09:41:22 +01:00
991e922877 Merge pull request #86786 from lawnjelly/calinou_sdf_fixed
[3.x] Fix signed distance field font rendering
2024-02-07 09:40:59 +01:00
862d63e9f7 Merge pull request #81559 from matorin57/3.x-backport-finished-singal-GPU-particles
[3.x] Backport "Add `finished` signal to GPUParticles"
2024-02-07 09:39:49 +01:00
bc607fb607 Fix signed distance field font rendering
This fix works in both GLES3 and GLES2.

The rendering formula in the shader was adjusted to further improve the
sharpness/antialiasing quality balance.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-02-05 17:50:33 +00:00
7f3800ece2 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-01-31 09:22:33 +00:00
8b79135538 Add MergeGroup node to simplify merging Meshes at runtime 2024-01-31 08:28:51 +00:00
e9949a6db7 Merge pull request #87702 from lawnjelly/portal_export_logging
[3.x] Portals - Improve conversion logging
2024-01-29 23:30:11 +01:00
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
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
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
5e0b298d50 Portals - Improve conversion logging
Logging is now allowed in any TOOLS build (rather than just in the editor), but still prevented in final exports.
Logging can be switched off via project settings.
Autoplacement is now logged.
2024-01-29 14:21:22 +00:00
99284482bc [3.x] Add SceneTree::get_first_node_in_group following 4.x 2024-01-26 21:26:40 +07:00
c377bffaa1 Preserve selection when focusing SpinBox 2024-01-18 16:38:05 +01:00
e653473646 Merge pull request #86725 from Mickeon/3-x-remove-unused
[3.x] Remove unused struct in GradientTexture1D
2024-01-05 11:07:44 +01:00
ab9ed3245d [3.x] Add "position" as an alias for "translation" in Spatial 2023-12-05 17:25:48 -06:00
4fefb136ea Backport DirectionalLight fade_start property to 3.x
- Implement shadow fading when using the Orthogonal shadow mode
  (like in `master`).

This allows customizing the distance at which directional shadows
start to fade away. Shadow fading will also always start at the same
distance now, regardless of the current shadow mode in use.

This is useful for enclosed levels to prevent shadows from fading
at all with a well-tuned maximum distance.

The default fade start value (0.8) results in fading happening later
in the distance compared to the previous behavior, where fading started
from the last shadow split distance (0.6 in PSSM 4 Splits and
0.1 in PSSM 2 Splits).
2023-11-20 12:41:55 +01:00
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
010f53a0b6 Merge pull request #84115 from Chubercik/item_list_separator_fix
[3.x] Remove the separator from `ItemList`'s thumbnails mode
2023-11-14 11:37:33 +01:00
6637dc28f6 Remove the separator from ItemList's thumbnail mode 2023-10-28 20:20:34 +02:00
0cde6800e7 Make gizmo plugin handle SpriteBase3D instead of Sprite3D 2023-10-06 10:43:07 +02:00
5f9cbe514d Merge pull request #75468 from Ansraer/four_is_overkill
[3.x] Add support for 3 dir shadow splits
2023-10-01 22:50:57 +02:00
1f4a6e43df Fix zero scale in particle shader
Fixes the lower bounding of scale when given zero input.

The previous bug was due to `sign` returning 0 with 0.0 input, rather than 1.
2023-09-19 08:30:50 +01:00