Commit graph

7715 commits

Author SHA1 Message Date
Rémi Verschelde
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
Rémi Verschelde
ae7dfd1f13
Merge pull request #85437 from lawnjelly/lod_scene_side
[3.x] Discrete Level of Detail
2024-03-08 17:53:58 +01:00
Ansraer
1e7c60174e fix crash on mat creation after orm refactor 2024-02-16 20:51:27 +01:00
lawnjelly
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
lawnjelly
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
Ansraer
b9cbffd957 add ORMSpatialMaterial 2024-02-08 20:34:11 +01:00
lawnjelly
0aa22b8f13 Vertex cache optimizer
Optimizes indices to make good use of vertex cache on GPU.
2024-02-07 09:35:50 +00:00
Rémi Verschelde
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
Rémi Verschelde
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
Rémi Verschelde
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
Rémi Verschelde
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
Rémi Verschelde
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
lawnjelly
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
lawnjelly
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
lawnjelly
8b79135538 Add MergeGroup node to simplify merging Meshes at runtime 2024-01-31 08:28:51 +00:00
Rémi Verschelde
e9949a6db7
Merge pull request #87702 from lawnjelly/portal_export_logging
[3.x] Portals - Improve conversion logging
2024-01-29 23:30:11 +01: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
lawnjelly
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
SysError99
99284482bc [3.x] Add SceneTree::get_first_node_in_group following 4.x 2024-01-26 21:26:40 +07:00
kobewi
c377bffaa1 Preserve selection when focusing SpinBox 2024-01-18 16:38:05 +01:00
Rémi Verschelde
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
Aaron Franke
ab9ed3245d
[3.x] Add "position" as an alias for "translation" in Spatial 2023-12-05 17:25:48 -06:00
Hugo Locurcio
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
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
Rémi Verschelde
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
Jakub Marcowski
6637dc28f6 Remove the separator from ItemList's thumbnail mode 2023-10-28 20:20:34 +02:00
kleonc
0cde6800e7 Make gizmo plugin handle SpriteBase3D instead of Sprite3D 2023-10-06 10:43:07 +02:00
Rémi Verschelde
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
lawnjelly
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
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
bc1426dd70 CPUParticles2D - non-interpolated global mode use global space
Changes the implementation of non-interpolated global mode particles so that the vertices are specified in proper global space instead of local space (vertices were previously back transformed by the inverse of the parent transform).
2023-09-18 16:05:03 +01:00
Rémi Verschelde
1b4bae595e
Merge pull request #80955 from lawnjelly/fti2d_more_resets
[3.x] Physics Interpolation - automatic resets for Camera2D and TileMap
2023-09-18 17:00:05 +02:00
Rémi Verschelde
cc48c1825f
Merge pull request #80887 from lawnjelly/cpuparticles2d_fix_double_xform
[3.x] CPUParticles2D - fix interpolated transforms and culling
2023-09-18 17:00:00 +02:00
Rémi Verschelde
9eb4d5d5de
Merge pull request #80827 from lawnjelly/fix_cpu_particles_notif_transform
[3.x] CPUParticles - fix non-interpolated `NOTIFICATION_TRANSFORM`
2023-09-18 16:59:57 +02:00
Rémi Verschelde
d6c2a4bf68
Merge pull request #81352 from MJacred/3.x
[3.x] Fix cursor after last character INDEX in line counting as a character outside of the viewing area
2023-09-18 11:36:12 +02:00
DESKTOP-UT43QTQ\Garrigan-Desktop
2a319ab6fc Backporting #76859 to 3.x
Co-authored-by: HolonProduction <holonproduction@gmail.com>
2023-09-12 09:45:23 -05:00
Rémi Verschelde
4461f38c0b
Merge pull request #81409 from timothyqiu/social-distance
[3.x] Fix PopupMenu icon and text not having separation
2023-09-07 13:24:34 +02:00
Haoyu Qiu
78a11ea48c Fix PopupMenu icon and text not having separation 2023-09-07 18:14:44 +08:00
A Thousand Ships
d0a98e1ddc Make TextureButton and Button update on texture change 2023-09-06 16:44:12 +02:00
MJacred
55cdaebdf9 Fix cursor after last character in line counting as a character outside of the viewing area
The cursor column can be after the last_visible_char index and still be visible.
2023-09-05 19:36:17 +02:00
Haoyu Qiu
aea0c1235d Fix TouchScreenButton not redrawn when texture changes
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-08-29 18:08:28 +08:00
Paweł
268f83e07f
Fix scrolling behaviour with low page value
(cherry picked from commit 1608bea188)
2023-08-28 17:27:13 +02:00
Haoyu Qiu
d6221bd614
Notify child controls when BackBufferCopy's rect changed
(cherry picked from commit 602a0d2fbc)
2023-08-28 17:27:13 +02:00
lawnjelly
09b79ead80 Physics Interpolation - automatic resets for Camera2D and TileMap.
Extra reset required for Camera2D. TileMaps require resetting by quadrant.
2023-08-24 10:18:12 +01:00
lawnjelly
65f72c8c02 CPUParticles - fix non-interpolated NOTIFICATION_TRANSFORM
Updates global particle transforms immediately on receiving notification, to match legacy behaviour.
2023-08-22 18:35:00 +01:00
lawnjelly
723632a76a 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.
2023-08-22 12:57:54 +01:00
Rémi Verschelde
cf4ccdfb09
Merge pull request #79598 from TokageItLab/orderdhashmap-blendtree
[3.x] Make AnimationNodeBlendTree use `OrderedHashMap` insteads `Map`
2023-08-18 17:52:15 +02:00
Rémi Verschelde
21ab700f2d
Merge pull request #80406 from lawnjelly/animated_sprite_normal_fix
[3.x] Fix AnimatedSprite normal map loading
2023-08-15 09:04:35 +02:00