Commit graph

29279 commits

Author SHA1 Message Date
Rémi Verschelde
db246f8edb
Merge pull request #46909 from akien-mga/3.2-fix-noisetexture-thread
NoiseTexture: Fix regression in starting thread
2021-03-11 22:19:29 +01:00
Rémi Verschelde
0d8182d2b1 NoiseTexture: Fix regression in starting thread
Was a regression from #45618.

Fixes #46907.
2021-03-11 21:58:53 +01:00
Rémi Verschelde
80d75b966c
Merge pull request #46904 from lawnjelly/ewok_diagnose_more
Batching - more frame diagnose information
2021-03-11 21:13:09 +01:00
Rémi Verschelde
d3dd28ba57
Merge pull request #46896 from lawnjelly/ewok_read_modulate_attribute
Batching - use FINAL_MODULATE_ALIAS in shaders
2021-03-11 21:11:50 +01:00
Rémi Verschelde
8e1c92a365
Merge pull request #46892 from lawnjelly/ewok_scissor_boost
Batching - fix off by one error in light scissoring
2021-03-11 21:11:06 +01:00
lawnjelly
5ed0fd067d Batching - use FINAL_MODULATE_ALIAS in shaders
As part of the improvements to batch more cases, batching can store final_modulate as an attribute in the vertex format rather than sending as a uniform. This allows draw calls with different final_modulate to be batched together.

However custom shader code was reading from only the final_modulate uniform, and not the attribute when it was in use. This was leading to visual errors.

This is tricky to solve, because we cannot use the same name for the attribute in the vertex and fragment shaders, because one is an attribute and one a varying, whereas a uniform is accessible anywhere. To get around this, a macro is used which can translate to the most appropriate variable depending on whether uniform or attribute or varying is required.
2021-03-11 17:07:19 +00:00
lawnjelly
d226cf83d1 Batching - more frame diagnose information
Added slightly more detail to diagnose_frame option. This is helpful for debugging issues.
2021-03-11 16:32:59 +00:00
Rémi Verschelde
dc82fdcd05
Merge pull request #46898 from lawnjelly/ewok_fix_rotation_polarity
Batching - fix basis polarity in large fvf
2021-03-11 16:12:52 +01:00
lawnjelly
f723fa6db9 Batching - fix basis polarity in large fvf
Slight technical hitch, the basis was reversed that was sent to the shader, so rotations were opposite. This PR reverses polarity of the basis to be correct.
2021-03-11 14:26:54 +00:00
Rémi Verschelde
13a57d8cdf
Merge pull request #46891 from godotengine/revert-46409-fix-scale-pivot-jitter
Revert "Fix flicker in control nodes due to pivot offset"
2021-03-11 11:58:18 +01:00
lawnjelly
9b6742346b Batching - fix off by one error in light scissoring
There have been a couple of reports of pixel lines when using light scissoring. These seem to be an off by one error caused by either rounding or pixel snapping.

This PR adds a single pixel boost to light scissor rects to protect against this. This should make little difference to performance.
2021-03-11 10:30:21 +00:00
Rémi Verschelde
b7e06930aa
Revert "Fix flicker in control nodes due to pivot offset" 2021-03-11 11:01:48 +01:00
Rémi Verschelde
9952a5039a
Merge pull request #46827 from lawnjelly/proj_settings_alias
Add GLOBAL_DEF_ALIAS and alias for rename of pixel_snap
2021-03-10 14:41:28 +01:00
Rémi Verschelde
71f3d93966
Merge pull request #46829 from akien-mga/3.2-camera2d-update-on-viewport-resize
Camera2D: Update scrolls when the Viewport is resized
2021-03-10 14:22:11 +01:00
Rémi Verschelde
31cb0f06c0
Merge pull request #46856 from lawnjelly/ninepatch_defaults
Change default ninepatch mode to scaling
2021-03-10 12:14:08 +01:00
lawnjelly
d3930b1af2 Change default ninepatch mode to scaling
Changes default ninepatch mode to preserve compatibility, and renames default mode to 'fixed'.

Also adds an editor restart to changing ninepatch mode and software skinning, which will be more user friendly.
2021-03-10 09:30:23 +00:00
Rémi Verschelde
6e9b1d99e2 Camera2D: Update scrolls when the Viewport is resized
Factored the `viewport`/`custom_viewport` setup code which was used in two
locations to ensure consistency.

