Commit Graph

30541 Commits

Author SHA1 Message Date
Omar El Sheikh 7f8487a900 Split Vertex Position and Attribute Streams
Implemented splitting of vertex positions and attributes in the vertex
buffer

Positions are sequential at the start of the buffer, followed by the
additional attributes which are interleaved

Made a project setting which enables/disabled the buffer formatting
throughout the project

Implemented in both GLES2 and GLES3

This improves performance particularly on tile-based GPUs as well as
cache performance for something like shadow mapping which only needs
position data

Updated Docs and Project Setting
2021-07-19 13:23:46 -07:00
Rémi Verschelde 526447b86f
Merge pull request #50495 from nekomatata/move-and-slide-fixes-3.x
[3.x] Backport KinematicBody move_and_slide and move_and_collide fixes
2021-07-19 20:11:51 +02:00
Stanislav Labzyuk 10252d81a3 Implemented the ability to add shortcut for Project -> Reload Current Project. 2021-07-20 00:12:50 +07:00
foxydevloper 6926363efb Backport filesystem dock sorting to 3.x
Co-authored-by: Gilles Roudiere <gilles.roudiere@gmail.com>
2021-07-19 12:31:28 -04:00
PouleyKetchoupp beeebb4c2f More accurate unsafe motion calculation
* Safe and unsafe motion are calculated by dichotomy with a limited
number of steps. It's good for performance, but on long motions that
either collide near the beginning or near the end, the result can be
very imprecise.
* Now a factor 0.25 or 0.75 is used to converge faster when this case
happens, which allows longer motions to get more accurate collision
detection.
* Makes snap collision more precise, and helps with cases where diagonal collision on the border of a platform can lead to the character being stuck.

Additional improvements to move_and_slide:
* Handle slide canceling in move_and_collide with 0 velocity instead of
not applying it.
* Better handling of snap with custom logic to cancel sliding.
* Remove small jittering when using stop on slope, by canceling the
motion completely when the resulting motion is less than margin instead
of always projecting to the up direction (in both body motion and snap).

Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-07-19 08:09:17 -07:00
PouleyKetchoupp 2fbb6fff4e Fix move_and_collide causing sliding on slopes
Make sure the direction of the motion is preserved, unless the depth is
higher than the margin, which means the body needs depenetration in any
direction.

Also changed move_and_slide to avoid sliding on the first motion, in
order to avoid issues with unstable position on ground when jumping.

Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-07-19 08:09:16 -07:00
Lightning_A cf8de3b316 Add viewport preview plugin and refactor TextureEditorPlugin 2021-07-18 14:49:45 -06:00
Yuri Sizov 9c2ff29c4d Clear the theme type filter/name on each dialog popup 2021-07-18 20:37:30 +03:00
Hugo Locurcio 8f448b5830
Fix duplicate selection in SceneTree
* It seems both cell_selected and multi_selected were being triggered,
* This caused inspector updating twice.
* cell_selected connection and callback were removed.

Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2021-07-17 21:26:24 +02:00
Rémi Verschelde 9636deac55
Merge pull request #50508 from Calinou/add-drag-threshold-select-mode-3.x
Prevent accidental drags by adding drag distance threshold
2021-07-17 19:36:16 +02:00
Rémi Verschelde d7f49c7709
Merge pull request #50519 from pycbouh/editor-theme-fixup-3.x
[3.x] Fix control picker in the Theme editor
2021-07-17 09:30:35 +02:00
Rémi Verschelde 522df33334
Merge pull request #50528 from pycbouh/editor-subresource-selector-3.x
[3.x] Make several actions in the Inspector dock more obvious
2021-07-17 09:29:01 +02:00
Rémi Verschelde c391c2210f
Merge pull request #50526 from pycbouh/graphedit-adjust-zoom-levels-3.x
[3.x] Make zoom limits and step adjustable in GraphEdit
2021-07-17 08:50:31 +02:00
Hugo Locurcio 43d7b62cb0
Improve the shader error console output
This makes the line gutter look more like an actual line gutter,
which makes it less confusing.
2021-07-17 03:00:46 +02:00
Yuri Sizov 266c726dad Improve the UI/UX of the Export Template Manager dialog 2021-07-17 00:46:30 +03:00
Yuri Sizov 47592f96bc Make several actions in the Inspector dock more obvious 2021-07-16 23:27:00 +03:00
Yuri Sizov e05eb8a6ad Make zoom limits and step adjustable in GraphEdit 2021-07-16 22:43:28 +03:00
Yuri Sizov b11178b21e Fix control picker in the Theme editor 2021-07-16 21:36:54 +03:00
Lightning_A c4ff3ef891 Add shift + [1-5] keyboard shortcuts to zoom out 2021-07-16 12:15:44 -06:00
Rémi Verschelde 4d3c11e85e
Merge pull request #49446 from nekomatata/sync-to-physics-3d-3.x
[3.x] Support for 3D sync to physics
2021-07-16 07:15:17 +02:00
Hugo Locurcio 44b01751e6
Prevent accidental drags by adding drag distance threshold
Co-authored-by: fox <12120644+foxydevloper@users.noreply.github.com>
2021-07-16 06:04:25 +02:00
Hugo Locurcio 0fe771dfe5
Tweak Light property hints for greater flexibility
- Specular can now be set above 1.0.
- Some properties now allow more precise values.
- The Bake Mode property hint was changed to be more descriptive.
- The maximum shadow bias values were adjusted to follow the property
  hints in `master`.
