Commit graph

30978 commits

Author SHA1 Message Date
Rémi Verschelde
0b461cbb01
Merge pull request #51218 from timothyqiu/more-i18n-3x
[3.x] Fix various i18n failures
2021-08-08 19:24:45 +02:00
Yuri Roubinsky
0f817e127d [3.x] Fix a default shader specular render mode to (SCHLICK_GGX) 2021-08-08 19:26:00 +03:00
Rémi Verschelde
be22d7b013
Merge pull request #51396 from lawnjelly/portals_sprite3d
Portals - add support for Sprite3D
2021-08-08 17:47:32 +02:00
Rémi Verschelde
6149304c3a
Merge pull request #51394 from lawnjelly/portals_fix_log_crash
Portals - fix crash when logging link room names
2021-08-08 17:47:05 +02:00
Rémi Verschelde
52b3891b59
Merge pull request #51392 from lawnjelly/portals_autolink_internal
Portals - fix autolinking to internal rooms
2021-08-08 17:46:37 +02:00
Rémi Verschelde
7b718dc36b
Merge pull request #51388 from lawnjelly/portals_fix_secondary_pvs
Portals - Fix secondary PVS bug
2021-08-08 17:46:15 +02:00
lawnjelly
fc3c01db0f Portals - add support for Sprite3D
Add support for Sprite3D and animated Sprite3D.
2021-08-08 15:43:24 +01:00
lawnjelly
ef894c0966 Portals - fix crash when logging link room names
The checking for link room IDs was checking for less than size(), but was not correctly checking for -1,
and therefore reading outside the array range. This PR fixes this.
2021-08-08 15:00:39 +01:00
lawnjelly
a339f6fc49 Portals - fix autolinking to internal rooms
Portal autolinking was previously agnostic to room priorities, which meant that portals would link to the first room they found (often outside rooms). This PR fixes this by making the autolinking priority aware, and will preferentially link to internal rooms.
2021-08-08 14:37:04 +01:00
lawnjelly
cfe806a929 Portals - Fix secondary PVS bug
Fixes a bug whereby it read from the primary PVS in the gameplay monitor, using the size from the secondary PVS. This would read out of bounds and crash.

Removed debug code to update the gameplay monitor from the preview camera - this is no longer required.

Temporarily revert to the simple PVS generation method, because I've noticed a bug in the complex version, and the simple version is safer while I fix this.
2021-08-08 14:02:38 +01:00
Pedro J. Estébanez
45c2a7159e Switch to input buffering on Android
Key, touch and joystick events will be passed directly from the UI thread to Godot, so they can benefit from agile input flushing.

As another consequence of this new way of passing events, less Java object are created at runtime (`Runnable`), which is good since the garbage collector needs to run less.

`AndroidInputHandler` is introduced to have a smaller cross-thread surface. `main_loop_request_go_back()` is removed in favor just inline calling `notification()` on the `MainLoop` at the most caller's convenience.

Lastly, `get_mouse_position()` and `get_mouse_button_state()` now just call through `InputDefault` to avoid the need of sync of mouse data tracked on the UI thread.
2021-08-08 13:41:27 +02:00
Pedro J. Estébanez
31a0ca2cac Add project setting for agile input event flushing
If enabled, key/touch/joystick events will be flushed just before every idle and physics frame.

Enabling this can greatly improve the responsiveness to input, specially in devices that need to run multiple physics frames per each idle frame, because of not being powerful enough to run at the target frame rate.

This will only work for platforms using input buffering (regardless event accumulation). Currenly, only Android does so, but could be implemented for iOS in an upcoming PR.
2021-08-08 12:37:55 +02:00
Pedro J. Estébanez
7be9c26e20 Add input buffering framework
Input buffering is implicitly used by event accumulation, but this commit makes it more generic so it can be enabled for other uses.

