Commit Graph

4172 Commits

Author SHA1 Message Date
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
A Thousand Ships 955d5affa8
Reduce and prevent unnecessary random-access to `List`
Random-access access to `List` when iterating is `O(n^2)` (`O(n)` when
accessing a single element)

* Removed subscript operator, in favor of a more explicit `get`
* Added conversion from `Iterator` to `ConstIterator`
* Remade existing operations into other solutions when applicable
2024-05-04 16:08:55 +02:00
jsjtxietian b851514b10 Fix uint's suffix is not highlighted in text shader editor 2024-05-03 21:45:53 +08:00
Rémi Verschelde 03e6fbb010
Merge pull request #85474 from fire/packedvector4array
Add `PackedVector4Array` Variant type
2024-05-03 12:25:26 +02:00
Rémi Verschelde c3a650ac46
Remove unused code to convert text resource format to binary
This is now handled in `ResourceSaver::save` when saving with a binary extension.
2024-05-03 01:14:40 +02:00
K. S. Ernest (iFire) Lee f9b488508c
Add PackedVector4Array Variant type
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-05-03 00:58:27 +02:00
Silc Lizard (Tokage) Renew 6fd8b25d38 Add argument options to AnimationPlayer for auto capture 2024-05-03 07:06:37 +09:00
Silc Lizard (Tokage) Renew 36abb55dd2 Add auto_capture option to AnimationPlayer 2024-05-02 19:57:36 +09:00
Rémi Verschelde 9cb3a16a8e
Merge pull request #91014 from DeeJayLSP/qoa-wav-playback
Add QOA (Quite OK Audio) as a WAV compression mode
2024-05-02 12:46:32 +02:00
A Thousand Ships 308dbb8c63
[Core] Add scalar versions of `Vector*` `min/max/clamp/snap(ped)`
Convenience for a number of cases operating on single values
2024-05-02 10:31:13 +02:00
DeeJayLSP b9cbf2c96f Add QOA (Quite OK Audio) as a WAV compression mode 2024-05-01 19:05:14 -03:00
Rémi Verschelde 5a63d1db41
Merge pull request #91223 from Arnklit/particle-cylinder-emission-distribution-fix
Fix particle cylinder emission shape random distribution
2024-05-01 09:55:06 +02:00
Rémi Verschelde de00cfbc01
Merge pull request #90892 from Chaosus/vs_fix_expression_port_expand
Prevent expanding output port in visual shader expression
2024-05-01 09:54:57 +02:00
Rémi Verschelde e950d7ad36
Merge pull request #85609 from QbieShay/qbe/premul-builtin
Add premult alpha blending to 3D (spatial) shaders
2024-05-01 09:54:41 +02:00
Rémi Verschelde 3cb9e84cde
Merge pull request #85189 from QbieShay/qbe/fix-emission-at-end
Correctly emit sub-emitter's emission at the end
2024-05-01 09:54:38 +02:00
QbieShay 41a2b0e83e Added premult alpha blending to 3D (spatial) shaders.
Co-authored-by: jitspoe <jitspoe@yahoo.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2024-05-01 00:53:29 +02:00
Kasper Arnklit Frandsen af22d504da Fix particle cylinder emission shape random distribution 2024-04-30 17:24:58 +01:00
Rémi Verschelde 5bd9f4dea5
Don't run Shader doc comments logic outside the editor
Fixes #91306.
2024-04-29 14:54:35 +02:00
Rémi Verschelde 9286ac7aa5
Merge pull request #90161 from magian1127/4.0sTip
Implement tooltips for shader uniform in the inspector.
2024-04-29 10:09:35 +02:00
Magian e3a7c751f2 Implement tooltips for shader uniform in the inspector.
using regular expressions
2024-04-26 17:48:11 +08:00
Rémi Verschelde 86bf8354a0
Merge pull request #91198 from jsjtxietian/SurfaceTool
Fix `SurfaceTool.create_from_arrays` crash with bad index
2024-04-26 11:09:08 +02:00
jsjtxietian 01135bc533 Fix `SurfaceTool.create_from_arrays` crash with bad index 2024-04-26 11:44:15 +08:00
Rémi Verschelde 17d9c52ad9
Merge pull request #90894 from lyuma/animation_step_30
Set animation step from importers. Increase default step from 10 to 30FPS
2024-04-24 09:59:21 +02:00
Rémi Verschelde 6f21267a46
Merge pull request #85880 from Rudolph-B/GPU-particles-2D-spread-issue
Fixed particle spread values affecting particle velocity
2024-04-24 09:59:04 +02:00
johnsonbaugh e2995d3b88 Reset state of SkeletonModification2D when loaded from cache 2024-04-23 21:29:59 -07:00
johnsonbaugh ef8acbde9a Fix errors and warnings when loading Skeleton2D Modifications
Fixes #73247
2024-04-23 20:42:23 -07:00
Haoyu Qiu 941e5c4820 Use compatible text resource format when possible 2024-04-23 12:04:44 +08:00
Rémi Verschelde 98cce21e78
Merge pull request #90921 from smix8/navmesh_bake_warn
Warn that navigation mesh baking from Meshes is bad for runtime performance
2024-04-22 22:18:30 +02:00
Rémi Verschelde 7529c0bec5
Merge pull request #90994 from aaronp64/tileset_compressed_image
Handle compressed images in `TileSetAtlasSource::_create_padded_image_texture`
2024-04-22 12:53:51 +02:00
Rémi Verschelde bfca90acb7
Merge pull request #90935 from smix8/navdata_append
Add NavigationMeshSourceGeometryData append functions
2024-04-22 12:53:32 +02:00
Rémi Verschelde 659cf339bc
Merge pull request #90931 from aaronfranke/is-ascii-alphabet-char
Rename internal `is_ascii_char` to `is_ascii_alphabet_char`
2024-04-22 12:53:28 +02:00
Rémi Verschelde ab57e8d5a3
Merge pull request #90834 from lyuma/surfacetool_create_from_arrays
Expose `create_from_arrays` in SurfaceTool and cleanup some naming
2024-04-22 12:53:05 +02:00
smix8 b9225f67c8 Warn that navigation mesh baking from Meshes is bad for runtime performance
Warns that navigation mesh baking from Meshes is bad for runtime performance.
2024-04-22 12:49:47 +02:00
aaronp64 ff60f7b6d4 Handle compressed images in TileSetAtlasSource::_create_padded_image_texture
Check for compressed image and decompress if needed

