Commit Graph

4323 Commits

Author SHA1 Message Date
Thaddeus Crews
88a48d52f0
Merge pull request #98801 from zeux/my-final-form
Rewrite index optimization code for maximum efficiency
2024-11-05 18:36:13 -06:00
Thaddeus Crews
6cef0a17fb
Merge pull request #98571 from timothyqiu/pname-no-editor
Don't mark `PROPERTY_USAGE_NO_EDITOR` properties for translation
2024-11-05 18:36:10 -06:00
Thaddeus Crews
2450dee1bc
Merge pull request #93401 from Repiteo/style/clang-tidy-fixes
Style: Apply `clang-tidy` fixes
2024-11-04 21:52:05 -06:00
Thaddeus Crews
11b90086b7
Merge pull request #96705 from elmajime/camera_from_external_feed
Add support for external camera feed from external plugin on Android
2024-11-04 21:51:50 -06:00
Thaddeus Crews
bb5f390fb9
Style: Apply clang-tidy fixes (superficial)
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06:00
Thaddeus Crews
89a311205f
Style: Apply clang-tidy fixes
• `modernize-use-default-member-init` and `readability-redundant-member-init`
• Minor adjustments to `.clang-tidy` to improve syntax & remove redundancies
2024-11-04 12:11:06 -06:00
Arseny Kapoulkine
260287b3a1 Rewrite index optimization code for maximum efficiency
While all the previous fixes to optimizeVertexCache invocation fixed the
vertex transform efficiency, the import code still was missing two
crucial recommendations from meshoptimizer documentation:

- All meshes should be optimized for vertex cache (this reorders
  vertices for maximum fetch efficiency)
- When LODs are used with a shared vertex buffer, the vertex order
  should be generated by doing a vertex fetch optimization on the
  concatenated index buffer from coarse to fine LODs; this maximizes
  fetch efficiency for coarse LODs

The last point is especially crucial for Mali GPUs; unlike other GPUs
where vertex order affects fetch efficiency but not shading, these GPUs
have various shading quirks (depending on the GPU generation) that
really require consecutive index ranges for each LOD, which requires the
second optimization mentioned above. However all of these also help
desktop GPUs and other mobile GPUs as well.

Because this optimization is "global" in the sense that it affects all
LODs and all vertex arrays in concert, I've taken this opportunity to
isolate all optimization code in this function and pull it out of
generate_lods and create_shadow_mesh; this doesn't change the vertex
cache efficiency, but makes the code cleaner. Consequently,
optimize_indices should be called after other functions like
create_shadow_mesh / generate_lods.

This required exposing meshopt_optimizeVertexFetchRemap; as a drive-by,
meshopt_simplifySloppy was never used so it's not exposed anymore - this
will simplify future meshopt upgrades if they end up changing the
function's interface.
2024-11-04 06:58:06 -08:00
Michael Alexsander
58e79bfa9a
Compile certain CanvasItem._edit_*() functions with DEBUG_ENABLED 2024-11-02 15:43:18 -03:00
Thaddeus Crews
7982030b25
Merge pull request #69197 from aaronfranke/fix-tiny-convex
Fix debug line drawing with tiny convex hull mesh colliders
2024-10-31 20:14:37 -05:00
Yuri Rubinsky
ef8d981267
Merge pull request #98303 from Chaosus/vs_transparency_preview
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
Add alpha channel display to vec4 previews of visual shader nodes
2024-10-31 11:17:34 +03:00
Clay John
7187c251da
Merge pull request #98620 from zeux/lodgen-cleanup
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
LOD: Remove "Raycast Normals" and associated "Normal Split Angle" settings
2024-10-30 17:13:57 -07:00
maxime.chambefort
6f846eb5c5 Added external camera feed from external plugin on Android 2024-10-30 18:30:28 +01:00
Aaron Franke
96ec117d19
Fix debug line drawing with tiny convex hull mesh colliders 2024-10-30 00:47:56 -07:00
Thaddeus Crews
b7a0971ad2
Merge pull request #97934 from adamscott/give-AThousandShips-a-break
[Codestyle] Set clang-format `RemoveSemicolon` rule to `true`
2024-10-29 19:25:36 -05:00
Arseny Kapoulkine
494fe2fe21 LOD: Remove "Raycast Normals" and associated "Normal Split Angle" settings
"Raycast Normals" was introduced in 4.4 dev and defaulted to "false".
The limited testing results at the time suggested that raycasting
generally reduces normal quality compared to native simplifier results,
at the same time increasing vertex memory and import time.

