Commit Graph

4169 Commits

Author SHA1 Message Date
smix8
110b2dc61a Add triangulation partition option to 2D navigation mesh baking
Adds triangulation partition option to 2D navigation mesh baking as an alternative to the existing convex partition option.
2024-08-05 00:08:46 +02:00
Rémi Verschelde
543e4388d5
Merge pull request #94682 from zeux/lod-uv-mirror
Fix LOD generation for meshes with tangents & mirrored UVs
2024-07-24 09:59:45 +02:00
Arseny Kapoulkine
18d6ae1161 Fix LOD generation for meshes with tangents & mirrored UVs
When UVs are mirrored in a mesh, collapsing vertices across the
mirroring seam can significantly reduce quality in a way that is not
apparent to the simplifier. Even if simplifier was given access to UV
data, the coordinates would need to be weighted very highly to prevent
these collapses, which would penalize overall quality of reasonable
models.

Normally, well behaved models with mirrored UVs have tangent data that
is correctly mirrored, which results in duplicate vertices along the
seam. The simplifier automatically recognizes that seam and preserves
its structure; typically models have few edge loops where UV winding is
flipped so this does not affect simplification quality much.

However, pre-processing for LOD data welded vertices when UVs and
normals were close, which welds these seams and breaks simplification,
creating triangles with distorted UVs.

