1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00
Commit Graph

72013 Commits

Author SHA1 Message Date
Grublady
b7952c3f01 Swap Nintendo face buttons on macOS
(cherry picked from commit cdcee78fcb)
2025-03-12 14:59:03 +01:00
David Snopek
fc1ef0b639 OpenXR: Fix OpenGL version warning when using GLES
(cherry picked from commit 6353386241)
2025-03-12 14:59:03 +01:00
Frank Becker
d624c8e420 Fix gles3 gaussian_blur mipmap setup.
Extend max level to include i for writing and so fb is complete and avoid resulting errors like:
"Framebuffer is incomplete: Attachment level is not in the [base level, max level] range".

(cherry picked from commit e9bbe6fc78)
2025-03-12 14:59:03 +01:00
Matias N. Goldberg
89b1f3bc52 Fix uninitialized value in Tonemap
And anything that uses luminance.

The class Luminance in luminance.cpp is in charge of averaging the
luminance of all pixels.
It performs multiple passes until it reaches a 1x1 texture containing
the total average. This is standard luminance averaging on GPU.

Then the "result" of this frame and the "prev_frame_result" are averaged
together at a certain speed to mimic eye adaptation.

Then this avarege becomes the "source" for the next frame. This is done
here:

```cpp
SWAP(p_luminance_buffers->current,
p_luminance_buffers->reduce.write[p_luminance_buffers->reduce.size() -
1]);
```

So far pretty normal stuff.

**The problem is: prev_frame_result IS UNINITIALIZED**. Therefore it's
possible for prev_frame_result to contain garbage values like -5+e15
which causes the screen to stay black for a minute until eye adaptation
catches up.

Windows will always force allocations to be reset to 0, but Linux does
not do that.
However Windows just delays the bug; because it's possible for VMA to
reuse a block.

You can repro this bug by downloading Bistro, creating a camera,
selecting a default scene; and then launching Bistro.

Everything will work fine.
Until you decide to resize the window. It takes a few tries on Godot,
but eventually the screen becomes black.

If you wait around a minute, the screen will "unblack" itself back to
normal.

Even if it's not stuck in black after resize, you may notice that every
resize is inconsistent in how the eye adaptation catches up (i.e.
sometimes it flashes to white, sometimes it does not).

If you can't repro the bug, you need to try harder by doing arbitrary
resizes until it triggers.
Also, I advise to try this on Linux; since Windows' sanitization of
memory gets in the way.

There's probably multiple tickets already filled around issues that were
rooted in luminance calculations starting from uninitialized memory.

This PR sets a default value of 0, which causes the screen to always
flash white after resize. Setting a different value like 0.1 makes the
flash effect weaker. Setting it to a high value like 5.0 makes the
screen flash from dark instead.

This bug can be backported to 4.3. I don't know if it can be backported
to earlier; as the render graph makes sure the texture_clear() calls
gets issued in the right place; whereas in <= 4.2 it might be
problematic depending on when Luminance::LuminanceBuffers::configure is
being called.

(cherry picked from commit 8888f9e649)
2025-03-12 14:59:03 +01:00
kleonc
2ea417648b Fix 2D quad primitive missing lighting data in GLES3 renderer
(cherry picked from commit b3769129cb)
2025-03-12 14:59:03 +01:00
Orange Anvil Games
1f6bdf8e91 fix voxelizer normals
(cherry picked from commit 0c57232f78)
2025-03-12 14:59:03 +01:00
kleonc
230f2f8fbe Use Viewport's default texture filter/repeat in GUI tooltips
(cherry picked from commit 91170d0a30)
2025-03-12 14:59:03 +01:00
Matias N. Goldberg
34ed66ec1a Add ASTC HDR format variants
(cherry picked from commit fcd785ace2)
2025-03-12 14:59:03 +01:00
Pāvels Nadtočajevs
14d7775217 [Linux/BSD] Offload RenderingDevice creation test to subprocess.
(cherry picked from commit 6ed12bfc5d)
2025-03-12 14:59:03 +01:00
Raul Santos
f045c4c283 [.NET] Use ObjectID when converting Variant to GodotObject
(cherry picked from commit bfcc389e21)
2025-03-12 14:59:02 +01:00
Fredia Huya-Kouadio
bdf4f38ac4 Fix Android mouse capture issues
- Allow mouse capture to be enabled in `_ready`
- Update the input handler logic to avoid dropping mouse captured motion events

(cherry picked from commit bea6472ea4)
2025-03-12 14:59:02 +01:00
Rémi Verschelde
69faae9b36 Android: Fix build with disable_3d
Fixes #103516.

