If user try to use a global shader variable in a fog type shader we are getting shader error. The reason of this there is a typo in the fog.cpp. I other well working shaders types like sky the "action.global_buffer_array_variable" is "global_shader_uniforms.data".
The investigation tracked here:
https://discord.com/channels/212250894228652034/1158918161337434172
(cherry picked from commit e906eb8433)
An NVIDIA profile is applied to the current executable to disable
threaded OpenGL optimizations on Windows (see #71472). But because the
application is only added to the profile upon the profile creation,
newer executables won't be added to the profile (e.g. if the profile is
created on first launch of Godot_v4.1-stable_win64.exe, when users
update the editor and launch Godot_v4.2-stable_win64.exe, the profile
will never be applied to this new executable).
This patch fixes that scenario by splitting creating the profile (if it
doesn't exist) and adding the application (if it doesn't have a profile
applied) into two separate steps.
Applications that have been manually added to a different profile aren't
overriden to avoid confusing users who know what they're doing.
(cherry picked from commit 6263774aec)
The UI was extending past the screen width when loading a page diplaying
a plugin with an especially long title in the asset store plugin.
I implemented a new `EditorAssetLibraryItem::clamp_width` method that
checks that the title text is not longer than the column width minus
some padding and truncates it if it is.
I also noticed that the nav buttons for paginated results were causing the UI to extend past
the screen width on higher editor scales since they were hardcoded to
show ten page buttons if there were enough results. I modified the
pagination slightly to display a dynamic number of nav buttons based on
the editor scale in order to fix this other cause of the same problem.
I had to use the font of the `title`, which is a `LinkButton` in order
to determine the text width, so I added a public getter `get_button_font` to the `LinkButton` class.
(cherry picked from commit d63a88bef1)
Typing a single or double quote in an external editor triggers
auto-completion. The returned CompletionItem should not include
quotes since they're already in the editor.
CompletionParams was missing context in to_json() and this is
required to detect whether a quote was typed.
(cherry picked from commit 7ea4247c3d)
Upstreams the fix from #73310, so we can remove that patch.
Remove `infback.c` which we stopped compiling after #79273.
The `OF` macro was also removed so I can drop the patch where I yell
at Gentoo developers.
(cherry picked from commit e0e1f2e4a2)
This fixes multiple issues/inconsistencies around `get_compiler_version()`:
* With no shell allocated, launching the compiler could fail even
with proper paths being set.
* The return value was described as "an array of version numbers as ints",
but the function actually returned a `Dictionary` (or `None`).
* Not all calls were properly handling a `None` return value in case of errors.
On Windows this broke compiling for me since #81869 with default settings.
* Some calls defined inconsistent defaults/fallbacks (`0` or `-1`).
(cherry picked from commit 426e18fd37)
For FORMAT_XXXH half-precision format constants, the description uses GL_XXX32F, which is incorrect.
This fixes it to GL_XXX16F to align with the intended precision.
(cherry picked from commit 4a2de1e17a)
TAA + MSAA would make Godot request unnecessary flags for an MSAA
velocity texture. flags that were not even actually needed.
This was causing:
1. Unsupported GPUs to fail completely (e.g. Intel Arc 770)
2. Wrong codepaths to be followed (causing validation errors, possibly
crashes or glitches)
3. Unnecessary performance impact in all GPUs.
See
https://github.com/godotengine/godot/issues/71929#issuecomment-1722274359
(cherry picked from commit 4de0ed4adf)
When a hardware keyboard is connected, all key events come through so we can route them directly to the engine.
This is not the case for soft keyboards, for which the current logic was designed as it requires extra processing.
(cherry picked from commit 87102e358d)
PCK files (like other build products) should be deterministic based on their inputs. Removed calls to Math::rand() that are being used to generate padding.
Looks like these were introduced as part of adding encryption support, but the padding being random does not have any cryptographic significance. This can be trivially inferred since file blocks that happen to be aligned don't get padding anyway.
If there's a desire to indroduce something that functions as a nonce it should probably be added explicitly and only if encryption is enabled.
remove Math::rand() calls in editor_export_platform.cpp
follow up to make consistent with pck_packer
(cherry picked from commit 067807c1cb)
- There's no implicit conversion from `double` to `int`, a cast was missing.
- The example about literals in GDScript also applies to C# (with the same syntax even).
(cherry picked from commit 0897a795c3)
This prevents the estimation from being extremely high (close to 100,000 FPS)
until enough time has passed to display an accurate estimation.
(cherry picked from commit 15b31f0891)