We now take tangent frame sign into account when the input model has
tangent data, and only weld vertices when the sign is the same.
2024-07-23 16:35:46 -07:00
Silc Lizard (Tokage) Renew
88e590c9d3 Add approx comparing methods to Animation, use them on time comparison 2024-07-24 01:18:06 +09:00
Rémi Verschelde
962c2512c3
Merge pull request #94611 from Chaosus/vs_fix_texture_warning
Fix warning printing for `VisualShaderNodeTextureParameter`
2024-07-22 14:13:20 +02:00
David Trallero
67ece3dc63
Fix polyphonic audio streams with id > 1 cannot be stopped or changed (MSVC mis-optimization) 2024-07-22 14:08:02 +02:00
Yuri Rubinsky
7c9afbc139 Fix warning printing for VisualShaderNodeTextureParameter 2024-07-22 11:22:27 +03:00
Rémi Verschelde
caa1b6d991
Merge pull request #94498 from Chaosus/vs_fix_connection_bug
Fix internal connection count decreased if visual shader node removed
2024-07-18 15:38:27 +02:00
Rémi Verschelde
72e434bad4
Merge pull request #94497 from Chaosus/vs_rotation_by_axis
Few fixes for `VisualShaderNodeRotationByAxis`
2024-07-18 15:38:24 +02:00
kobewi
10da06a32c Fix empty region in AtlasTexture 2024-07-18 15:31:59 +02:00
Yuri Rubinsky
14c36b733c Fix internal connection count decreased if visual shader node removed 2024-07-18 11:40:02 +03:00
Yuri Rubinsky
cf70cb57ee Few fixes for VisualShaderNodeRotationByAxis 2024-07-18 11:10:36 +03:00
Rémi Verschelde
c77c41df88
Merge pull request #94362 from smix8/navpoly_unref_fix
Fix NavigationPolygon not updating consistently on rebakes
2024-07-17 11:44:09 +02:00
smix8
9dd05964d5 Fix NavigationPolygon not updating consistently on rebakes
Fixes that NavigationPolygon did not update in all cases because the internal NavigationMesh was not always unref and freed which blocked creating a new mesh later if nothing else freed it.
2024-07-14 22:01:11 +02:00
Yuri Rubinsky
92aa01f937 Add few new outputs to the visual shaders 2024-07-12 17:12:22 +03:00
bruvzg
847aadee02
[Editor] Update font preview directly instead of invalidating property list. 2024-07-05 12:48:39 +03:00
Rémi Verschelde
4d984b6369
Merge pull request #93930 from Arnklit/short-animation-length-bezier-handle-fix
Clamp bezier handle length to half the length of animation
2024-07-04 17:12:22 +02:00
Rémi Verschelde
af55caff36
Merge pull request #93723 from KoBeWi/bandaid.tscn
Speed up scene group scanning for text scenes
2024-07-04 17:12:06 +02:00
Kasper Frandsen
7c6f32ddbf Clamp bezier handle length to half the length of animation 2024-07-04 13:41:12 +01:00
kleonc
88b29539f7 Fix AtlasTexture::draw_rect flipping for non-zero margin 2024-07-01 21:22:25 +02:00
kobewi
b83c64faac Speed up scene group scanning for text scenes 2024-06-29 21:30:38 +02:00
Yuri Rubinsky
72c7e51905 Use PackedVector4Array instead of float array for vec4 array uniform 2024-06-28 13:34:43 +03:00
Pedro J. Estébanez
c1391489e3 GDScript: Enhance handling of cyclic dependencies 2024-06-26 17:44:32 +02:00
Rémi Verschelde
022b5a1f54
Merge pull request #93426 from smix8/poly_good_locking
Fix thread-use causing navigation polygon data corruption
2024-06-22 16:22:14 +02:00
Hugo Locurcio
281e0e6a5b
Allow BaseMaterial3D height/dither fade to work with Compatibility rendering
Compatibility is based on OpenGL ES 3.0, so the height shader
(including deep parallax) and distance fade dither modes work
just fine with no adjustments required.
2024-06-22 00:57:22 +02:00
smix8
eba3acadac Fix thread-use causing navigation polygon data corruption
Fixes navigation polygon  data corruption caused by thread-use that changed vertices or polygons while the navigation polygon was processed, e.g. by server region sync, navmesh baking or user thread updates.
2024-06-21 12:58:03 +02:00
Rémi Verschelde
04a530f91f
Merge pull request #93407 from smix8/lock_this_geometry_up
Fix thread-use causing navigation source geometry data corruption
2024-06-21 10:14:38 +02:00
smix8
fd727ab994 Fix thread use causing navigation mesh data corruption
Fixes navigation mesh data corruption caused by thread use that changed vertices or polygons while the navigation mesh was processed, e.g. by server sync or baking.
2024-06-21 09:39:16 +02:00
smix8
d4722b9e1f Fix thread-use causing navigation source geometry data corruption
Fixes navigation source geometry data corruption caused by thread-use that changed vertices or indices while the source geometry data was used in a parsing process or read from by the navmesh baking.
2024-06-21 08:06:14 +02:00
maski
734fab7f20
Improve SurfaceTool::generate_tangents UV error message
Fixes #92395.
2024-06-20 16:13:12 +02:00
Pedro J. Estébanez
e6d930b31f AnimatedTexture: Fix crash when loaded from a thread 2024-06-19 09:54:01 +02:00
Adam Scott
52fa4f05f3
Add samples playback support 2024-06-18 11:06:31 -04:00
Yuri Rubinsky
537316098f Fix bugs in visual shader varyings 2024-06-16 16:58:46 +03:00
Yuri Rubinsky
99fa6ee6c4 Fix incorrect preview port in visual shader 2024-06-14 12:31:34 +03:00
Rémi Verschelde
b4e7947d3f
Merge pull request #93127 from BlueCube3310/material-ready
Material: Fix marking as ready
2024-06-14 10:19:38 +02:00
Rémi Verschelde
6e1e6f0d3b
Merge pull request #92955 from libklein/fix-navigation-polygon-draw
TileSet: Transform rotated navigation (sub)-polygons individually.
2024-06-14 10:19:32 +02:00
Patrick Sean Klein
2dc42e8a93
TileSet: Maintain NavigationPolygon sub-polygons when rotating
The original implementation merged sub-polygons into a single polygon
when rotating. This can cause non-simple geometries downstream
algorithms cannot handle.
2024-06-13 22:16:46 +01:00
BlueCube3310
ea683cd152 Material: Fix marking as ready 2024-06-13 13:12:55 +02:00
Rémi Verschelde
f1ac3e26cc
Merge pull request #83729 from Chaosus/vs_fix_texture_param
Add extra warning messages to `VisualShaderNodeTextureParameter`
2024-06-12 10:00:23 +02:00
Rémi Verschelde
0d1f2396d5
Merge pull request #92847 from aaronp64/varying_getter_port_type
Fix `VisualShaderNodeVaryingGetter` expanded ports adding ".x" to shader
2024-06-11 16:59:25 +02:00
Rémi Verschelde
3d170c56d6
Merge pull request #92861 from TokageItLab/fix-animation-player-just-after-started
Fix seeking Animation immediate after playback for Discrete track
2024-06-10 16:11:55 +02:00
Silc Lizard (Tokage) Renew
bea47d877b Fix seeking Animation immediate after playback for Discrete track 2024-06-08 22:09:37 +09:00
Rémi Verschelde
5fcd9803cd
Merge pull request #90850 from AlexeyBond/patch-1
Handle Vector4 default input values in visual shaders
2024-06-07 23:29:19 +02:00
jsjtxietian
8d888807f7 Sync visual shader's distance fade using circular fade 2024-06-07 11:32:27 +08:00
aaronp64
73343a2e7f Fix VisualShaderNodeVaryingGetter expanded ports adding ".x" to shader
When VisualShaderNodeVaryingGetter type was Vector2/Vector3/Vector4, expanding the output ports and connecting an individual value to a scalar input would add ".x" to the assignment in the generated shader.  This was due to `VisualShaderNodeVarying::get_port_type` ignoring the port number, and always returning the associated vector type.  Added checks for `p_port == 0` to return either the vector type, or scalar for expanded ports, matching similar logic in other nodes, like `VisualShaderNodeColorConstant::get_output_port_type`.

Fixes #92832
2024-06-06 15:21:21 -04:00
kobewi
be111004dd Fix default NodePaths saved in scene 2024-06-03 13:10:23 +02:00
Rémi Verschelde
41e762ca29
Merge pull request #91454 from akien-mga/coverity-checks
Fix Steam input "crc" errors, and some other Coverity reports of uninitialized scalar variable
2024-06-03 10:35:38 +02:00
Flyn San
67b16f261f
Fix code style for generated shader code from ParticleProcessMaterial
The results now match what our clang-format config would do.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-31 14:12:41 +02:00
Rémi Verschelde
62120c7841
Fix Steam input "crc" errors, and some other Coverity reports of uninitialized scalar variable
- Fixes #88630.
- Fixes #92578.
2024-05-31 09:55:02 +02:00
kobewi
a345160ab3 Fix wrong usage of parameters_base_path StringName 2024-05-30 12:03:43 +02:00