Commit graph

30856 commits

Author SHA1 Message Date
Rémi Verschelde bf383a31cb
Merge pull request #49314 from madmiraal/fix-48408-3.x
[3.x] Fix multiple issues with CSGPolygon
2021-08-12 11:49:43 +02:00
Morris Tabor fb9685daaa Fix regressions caused by recent particle spread refactor
Caused by https://github.com/godotengine/godot/pull/47310
Fixes https://github.com/godotengine/godot/issues/51043
Fixes https://github.com/godotengine/godot/issues/51424
2021-08-12 11:47:05 +02:00
Marcel Admiraal 2449b581dd Fix multiple issues with CSGPolygon 2021-08-12 09:55:18 +01:00
Rémi Verschelde 9e3e7b03e4
Merge pull request #51376 from The-O-King/vertex_buffer_alignment
Align Vertex Buffer to 4 Bytes
2021-08-12 07:13:45 +02:00
Fabio Alessandrelli dd30944ff3
Merge pull request #51525 from Calinou/hlm-default-enable-compression-3.x
Enable range coder compression by default in NetworkedMultiplayerENet
2021-08-12 01:44:45 +02:00
Hugo Locurcio d0508e5155
Enable range coder compression by default in NetworkedMultiplayerENet
From empirical testing, this seems to provide the best compression
compared to other compression algorithms when used in the
Multiplayer Bomber demo.

Other algorithms may provide better compression ratios for more
complex games, but some compression is probably better than
no compression.

Zstandard was also not very efficient in my testing, so I added
a note in the documentation.
2021-08-11 21:05:37 +02:00
Rémi Verschelde 91cb296a90
Merge pull request #51499 from timothyqiu/navmesh-doc-3x
[3.x] Improve NavigationMesh typing, parameter validation and documentation
2021-08-11 14:13:45 +02:00
Rémi Verschelde 35096325b8
Merge pull request #51495 from lawnjelly/fix_delta_overflow
Delta smoothing - fix overflow for long frames
2021-08-11 12:23:32 +02:00
Haoyu Qiu f4a6737eed Improve NavigationMesh typing, parameter validation and documentation 2021-08-11 18:18:27 +08:00
lawnjelly 3025b6d299 Delta smoothing - fix overflow for long frames
Extremely long frames caused by suspending and resuming the machine could result in an overflow in the delta smoothing because it uses 32 bit math on delta values measured in nanoseconds.

This PR puts a cap of a second as the maximum frame delta that will be processed by the smoothing, otherwise it returns the frame delta 64 bit value unaltered. It also converts internal math to explicitly use 64 bit integers.
2021-08-11 09:47:23 +01:00
Rémi Verschelde 03c41fa34c
Merge pull request #51458 from nekomatata/moving-platforms-3d-3.x
[3.x] Fix 3D moving platform logic
2021-08-10 14:12:47 +02:00
Rémi Verschelde 48faf66228
Merge pull request #51469 from lawnjelly/quickhull_hide_warning 2021-08-10 13:18:28 +02:00
lawnjelly fc60eaccb8 Quickhull - reduce warning spam and make hideable
Added one more warning to the hideable warnings. These seem to be benign warnings and are hidden during use in rooms and portals. When used from other areas, only one warning is displayed per run, instead of for every occurrence.
2021-08-10 12:06:46 +01:00
Rémi Verschelde a9b585dd1a
Fixup doc formatting after #47416 2021-08-10 12:11:30 +02:00
Rémi Verschelde 7c6bdea33c
Merge pull request #47416 from Calinou/add-contrast-adaptive-sharpening-3.x
Add support for contrast-adaptive sharpening in 3D (GLES3 only)
2021-08-10 10:08:24 +02:00
Rémi Verschelde 5116855637
Merge pull request #51439 from Calinou/tonemap-clamp-negative-colors-3.x
Clamp negative colors regardless of the tonemapper to avoid artifacts
2021-08-10 09:56:18 +02:00
Rémi Verschelde dad5d09d1b
Merge pull request #51416 from clayjohn/GLES-horizon-occlusion
[3.x] Add horizon specular occlusion
2021-08-10 09:55:46 +02:00
Rémi Verschelde 6518a61bd4
Merge pull request #51410 from clayjohn/GLES-blinn-phong 2021-08-10 09:52:28 +02:00
Rémi Verschelde ef0dff3f23
Merge pull request #51462 from clayjohn/GLES-Sprite3D-modulate
Allow unclamped colors in Sprite3D
2021-08-10 07:57:19 +02:00
clayjohn f7dbcf95e1 Allow unclamped colors in Sprite3D 2021-08-09 21:44:21 -07:00
clayjohn f92a600d5c Make blinn and phong specular use full pbr 2021-08-09 20:45:14 -07:00
PouleyKetchoupp da159cd258 Fix 3D moving platform logic
Same thing that was already done in 2D, applies moving platform motion
by using a call to move_and_collide that excludes the platform itself,
instead of making it part of the body motion.

Helps with handling walls and slopes correctly when the character walks
on the moving platform.

Also made some minor adjustments to the 2D version and documentation.

Co-authored-by: fabriceci <fabricecipolla@gmail.com>
2021-08-09 18:55:49 -07:00
Rémi Verschelde 0403cb8ad5
Merge pull request #51447 from nekomatata/fix-moving-platform-rotation-3.x
[3.x] Fix applied rotation from moving platforms in move_and_slide
2021-08-09 23:20:35 +02:00
PouleyKetchoupp f101349225 Fix applied rotation from moving platforms in move_and_slide
When synchronizing KinematicBody motion with moving the platform using
direct body state, only the linear velocity was taken into account.

This change exposes velocity at local point in direct body state and
uses it in move_and_slide to get the proper velocity that includes
rotations.
2021-08-09 12:04:57 -07:00
Hugo Locurcio 313527b3fa
Clamp negative colors regardless of the tonemapper to avoid artifacts
Color artifacts could be visible when using negative lights with the
Filmic and ACES tonemapping operators, as these did not clamp negative
colors.
2021-08-09 17:16:27 +02:00
Fabio Alessandrelli feebeb0345
Merge pull request #51434 from Faless/enet/3.x_dtls_hostname
[Net] Add "dtls_hostname" property to ENet.
2021-08-09 17:02:58 +02:00
Fabio Alessandrelli ef43d95897 [Net] Add "dtls_hostname" property to ENet.
Used to specify the expected "CN" in the server certificate if different
from the server address.
2021-08-09 15:50:52 +02:00
Rémi Verschelde a418d09617
Merge pull request #51166 from RandomShaper/fix_can_reset_3.x 2021-08-09 09:19:25 +02:00
Rémi Verschelde d3fc2a4d32
Merge pull request #51401 from Chaosus/shader_fix_specular_mode_3.x
[3.x] Fix a default shader specular render mode to `SCHLICK_GGX`
2021-08-09 08:14:06 +02:00
clayjohn 1065f8dc86 Add horizon specular occlusion 2021-08-08 19:29:02 -07:00
Rémi Verschelde 89313b9ed1
Merge pull request #51403 from lawnjelly/portals_move_settings
Portals - fix PVS generation and move settings
2021-08-09 00:17:13 +02:00
lawnjelly f3e6547a99 Portals - fix PVS generation and move settings
Fixed a bug in the complex PVS generation which was causing recursive loop.
Move some of the settings out of RoomManager into Project Settings.
Allow PVS generation method to be selected from Project Settings, and control PVS logging.
2021-08-08 19:57:27 +01:00
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