For desktop OSs it's currently not feasible given main and UI threads are the same).
2021-08-08 12:37:55 +02:00
Pedro J. Estébanez
58a54f534e Improve input event accumulation
- API has been simplified: all events now go through `parse_input_event()`. Whether they are accumulated or not depends on the `use_accumulated_input` flag.
- Event accumulation is now thread-safe (it was not needed so far, but it prepares the ground for the following changes).
- Touch drag events now support accumulation.
2021-08-08 12:37:55 +02:00
Rémi Verschelde
42e40a7d3c
Merge pull request #51370 from lawnjelly/portals_better_pvs
Portals - improve PVS tracing
2021-08-07 23:48:06 +02:00
Omar El Sheikh
f0de7ec2b6 Align Vertex Buffer to 4 Bytes
With the octahedral compression, we had attributes of a size of 2 bytes
which potentially caused performance regressions on iOS/Mac

Now add padding to the normal/tangent buffer

For octahedral, normal will always be oct32 encoded
UNLESS tangent exists and is also compressed
then both will be oct16 encoded and packed into a vec4<GL_BYTE>
attribute
2021-08-07 15:42:03 -04:00
lawnjelly
69cc759b65 Portals - improve PVS tracing
The existing tracing routine for building the PVS was rather simple compared to the main portal tracing, and could not correctly cope with paths that went through multiple portals from room A to B, and as a result would sometimes miss room entries in the PVS resulting in too many culled rooms in these circumstances.

This PR adds an improved function that can cope with entering a room multiple times during a trace. As a result it has to take care of portal directions (to prevent going back on itself) in a similar, but not identical way to the main portal tracing routine, and internal rooms, to prevent recursive loops.
2021-08-07 17:57:30 +01:00
Rémi Verschelde
41cf7f2760
Merge pull request #51358 from raulsntos/fix-51342-3.x
[3.x] Fix Path3D initial forward calculation
2021-08-07 13:30:11 +02:00
Rémi Verschelde
b44f2126f6
Merge pull request #51334 from pycbouh/classref-get-theme-items-3.x
[3.x] Improve `Control`'s theme item methods documentation
2021-08-07 12:41:54 +02:00
Rémi Verschelde
b4a8717260
Merge pull request #51324 from LightningAA/show_view_rotation_dir-3.x
[3.x] Minor visual improvements to the viewport rotation gizmo (again)
2021-08-07 12:41:30 +02:00
Raul Santos
102ec1042b Fix Path3D initial forward calculation 2021-08-07 12:40:14 +02:00
Rémi Verschelde
92fa4e137d
Merge pull request #51329 from pycbouh/docs-inspector-plugins-classref-3.x
[3.x] Improve the inspector plugin documentation and remove a confusing statement
2021-08-07 12:37:13 +02:00
Rémi Verschelde
92d5614711
Merge pull request #51327 from kleonc/tile_map-ensure-tile-is-in_tile_set
[3.x] TileMap Fix trying to get data for tile not existing in attached TileSet
2021-08-07 12:35:36 +02:00
Rémi Verschelde
030bdc5a41
Merge pull request #51325 from raulsntos/fix-msbuild-exception-3.x
[3.x] Ensure MSBuildPanel buttons are instantiated
2021-08-07 12:19:43 +02:00
Rémi Verschelde
3585c4f3d0
Merge pull request #50637 from lawnjelly/fix_plane_xform_new
Fix Transform::xform(Plane) functions, add Transform unit tests
2021-08-07 09:39:43 +02:00
lawnjelly
37f20e1d78 Fix Transform::xform(Plane) functions, add Transform unit tests
The Transform::xform and xform_inv are made safe for Planes when using non-uniform scaling.

Basic unit tests for Transform.