2021-07-16 04:12:10 +02:00
Hugo Locurcio a623eb5083
Improve scrolling actions in the animation track editor
- Implement timeline scrobbling using Alt + Mouse wheel anywhere in the
  animation track editor.
  - Snap settings are followed, and precise snapping can be obtained by also
    holding down Shift.
  - This modifier wasn't used by anything in the animation editor.
- Allow zooming by using Ctrl + Mouse wheel on the timeline itself.
  - Previously, this was only possible on the track area, not the timeline.
2021-07-15 22:29:36 +02:00
Rémi Verschelde 08d517243c
Merge pull request #50490 from Calinou/improve-2d-editor-zoom-3.x
Improve 2D editor zoom logic (3.x)
2021-07-15 19:04:38 +02:00
Rémi Verschelde ba57247448
Merge pull request #50492 from KoBeWi/🌳🌳🌳.x
[3.x] Update Tree when modified
2021-07-15 19:03:54 +02:00
Rémi Verschelde 317b5c7141
Merge pull request #50494 from Calinou/asset-search-autofocus-3.x
Automatically focus the Search field when displaying asset library
2021-07-15 19:03:30 +02:00
Hugo Locurcio 9cc65e1b9b
Automatically focus the Search field when displaying asset library
- Focus the project search box when switching from the Templates tab
  back to the Projects tab in the project manager.
- Add a context-specific placeholder for the asset library search box.
- Rename "Search" project filter box placeholder to the more
  descriptive "Filter projects". When performing a search on an
  existing selection, "Filter" is more accurate than "Search".
2021-07-15 18:47:38 +02:00
kobewi 557a1f6232 [3.x] Update Tree when modified 2021-07-15 18:19:29 +02:00
Hugo Locurcio 477dfc5174
Improve 2D editor zoom logic
- Add 1-5 shortcuts to zoom between 100% and 1600% quickly
  (similar to GIMP).
- When holding down Alt, go through integer zoom values if above 100%
  or fractional zoom values with integer denominators if below 100%
  (50%, ~33.3%, 25%, …).
2021-07-15 17:15:02 +02:00
Rémi Verschelde 26d0c90370
Merge pull request #50477 from lawnjelly/portals_autolink_order
Portals - fix autolink sprawling, refine logs
2021-07-15 15:22:53 +02:00
Rémi Verschelde 50790a5893
Merge pull request #50478 from KoBeWi/xalign
[3.x] Fix valign with stylebox borders
2021-07-15 15:22:13 +02:00
lawnjelly 44f9a0f961 Portals - fix autolink sprawling, refine logs
It turned out the new autolinking feature was linking portals AFTER the static meshes had been added to rooms in the PortalRenderer. This meant that large meshes weren't being sprawled across these portals. The fix involves doing the autolinking BEFORE adding the static meshes.