(cherry picked from commit a7dd4ad5f8)
2025-03-12 14:59:02 +01:00
Alex
0461469113 Fix crash after changing device language
The app was restarting unexpectedly due to missing configChanges flags.
Added "locale|layoutDirection" to AndroidManifest.xml to prevent activity recreation.

(cherry picked from commit 1c02316365)
2025-03-12 14:59:02 +01:00
Matias N. Goldberg
2bf9dc71da Update to latest version of Swappy
Fixes #103294

(cherry picked from commit 89ea5b3d00)
2025-03-12 14:59:02 +01:00
David Snopek
b734db834a JavaClassWrapper: Fix conversion to/from org.godotengine.godot.Dictionary that regressed
(cherry picked from commit f52b2e4db4)
2025-03-12 14:59:02 +01:00
David Snopek
9abd46f1d1 JavaClassWrapper: Fix converting returned arrays to Godot types
(cherry picked from commit bbc66056a8)
2025-03-12 14:59:02 +01:00
David Snopek
ab700d0e18 JavaClassWrapper: Improve handling of typed array arguments
(cherry picked from commit d7672128b5)
2025-03-12 14:59:02 +01:00
yesfish
33e0265985 Fix 2D instance params crashing using outside of main()
(cherry picked from commit 93bc18f2b0)
2025-03-12 14:59:02 +01:00
Jamie Pate
38f4c278f5 Fix check for is_maximized in x11 to require both horizontal and vertical
Fixes #103522

Persistent window state doesn't work if your window is 'tiled' in X11
gnome

3.x checks for `horz && vert`
4396e98834/platform/x11/os_x11.cpp (L1708)

4.x also checked `horz && vert` until this change where it was switched
to `horz || vert`
524f061c01 (diff-05f85bc3bf96d384f6b96260c758e63e10bbdd52b04f8ccb34649372e7bc1f48R1382)

The corrected logic is:
Check `horz && vert` for 'is_maximized'
Check `horz || vert` for 'can_maximize'

(cherry picked from commit 4f14f722b8)
2025-03-12 14:59:02 +01:00
Pāvels Nadtočajevs
275f6317b6 [iOS export] Restore one-click deploy device enumeration using Xcode.
(cherry picked from commit 4187c48a15)
2025-03-12 14:59:02 +01:00
Matias N. Goldberg
68d1e1052b Fix incorrect parameters passed to VMA
If the allocation is small enough that it enters the

if (p_size <= SMALL_ALLOCATION_MAX_SIZE) {} block, Godot would call
vmaFindMemoryTypeIndexForBufferInfo with the wrong parameters.

This can cause vmaFindMemoryTypeIndexForBufferInfo to potentially
misbehave on some cards or drivers.

Fixes regression introduced in #102830
Might potentially reopen #101850 (I doubt it, but it's possible)

Must be backported to 4.4

(cherry picked from commit c543c5615c)
2025-03-12 14:59:02 +01:00
Pāvels Nadtočajevs
56ba35a431 [Windows] Fix get_modified_time on locked files.
(cherry picked from commit 6597fa24a9)
2025-03-12 14:59:02 +01:00
kobewi
14992b1341 Update script modified times when saved in EditorNode
(cherry picked from commit dade8bd66f)
2025-03-12 14:59:02 +01:00
Raul Santos
10b2b76347 [.NET] Skip re-saving .csproj when TFM is unchanged
Avoids updating the platform-specific `TargetFramework` properties if they already match the minimum required version.

(cherry picked from commit 57d5b664d3)
2025-03-12 14:59:02 +01:00
Hugo Locurcio
40e3cec9e0 Use more efficient sleep approach on Windows when low-processor mode is enabled
This aims to fix the idle CPU utilization regression from 4.3 to 4.4
by reverting to the previous approach, but only when low-processor mode
is enabled.

(cherry picked from commit 03b4e0dd58)
2025-03-12 14:59:02 +01:00
Hilderin
ccb325f0bc Fix headless import always emits errors
(cherry picked from commit dba92c9354)
2025-03-12 14:59:02 +01:00
Haoyu Qiu
b3caec15f5 Set editor's translation domain at root node
(cherry picked from commit 7c8f81f1d0)
2025-03-12 14:58:58 +01:00
Pāvels Nadtočajevs
9e5292c6cf Use separate WorkThreadPool for shader compiler.
(cherry picked from commit 53bb897458)
2025-03-12 12:22:46 +01:00
David Snopek
edc357633f CI: Use correct godot-cpp branch
(cherry picked from commit 70bace7482)
2025-03-12 12:14:47 +01:00
Rémi Verschelde
30b0aadab6 Bump version to 4.4.1-rc 2025-03-03 18:21:20 +01:00
Rémi Verschelde
4c311cbee6 Bump version to 4.4-stable \o/
Another massive release with close to 3000 commits (excluding merge commits),
with a big focus on improvements to the overall workflow and usability of the
editor.