Fixes #46826.
2021-03-09 17:17:51 +01:00
lawnjelly
20f7037edb Add GLOBAL_DEF_ALIAS and alias for rename of pixel_snap
Having to rename project settings is rare, but when it does occur it can cause user confusion. In order to make compatibility more seamless this PR introduces two new GLOBAL_DEF functions,

GLOBAL_DEF_ALIAS(new_name, old_name, default)
GLOBAL_DEF_ALIAS_RST(new_name, old_name, default)

These are the same as the existing GLOBAL_DEF functions except that if the new setting is not found, it attempts to load from the old setting name. If the old setting is found, it stores it into the new setting, and then calls the regular GLOBAL_DEF functions.
2021-03-09 15:16:24 +00:00
Rémi Verschelde
64a9e86c5c
Merge pull request #46817 from Ev1lbl0w/bugfix-negative_vram_3.2
Fix negative VRAM values
2021-03-09 14:53:32 +01:00
Rémi Verschelde
20a6bb8509
Merge pull request #46815 from akien-mga/3.2-scons-fix-env-creation
[3.2] SCons: Use default env["ENV"] and prepend PATH to it
2021-03-09 11:20:28 +01:00
Rémi Verschelde
16fbe80dd2
Merge pull request #46802 from Faless/js/3.x_allow_hidpi
[3.2][HTML5] Respect allow_hidpi option during setup
2021-03-09 10:56:21 +01:00
Ev1lbl0w
bae4b0c952
Fix negative VRAM values 2021-03-09 09:51:17 +00:00
Rémi Verschelde
0431241935 SCons: Use default env["ENV"] and prepend PATH to it
This fixes a regression from #46774 where `env["ENV"]` would miss some
important env variables on Windows, such as `SystemRoot`, `PATHEXT`, etc.

So we go back to the previous setup (letting SCons initialize `env["ENV"]`
as it sees fit for the host OS) but use `PrependENVPath` instead of
`AppendENVPath` to preserve the intended fix from #46774.

Fixes #46790 for 3.2.
2021-03-09 09:39:43 +01:00
Rémi Verschelde
f79b8474ab
Merge pull request #46809 from likeich/fix_inertia_bug_3.2
[3.2] Fixes division by zero when 3d body does not have valid shape
2021-03-09 09:38:48 +01:00
Kyle
1c208d6baa Fixes division by zero when 3d body does not have valid shape (3.2 only)
Fixes #46738 by setting the default inertia to a valid value when there are no valid shapes for a 3d body.
2021-03-08 20:32:16 -05:00
Fabio Alessandrelli
758daab3ad [HTML5] Respect allow_hidpi option during setup
The option was forced to `true` before, unlike on other platforms.
2021-03-08 23:35:10 +01:00
Rémi Verschelde
0ddba5b712
Merge pull request #44323 from Calinou/doc-spatialmaterial-depth-no-triplanar
Document that SpatialMaterial doesn't support depth mapping + triplanar
2021-03-08 19:41:21 +01:00
Rémi Verschelde
dc99f04d51 Update AUTHORS and DONORS list
New contributor added to AUTHORS:
@Ev1lbl0w

Thanks to all contributors and donors for making Godot possible!

(cherry picked from commit b3506bc63b)
2021-03-08 17:41:14 +01:00
Rémi Verschelde
f1f472439e i18n: Sync translations with Weblate 2021-03-08 17:40:29 +01:00
kobewi
e9e0cac3f5 Allow to save override.cfg with ProjectSettings
(cherry picked from commit 156c402f2b)
2021-03-08 17:40:22 +01:00
Angad Kambli
144749c31b use collision mask in vehicle raycast
(cherry picked from commit bfc533fc4c)
2021-03-08 17:40:22 +01:00
nemerle
bd15558768 fix incorrectly connected optimize_dialog signal
(cherry picked from commit 7bbacb5ff6)
2021-03-08 17:37:13 +01:00
gatalskii
f60d27fe16 mod: pop-up usability enhancement for support button
Now after choosing support level pop-up doesn't hide after each click

(cherry picked from commit efe05a166e)
2021-03-08 17:37:13 +01:00
Hugo Locurcio
266282813a Make the pagination buttons wider in the asset library browser
This makes the page number buttons easier to click.