To play it safe, we introduced a setting that defaulted to false, with
the goal of removing it later in 4.4 development cycle if no regressions
are noticed. Since we already had three dev snapshots and no reports,
this change removes the setting and associated code.

"Normal Split Angle" was only used when raycast normals were enabled;
this change removes it from the settings, but keeps it in the script
binding for compatibility.

Existing meshes import exactly the same after this change (unless they
chose to override raycasting which would be surprising).

split_normals helper was only used in this code path and is also removed
for simplicity; it is unlikely that this code will be useful as is, as
it can only regenerate normals without fixing tangents or updating
positions.
2024-10-28 10:14:04 -07:00
Clay John
9d3b879219
Merge pull request #98529 from zeux/meshopt-22
Update meshoptimizer to 0.22
2024-10-27 19:09:50 -07:00
Arseny Kapoulkine
e2cc0e484e Update meshoptimizer to 0.22
The Godot-specific patch is just a single line now; removing this patch
will likely require adjusting Godot importer code to handle error limits
better.

This also adds new SIMPLIFY_ options; Godot is currently not using any
of these but might use SIMPLIFY_PRUNE and SIMPLIFY_SPARSE in the future.
2024-10-26 07:26:07 -07:00
Haoyu Qiu
d47425b35f Don't mark PROPERTY_USAGE_NO_EDITOR properties for translation
Using `PNAME()` on these properties are redundant as they won't be displayed
in the editor and some of them will be automatically ignored by the
extraction script.
2024-10-26 22:09:21 +08:00
Thaddeus Crews
2c87cb601f
Merge pull request #98477 from Calinou/styleboxflat-corner-radius-increase-range-hint
Increase range hint for StyleBoxFlat `border_width`, `corner_radius` and `expand_margin`
2024-10-25 13:03:54 -05:00
Adam Scott
0d350e7108
Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
Clay John
e952651f89
Merge pull request #98293 from timothyqiu/emptiness-is-indeed-form
Fix error when undo tile deletion in TileSetAtlasSourceEditor
2024-10-24 20:41:39 -07:00
Thaddeus Crews
e3751721af
Merge pull request #98451 from RandomShaper/ext_text_err
ExternalTexture: Avoid error when destroyed without having been used
2024-10-24 13:22:38 -05:00
Hugo Locurcio
ad24dd4ba2
Increase range hint for StyleBoxFlat border_width, corner_radius and expand_margin 2024-10-24 01:21:40 +02:00
Pedro J. Estébanez
98b8beddc5 ExternalTexture: Avoid error when destroyed without having been used 2024-10-23 10:04:38 +02:00
Thaddeus Crews
a4ed24acef
Merge pull request #98041 from Hilderin/fix-lost-gdextensions-on-startup
Fix loss of gdextension on editor startup
2024-10-21 16:39:30 -05:00
Thaddeus Crews
7a438dc72e
Merge pull request #97205 from tetrapod00/inspect-native-shader-code
Add "Inspect Native Shader Code" to shader inspector and shader editor
2024-10-21 16:39:13 -05:00
Hilderin
fbd1643176 Fix lost of gdextension on editor startup.
Co-authored-by: NetroScript <noreply@enostrion.com>"
2024-10-20 18:39:31 -04:00
Chaosus
43a99fba3d Add alpha channel display to vec4 previews of visual shader nodes 2024-10-18 20:00:10 +03:00
Haoyu Qiu
5adb489a04 Fix error when undo tile deletion in TileSetAtlasSourceEditor 2024-10-18 20:06:31 +08:00
Thaddeus Crews
3fcbb1d436
Merge pull request #97770 from tdaven/fix-94151
Fix immediate mesh modifications that don't call set_mesh
2024-10-14 14:09:56 -05:00
tetrapod00
12d2c05936 Add "Inspect Native Shader Code" to shader resource and shader editor 2024-10-08 11:02:45 -07:00
kobewi
b9d25580ce Fix implementation of property_can_revert() in various classes 2024-10-04 23:02:04 +02:00
bruvzg
794920b1ff
Partially revert 96780, remove warnings from project/editor settings _get. 2024-10-04 19:13:03 +03:00
Rémi Verschelde
6c15d59154
Merge pull request #97362 from reduz/make-unique-scene-id-deterministic
Make internal unique scene resource ID deterministic
2024-10-04 17:18:10 +02:00
Trevor Davenport
47f75547ce Fix immediate mesh modifications that don't call set_mesh
Mesh_instance_2d has no way to know when the mesh had been modified
unless you called set_mesh.  This meant that you could modify the
underlying mesh without it knowing which could result in incorrect
result.