Engine features didn't want to be left out amidst this usability focus though,
and this release is absolutely feature-packed in all areas.

See the release page for details: https://godotengine.org/releases/4.4/

More than 500 contributors were involved in this new feature release,
and we want to thank them all for their amazing contributors, as well
as all users who sponsor the Development Fund, reported bugs, opened
proposals, or supported each other on our community platforms.
4.4-stable
2025-03-03 00:31:23 +01:00
Rémi Verschelde
ddcdbbb9fb Add changelog for Godot 4.4 2025-03-03 00:31:10 +01:00
Rémi Verschelde
fad2e6ded9 i18n: Sync translations with Weblate 2025-03-02 23:23:52 +01:00
Rémi Verschelde
c8d6fdd9a7 Merge pull request #103484 from akien-mga/ci-apt-update
CI: Run `apt install` before installing libxml2-utils, GHA cache got flaky
2025-03-02 22:57:37 +01:00
Rémi Verschelde
826a0354fb CI: Run apt install before installing libxml2-utils, GHA cache got flaky 2025-03-02 22:34:34 +01:00
Rémi Verschelde
dc128dddb6 Merge pull request #103467 from KoBeWi/the_script_you_are_looking_for_is_no_longer_here
Validate custom type script before loading it
2025-03-02 22:08:21 +01:00
Rémi Verschelde
d57296f850 Merge pull request #103439 from Hilderin/fix-autoloaded-scene-loses-built-in-script-when-upgrading-to-4.4
Fix autoloaded scene loses their built-in script when upgrading to 4.4
2025-03-02 22:08:18 +01:00
Rémi Verschelde
64456e7dd4 Merge pull request #103436 from Hilderin/fix-invalid-embedded-game-location-size
Fix invalid startup embedded game location and size after resizing editor main area
2025-03-02 22:08:14 +01:00
Rémi Verschelde
86f7821e5e Merge pull request #103391 from timothyqiu/doc-fixes
Fix various typos in the class reference
2025-03-02 22:08:08 +01:00
kobewi
cc2649acdb Validate custom type script before loading it 2025-03-02 14:55:30 +01:00
Hilderin
0c9caccb33 Fix invalid startup embedded game location and size after resizing editor main area 2025-03-02 06:22:02 -05:00
Hilderin
847c2577ab Fix autoloaded scene loses their built-in script when upgrading from 4.3 to 4.4 2025-03-01 12:33:14 -05:00
Haoyu Qiu
a79076c5b1 Fix various typos in the class reference 2025-02-28 17:58:06 +08:00
Rémi Verschelde
15ff450680 Merge pull request #103371 from m4gr3d/add_checks_for_game_menu_utils_jni
Add checks to prevent crashes when accessing the GameMenu api
2025-02-28 01:12:11 +01:00
Fredia Huya-Kouadio
7fb37a088b Add checks to prevent crashes when accessing the GameMenu api
This should address crashes reported on the Play store. Note that those crashes lack debug symbols which reduces our ability to narrow down the exact cause of the crash. We aim to resolve that in Godot 4.5.
2025-02-27 13:20:23 -08:00
Rémi Verschelde
33a15a12b1 Merge pull request #103370 from m4gr3d/inform_android_sensors_mobile_vr
Inform that Android sensors must be enabled for MobileVR support
2025-02-27 22:17:07 +01:00
Rémi Verschelde
c01b9de703 Merge pull request #103364 from akien-mga/input-deadzone-ui-0.5
Input: Change default deadzone back to 0.5 for `ui_*` actions and axis `pressed` state
2025-02-27 22:17:01 +01:00
Fredia Huya-Kouadio
33a235beb8 Inform that Android sensors must be enabled for MobileVR support 2025-02-27 12:53:57 -08:00
Rémi Verschelde
a9c5c4db71 Merge pull request #103201 from beicause/shaders-only-convert-source-color-linear
Shaders: Only convert default value to linear color if type hint is `source_color`
2025-02-27 19:34:12 +01:00
Rémi Verschelde
1af42620fa Merge pull request #103362 from bruvzg/gds_get_set_bchk
Add bound checks to `Array`/`Packed*Array` variant call `get` and `set` methods.
2025-02-27 18:50:57 +01:00