Commit graph

4141 commits

Author SHA1 Message Date
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
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
Rémi Verschelde 76237c5f9b
Merge pull request #91488 from akien-mga/resource-format-text-remove-obsolete-binary-conversion
Remove unused code to convert text resource format to binary
2024-05-29 22:13:52 +02:00
Rémi Verschelde 2c50e87f60
Merge pull request #89470 from jsjtxietian/msdf-uv
Fix shader compilation error when enabling texture MSDF and UV1 Triplanar at the same time
2024-05-29 22:13:30 +02:00
Rémi Verschelde 93596abcf5
Merge pull request #92373 from libklein/fix-caching-wrong-collision-layer-shapes
Fix TileSet caching wrong collision layer shapes for shapes comprising several polygons.
2024-05-28 15:49:44 +02:00
Adriano Orioli edd2e6e37f
make InstancePlaceholder in charge of node reference resolution 2024-05-28 11:51:49 +02:00
Patrick Sean Klein 44d1f1c85f
Fixes an index error in TileSet when caching transformed collision layers. 2024-05-26 00:14:31 +01:00
Rémi Verschelde 4c96dcf6e0
Merge pull request #92179 from aaronp64/image_import_memory
Improve memory usage for image import and `PortableCompressedTexture2D`
2024-05-22 09:26:53 +02:00
aaronp64 f81e0fcbf4 Improve memory usage for image import and PortableCompressedTexture2D
When importing images, we store a compressed version of the image to a .ctex file with ResourceImporterTexture::save_to_ctex_format.  When importing many large images at once, this can use a large amount of memory, especially when the .ctex file uses WebP format.

This change is for ResourceImporterTexture::save_to_ctex_format to use the original Image object instead of p_image->get_image_from_mipmap(0), to avoid creating a copy of the full uncompressed image when looping through the base Image and mipmaps.  This reduces the import memory usage for large images by around 10% when using WebP, and 35-40% when Project Settings/Rendering/Textures/Lossless Compression/Force PNG is enabled, may vary depending on the image and number of import threads running.  Same change applied to PortableCompressedTexture2D::create_from_image, which has similar logic.

This helps with #92084, but does not fully resolve the issue on its own, as compressing with WebP on many threads can still use a large amount of memory - this just lowers that amount, and makes it more likely that enabling "Force PNG" will reduce memory usage enough to import the files.
2024-05-20 19:40:39 -04:00
jsjtxietian d1cd0c4780 Prevent add shader uniform doc when DocTool is not inited 2024-05-20 12:26:26 +08:00
Rémi Verschelde 9eff940a64
Merge pull request #91549 from magian1127/4.0ChangeHighlightingStartKey
Resolve conflict between shader uniform tooltips `/**` and general annotation `/**/`.
2024-05-17 11:13:48 +02:00
Rémi Verschelde 5708a3a02e
Merge pull request #92000 from clayjohn/vram-debugger
Increase coverage of VRAM debugger and add support to RD backends
2024-05-16 09:32:11 +02:00
clayjohn c84616c2d2 Increase coverage of VRAM debugger and add support to RD backends 2024-05-15 16:30:19 -07:00
Rémi Verschelde ca2ed80539
Merge pull request #87320 from Rudolph-B/main
Fix collided particles getting stuck with zero velocity.
2024-05-15 12:09:27 +02:00
Rudolph Bester 45e5b151b6 Fixed collided particles getting stuck with zero velocity. 2024-05-14 18:55:56 +02:00
Rémi Verschelde de329556f7
Merge pull request #91449 from Arnklit/particles-emission-ring-shape-fix2
Fix sqrt application for radius in particle ring emission
2024-05-14 18:09:47 +02:00
Kasper Arnklit Frandsen 94eefe168a Fix sqrt application for radius in particle ring emission 2024-05-14 12:22:21 +01:00
Rémi Verschelde bdefe53992
Merge pull request #91909 from KoBeWi/have_fun_reviewing_this
Use Core/Scene stringnames consistently
2024-05-14 12:07:03 +02:00
Magian 8a92615ba0 Resolve conflict between shader uniform tooltips "/**" and general annotation "/**/". 2024-05-14 15:32:47 +08:00
kobewi 413c11357d Use Core/Scene stringnames consistently 2024-05-13 23:41:07 +02:00
Rémi Verschelde 5cb9a748d6
Merge pull request #91630 from RandomShaper/enh_mat_sh_update
Let materials' shaders update happen on loader threads
2024-05-13 17:32:11 +02:00
Rémi Verschelde dcd6db8680
Merge pull request #90534 from Geometror/vs-reroute-node
[VisualShader] Add reroute node and improve port drawing
2024-05-13 12:05:25 +02:00
Hendrik Brucker 62776842df [VisualShader] Add reroute node and improve port drawing 2024-05-13 03:26:01 +02:00
kobewi a262d2d881 Add shorthand for using singleton string names 2024-05-11 18:53:08 +02:00
DeeJayLSP 97a70cbd6e Use data length on QOA checks instead of min size 2024-05-08 12:05:21 -03:00
A Thousand Ships a0dbdcc3ab
Replace find with contains/has where applicable
* Replaces `find(...) != -1` with `contains` for `String`
* Replaces `find(...) == -1` with `!contains` for `String`
* Replaces `find(...) != -1` with `has` for containers
* Replaces `find(...) == -1` with `!has` for containers
2024-05-08 12:37:42 +02:00
Rémi Verschelde 29607924bd
Merge pull request #88741 from adamscott/fix-shared-variables-of-inherited-scenes-redux
Fix shared exported variables of inherited scenes
2024-05-07 16:49:20 +02:00
Rémi Verschelde 107fd30ae7
Merge pull request #91647 from jsjtxietian/fix-uint-hightlight
Make native shader source visualizer highlight uint suffix
2024-05-07 09:04:55 +02:00
jsjtxietian cff1111359 Make native shader source visualizer can highlight uint suffix 2024-05-07 14:18:48 +08:00
Pedro J. Estébanez 187e5ef258 Let materials' shaders update happen on loader threads 2024-05-06 19:40:00 +02:00