Fixes #78755
2024-04-21 21:36:12 -04:00
smix8 2594c57361 Add NavigationMeshSourceGeometryData append functions
Adds append functions to NavigationMeshSourceGeometryData.
2024-04-21 04:57:05 +02:00
Aaron Franke b1f5e9fe3a
Rename internal is_ascii_char to is_ascii_alphabet_char 2024-04-20 02:36:41 -07:00
Lyuma a99756a07f Expose create_from_arrays in SurfaceTool and cleanup some naming 2024-04-19 18:45:06 -07:00
Lyuma bb9674c1b1 Set animation step from importers. Increase default step from 10 to 30 FPS. 2024-04-19 03:02:20 -07:00
Yuri Rubinsky 56d843724e Prevent expanding output port in visual shader expression 2024-04-19 11:49:10 +03:00
Alexey Bondarenko 69f2e066db
fix: Handle Vector4 default input values in visual shaders 2024-04-18 18:26:03 +06:00
Rémi Verschelde 2d884ba70c
Merge pull request #90797 from Geometror/vsnode-comment-compat
[Compatibility] Add stub for VisualShaderNodeComment
2024-04-18 12:24:50 +02:00
Hendrik Brucker 735c45dc8e [Compatibility] Add stub for VisualShaderNodeComment 2024-04-18 02:39:29 +02:00
Rémi Verschelde 54ba8d6882
Merge pull request #90810 from Arnklit/particles_processing_ring_shape_emission_axis_fix
Fix shader crash on zero vector and negative x vector in particles processing
2024-04-17 20:26:50 +02:00
Kasper Frandsen f8d08a8376 fix: avoid shader crash on null vector and negative x vector 2024-04-17 17:33:30 +01:00
Aaron Franke 77e35cf781
Move NavigationMeshSourceGeometryData(2D/3D) to the 2D/3D subfolders 2024-04-15 18:40:43 -07:00
kobewi 445302a4b2 Improve error when scene/resource is saved with newer format 2024-04-15 12:08:35 +02:00
Aaron Franke 6dd4a68797
Reorganize some code to have 2D things grouped together 2024-04-13 02:56:50 -07:00
smix8 497afeaf05 Fix NavigationMeshSourceGeometryData merge crash
Fixes crash when trying to merge with a null source geometry.
2024-04-10 21:56:21 +02:00
Rémi Verschelde 8764769ee8
Merge pull request #89186 from groud/save_byte_arrays_as_base64_encoded
Save PackedByteArrays as base64 encoded
2024-04-10 17:49:24 +02:00
A Thousand Ships 64146cb7f3
[Core] Add iteration support to `Array` 2024-04-10 14:49:34 +02:00
Rémi Verschelde bff6955459
Merge pull request #85024 from Jordyfel/moving-scripts-of-types-of-exported-typed-arrays
When saving a resource with an exported typed array, check whether the type is an external resource
2024-04-09 22:25:00 +02:00
Jordyfel 82de00a174 Type of exported typed array can be external resource 2024-04-09 15:28:42 +03:00
Gilles Roudière bde8d44104 TileSet: don't save angular and linear physics velocities if they have their default values 2024-04-08 14:17:08 +02:00
Rémi Verschelde b7e0b0ea0c
Merge pull request #89970 from AThousandShips/require_expose
[Animation] Expose `SkeletonProfile.set/is_required`
2024-04-05 12:16:04 +02:00
Rémi Verschelde f6a78f83aa
Merge pull request #90207 from groud/fix_no_cached_rect
Fix "no cached rect" errors in TileMapLayer editor
2024-04-04 17:09:26 +02:00
Gilles Roudière c928273c6c Fixes "no cached rect" errors in TileMapLayer editor 2024-04-04 16:28:31 +02:00
Hendrik Brucker a81561cbd9 Add GraphFrame and integrate it in VisualShader 2024-04-04 15:11:00 +02:00
Rémi Verschelde ffa650f1d8
Merge pull request #90113 from smix8/draw_2d_outlines
Make physics debug respect shape outline setting inside editor
2024-04-04 14:37:21 +02:00
Rémi Verschelde b77ac0a2b3
Merge pull request #89933 from jsjtxietian/path3d-remove
Support "clear points" function in Path3D topmenu bar
2024-04-04 14:35:27 +02:00
smix8 924a5c6573 Add HeightMapShape3D update with Image data
Adds HeightMapShape3D update with Image data.
2024-04-04 02:10:00 +02:00
smix8 07bbaf267d Make physics debug respect outline setting inside editor
Make physics debug respect outline setting inside editor instead of always returning true no matter the actual setting.
2024-04-01 19:52:57 +02:00
A Thousand Ships 334449df70
[Animation] Expose `SkeletonProfile.set/is_required` 2024-03-30 20:57:55 +01:00
jsjtxietian 34eff85014 Support “clear points” function in Path3D editor 2024-03-27 12:40:30 +08:00
A Thousand Ships d4fcca4545
[TileSet] Expose `TileData.is_valid_terrain_peering_bit` 2024-03-26 16:07:50 +01:00
ppphp d4e1a74efb Add 'override' mark to ResourceFormat class 2024-03-25 04:06:34 +08:00
Rémi Verschelde cd4e4c0fcc
Merge pull request #89111 from AThousandShips/vec_use
Use `Vector*` component-wise `min/max/clamp` functions where applicable
2024-03-24 01:14:51 +01:00
Rémi Verschelde f8bae10be6
Merge pull request #87171 from TokageItLab/retrieve-time-info-from-anim-tree
Rework AnimationNode process for retrieving the semantic time info
2024-03-24 01:12:42 +01:00
Yuri Rubinsky aa12241414 Refactor the parsing of port names in visual shader's expressions 2024-03-21 16:34:37 +03:00
Silc Lizard (Tokage) Renew 6dd410854c Rework AnimationNode process for retrieving the semantic time info 2024-03-20 22:52:26 +09:00
A Thousand Ships 79ba22a73f
Use `Vector*` component-wise `min/max/clamp` functions where applicable 2024-03-20 13:47:42 +01:00