Fixes a bug in the warning for portals being in the wrong direction, they should have only been checkout for outgoing portals. This was resulting in erroneous warnings.

Also the room conversion logs are refined to be more compact and informative.

A warning icon is also added in the gizmo for portals where autolink fails.
2021-07-15 13:04:05 +01:00
kobewi dd62aa1bf9 [3.x] Fix valign with stylebox borders 2021-07-15 13:58:18 +02:00
Rémi Verschelde 231efe0c6d
Merge pull request #50166 from fabriceci/fix-2d-moving-platform
[3.x] Fixing 2D moving platform logic
2021-07-15 13:34:30 +02:00
Rémi Verschelde bc40546406
Merge pull request #50457 from lawnjelly/portals_config_warn 2021-07-15 12:30:33 +02:00
Rémi Verschelde d07fb152d9
Merge pull request #50475 from akien-mga/3.x-cherrypicks 2021-07-15 12:19:47 +02:00
fabriceci fba4c9d552 Fixing 2D moving platform logic
Fixing by applying the movement in two steps, first the platform
movement, and then the body movement. Plus, add the platform movement
when we are on_wall.
2021-07-15 11:57:58 +02:00
kleonc 6d48b67f14
Node::add_child Check for cyclic dependency
Node Replace string addition with vformat()

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit 81388db8a7)
2021-07-15 10:52:33 +02:00
kobewi 4941d2001c
Add set_pressed_no_signal method to BaseButton
(cherry picked from commit 50c63bdc4c)
2021-07-15 10:52:22 +02:00
Tomasz Chabora 6021ab5b01
Document remaining Visual Script classes
(cherry picked from commit 1054956461)
2021-07-15 10:46:04 +02:00
Sergey Minakov f3da335416
[iOS] Fix plugin configuration loading
Clear ConfigFile parameter before loading new file.
Ignore duplicate input plist keys

(cherry picked from commit aa321f0a24)
2021-07-15 10:40:56 +02:00
David Kennedy 72db6016ba
Fixes move_to_trash() on Linux
Fixes #42840 OS move_to_trash() on Linux is not compliant with the Freedesktop specification

(cherry picked from commit 8b68c6808d)
2021-07-15 10:39:47 +02:00
Hendrik Brucker fe616d443a
Fix color properties of particle nodes/material
(cherry picked from commit 3a4a2198ed)
2021-07-15 10:25:35 +02:00
Rémi Verschelde 91241d9944
Merge pull request #50472 from akien-mga/room_manager-fix-csg-dependency
RoomManager: Fix build with CSG module disabled
2021-07-15 09:07:15 +02:00
lawnjelly b663acef93 Portals - Add configuration warnings for nodes
Checks for invalid children / grandchildren etc.
2021-07-15 08:01:42 +01:00
Rémi Verschelde 041115ca41
RoomManager: Fix build with CSG module disabled
Fixes #50462.
2021-07-15 08:51:15 +02:00
Rémi Verschelde 669bf7cf08
Merge pull request #50466 from akien-mga/3.x-scons-modules-enabled-header 2021-07-15 00:49:56 +02:00
Andrea Catania 74e6adda57
Add env.Depends to modules_enabled.gen.h generator
Sometimes scons doesn't detects that a new module is being added. This commit fix it.

(cherry picked from commit b667e72adf)
2021-07-14 23:46:44 +02:00
Rémi Verschelde 875045adde
Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.

(cherry picked from commit f3726ee994)
2021-07-14 23:36:38 +02:00
Rémi Verschelde cbbea6084d
SCons: Generate header with info on which modules are enabled
We already had `MODULE_*_ENABLED` defines but only in the modules
environment, and a few custom `*_ENABLED` defines in the main env
when we needed the information in core.

Now this is defined in a single header which can be included in the
files that need this information.

(cherry picked from commit b7297fb39c)
2021-07-14 23:09:47 +02:00