(cherry picked from commit 25c6acb702)
2021-03-08 17:37:13 +01:00
Rémi Verschelde
fd5966af64
Merge pull request #46797 from Faless/js/3.x_pwa_simple
[3.2][HTML5] Add PWA support to the editor page.
2021-03-08 17:29:57 +01:00
Fabio Alessandrelli
d942d553ef [HTML5] Add PWA support to the editor page.
This allows to install it as an app, and provide offline support (after
the first run).
Practically, this boils down to adding a JSON file as a manifest, an
offline page to be displayed when the cached files are not avaialble,
and a JS file to cache resources and return them.

The reason for the "first run requirements" is that some browsers, will
emit an "install" by just visiting the page (to see if the JS code is
compatibile), and we do not want to force casual visitors to just
download the 10 MiB+ compressed editor WebAssembly file without pressing
the start button.

Special thanks to Hugo Locurcio (Calinou) for the initial work.
2021-03-08 17:06:41 +01:00
Fabio Alessandrelli
9028b7a095 [HTML5] Catch audio worklet errors on disconnect.
Which could happen if the worklet was not fully loaded, or the audio
context had already aborted.
2021-03-08 17:06:41 +01:00
Rémi Verschelde
9c30f70f64
Merge pull request #46794 from akien-mga/3.2-linux-fix-detect_prime-steam
[3.2] Linux: Fix PRIME detection on Steam
2021-03-08 16:30:09 +01:00
Rémi Verschelde
0e0d73c011
Merge pull request #46694 from JFonS/fix_directional_disabling
[3.2] Various light culling fixes
2021-03-08 16:17:43 +01:00
Rémi Verschelde
03dda90ddd Linux: Fix PRIME detection on Steam
To avoid trying to do PRIME detection on fake `libGL.so` as used by e.g.
Renderdoc or Primus, we skip detection if there's a `libGL.so` in
`LD_LIBRARY_PATH`... and our luck is that Steam defines it and includes
system paths too, thus the actual system `libGL`... 🤦

So if we detect Steam, we skip this check.

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>

(cherry picked from commit 562b1cd2cda2098e62c7501dae87393def99c23a)
2021-03-08 16:03:24 +01:00
JFonS
f24f582ba5 Various light culling fixes
GLES3 changes:
This commit makes it possible to disable 3D directional lights by using
the light's cull mask. It also automatically disables directionals when
the object has baked lighting and the light is set to "bake all".

GLES2 changes:
Added a check for the light cull mask, since it was previously ignored.
2021-03-08 15:10:55 +01:00
Rémi Verschelde
118567ca28
Merge pull request #46657 from lawnjelly/revert_snapping
Revert backport of 2D transform and camera snapping options
2021-03-08 14:49:41 +01:00
Rémi Verschelde
3fafaf2cf2
Merge pull request #46717 from lawnjelly/camera_process
Improve process logic in Camera2D
2021-03-08 14:42:08 +01:00
lawnjelly
8763d891fe Improve process logic in Camera2D
The logic for internal process and internal physics process in Camera2D was very buggy and convoluted for historical reasons.

This is a cleanup to make the logic simpler and easier to follow.
2021-03-08 13:29:19 +00:00
Rémi Verschelde
6b48fce2b5 SCons: Fix parsing PATH when constructing base environment
We constructed the SCons environment without taking any (shell) environment
variables into account, and then appended a few, but too late. This would
cause variables like `env[CXX]` not to be properly expanded to respect a
non-standard `PATH`.

With this fix, setting:
```
PATH=$GODOT_SDK/bin:$PATH
```
will now properly use `$GODOT_SDK/bin/gcc` if available over `/usr/bin/gcc`.

(cherry picked from commit 5d217a9441)
2021-03-07 22:51:33 +01:00
Pedro J. Estébanez
8be3995efa Fix crash on cleanup of EditorFileServer
(cherry picked from commit 565796518d)
2021-03-07 22:51:06 +01:00
Rémi Verschelde
2e9c6a5129 Link to Godot Contributors Chat instead of IRC
(cherry picked from commit 848f3bba7c)
2021-03-07 22:51:06 +01:00
kobewi
bc56681b0b Don't save unchanged script upon closing
(cherry picked from commit 12f5a5a701)
2021-03-07 22:51:06 +01:00
Duddino
aabb8d78ef Added some checks to prevent accessing a null collider
Previously godot would try to access
`CollisionObjectBullet::bt_collision_object` even if it was null.
Fixes #46651

(cherry picked from commit c47070e165)
2021-03-07 22:51:06 +01:00
kobewi
749892c9fc Release mouse when SpinBox leaves scene tree
(cherry picked from commit 83f6c6b360)
2021-03-07 22:51:06 +01:00