Optimization of calling sites to prevent loss of performance from the changes to xform(Plane).
2021-08-07 08:05:39 +01:00
Rémi Verschelde
a0810f313f
Merge pull request #51333 from Razoric480/3x-sceneless-fix
[3.x] Fix LSP completion crashing on scene-less scripts
2021-08-07 00:02:15 +02:00
Rémi Verschelde
afe7b3fc58
Merge pull request #51336 from naithar/fix/ios-plugin-initialization
[3.x] [iOS] Use platform generated api to initialize iOS plugins
2021-08-06 23:59:06 +02:00
Lightning_A
9613725732 Minor visual improvements to the viewport rotation gizmo (again) 2021-08-06 14:38:31 -06:00
Raul Santos
dd9c07ee46 Ensure MSBuildPanel buttons are instantiated 2021-08-06 22:32:54 +02:00
Sergey Minakov
d48d7cc94f [iOS] Use platform generated api to initialize iOS plugins 2021-08-06 23:29:09 +03:00
Yuri Sizov
71ec6dba67 Improve Control's theme item methods documentation 2021-08-06 22:31:58 +03:00
Francois Belair
6db17a523e Fix LSP completion crashing on sceneless scripts 2021-08-06 15:31:04 -04:00
Yuri Sizov
974e76a082 Improve the inspector plugin documentation and remove a confusing statement 2021-08-06 21:01:48 +03:00
kleonc
2eeed26d67 TileMap Fix trying to get data for tile not existing in attached TileSet 2021-08-06 18:52:04 +02:00
Yuri Sizov
fcbe5a3fde Add theme item descriptions to the online documentation 2021-08-06 18:20:51 +03:00
Rémi Verschelde
8db0bd4424
OS: Fix used resource debug prints
These methods were broken by 22419082d9
5 years ago and nobody complained, so maybe they're not so useful...
But at least this should restore them to a working state.

(cherry picked from commit 8c3a6b10a9)
2021-08-06 13:24:02 +02:00
31
659b89c615
Fix 'script_class' null access when reloading a deleted C# script
(cherry picked from commit 6fd2edddc0)
2021-08-06 13:03:03 +02:00
Rémi Verschelde
70784f983b
Mono: Remove diagnostics incompatible with 3.x codebase 2021-08-06 12:59:17 +02:00
Ellen Poe
999159c12c
Fix Godot's cubic resampling algorithm
(cherry picked from commit 2d450c6f61)
2021-08-06 11:45:08 +02:00
Ellen Poe
840c0e57fb
Revert "Implement a new resampling algorithm in AudioStreamPlaybackResampled"
This reverts commit b2264cb48b.

(cherry picked from commit 57ccfab5fb)
2021-08-06 11:45:08 +02:00
Francois Belair
1f0fa16a15
Fix LSP parsing get_node only from the scene root
(cherry picked from commit 03f8fa9f62)
2021-08-06 11:45:08 +02:00
Rémi Verschelde
b3c555504f
Improve documentation and simplifies code for File::get_csv_line()
Also forbids using double quotes as a delimiter.

(cherry picked from commit b8c08ba5ad)
2021-08-06 11:13:43 +02:00
Hugo Locurcio
5497405cf7
Change the editor update spinner color when updating continuously
Updating continuously should only be enabled for troubleshooting
purposes, as it uses a lot of CPU/GPU power.

The update spinner is now displayed in red when the Update Continuously
editor setting is enabled.

(cherry picked from commit a97c5b50db)
2021-08-06 11:10:48 +02:00
Raul Santos
332e31260e
Reduce C# Dictionary internal calls
- Implements new `KeyValuePairs` and `KeyValuePairAt` internal calls
to get the `key` and the `value` in one call.
- Caches the `DictionaryEntry` to reuse properties without repeating
internal calls.

(cherry picked from commit 2deefd938f)
2021-08-06 11:10:04 +02:00
Raul Santos
ca32c18458
Add documentation to Dictionary in C#
Adds documentation to `Godot.Collections.Dictionary` in C#.

(cherry picked from commit 0669ffcd15)
2021-08-06 11:09:56 +02:00
Rémi Verschelde
320579b9fd
Merge pull request #51246 from lawnjelly/portals_hull_editor
Portals - add gizmo handles for editing portals and rooms
2021-08-06 09:04:52 +02:00
lawnjelly
770d9f8220 Portals - add gizmo handles for editing portals and rooms
Gizmo handles are added for much more user friendly editing of portals and room bounds.
2021-08-06 07:53:22 +01:00
Rémi Verschelde
93ff6e790b
Merge pull request #51287 from Calinou/x11-software-opengl
Point at software OpenGL when OpenGL fails to initialize on X11
2021-08-05 19:38:25 +02:00
Hugo Locurcio
8fbdcb6fea
Point at software OpenGL when OpenGL fails to initialize on X11 2021-08-05 18:24:42 +02:00