Modified mesh_instance_2d to be more similar to mesh_instance_3d which
connects to the changed signal of the mesh and reacts occordingly.
2024-10-03 18:08:49 -06:00
Dario
e2c6daf7ef Implement asynchronous transfer queues, thread guards on RenderingDevice. Add ubershaders and rework pipeline caches for Forward+ and Mobile.
- Implements asynchronous transfer queues from PR #87590.
- Adds ubershaders that can run with specialization constants specified as push constants.
- Pipelines with specialization constants can compile in the background.
- Added monitoring for pipeline compilations.
- Materials and shaders can now be created asynchronously on background threads.
- Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
2024-10-02 15:11:58 -03:00
Rémi Verschelde
eaac033168
Merge pull request #94240 from MewPurPur/optimize-styleboxflat
Optimize `StyleBoxFlat.draw()`
2024-10-01 17:30:24 +02:00
Rémi Verschelde
41ffc696d2
Merge pull request #93449 from Calinou/basematerial3d-refraction-use-depth-comparison
Fix BaseMaterial3D refracting objects located in front of the material
2024-10-01 17:30:20 +02:00
chocola-mint
ed13a840fa Add markers to animation 2024-09-29 17:27:36 +09:00
MewPurPur
71ac6b7476 Optimize StyleBoxFlat.draw() 2024-09-28 12:37:31 +03:00
Rémi Verschelde
8a9a26ef19
Merge pull request #93311 from dsnopek/gdextension-required-virtuals
GDExtension: Mark virtual function as `is_required` in `extension_api.json`
2024-09-27 13:53:16 +02:00
Rémi Verschelde
56d50c30a2
Merge pull request #97414 from AThousandShips/code_highlight_fix
Fix editing of some properties in `CodeHighlighter`
2024-09-26 18:45:38 +02:00
Rémi Verschelde
8eab2b52ed
Merge pull request #96835 from Malcolmnixon/animation-optimize
Expose the optimize method of the Animation class to gdscript.
2024-09-26 18:45:15 +02:00
Hugo Locurcio
8a485ff658
Fix BaseMaterial3D refracting objects located in front of the material
Depth comparison is now used to prevent refraction from occurring
if the pixel being refracted is located in front of the object.

For pixels slightly behind the object, a `smoothstep()` curve
is used to progressively increases refraction intensity
as the distance between the object and the refraction increases.
This avoids sudden discontinuities in the refraction.

Co-authored-by: GeneralLegendary <generallegendary456@gmail.com>
2024-09-26 15:12:31 +02:00
matheusmdx
3e0d3c433b Fix pink GradientTexture2D 2024-09-26 09:50:55 -03:00
Thaddeus Crews
9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Rémi Verschelde
4c5e879cc5
Merge pull request #97380 from TheSofox/handle_modes_default_fix
Ensure `handle_modes` is given default values rather than flagging error if undefined
2024-09-25 12:39:22 +02:00
Rémi Verschelde
65c94ec873
Merge pull request #97290 from fire/fix-animation-compression
Fix animation compression going the wrong way
2024-09-25 12:39:18 +02:00
Paweł
b88585abfc Add linux camera support 2024-09-25 12:08:06 +02:00
A Thousand Ships
56f095296c
Fix editing of some properties in CodeHighlighter 2024-09-24 17:56:13 +02:00