Commit graph

4986 commits

Author SHA1 Message Date
clayjohn 2f83b400a8 Warn users when assigning VERTEX directly to POSITION due to compatibility breakage from reverse z changes 2024-04-12 10:38:35 -07:00
kobewi e95e954c68 Add PropertyListHelper in all simple cases 2024-04-11 18:13:29 +02:00
smix8 1c134f4a3d Add navigation path simplification
Adds navigation path simplification for NavigationServer and NavigationAgent.
2024-04-11 12:32:21 +02:00
Juan Linietsky 65686dedf9 Use WorkerThreadPool for Server threads
* Servers now use WorkerThreadPool for background computation.
* This helps keep the number of threads used fixed at all times.
* It also ensures everything works on HTML5 with threads.
* And makes it easier to support disabling threads for also HTML5.

CommandQueueMT now syncs with the servers via the WorkerThreadPool
yielding mechanism, which makes its classic main sync semaphore
superfluous.

Also, some warnings about calls that kill performance when using
threaded rendering are removed because there's a mechanism that
warns about that in a more general fashion.

Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2024-04-10 18:47:42 +02:00
Pedro J. Estébanez c28f5901c7 Polish interaction between windowing, input and rendering
- Adapt GL make/release API to the current architecture.
- Fix DisplayServer being locked while dispatching input (prevent deadlocks).
2024-04-10 18:47:42 +02:00
Rémi Verschelde 5c75fa260f
Merge pull request #90458 from clayjohn/RD-weight-buffer
Clear RIDs of weight buffers when freeing to avoid double free
2024-04-10 14:22:37 +02:00
Rémi Verschelde 258f2705f6
Merge pull request #90440 from Calinou/geometryinstance3d-fix-custom-aabb-assignment
Fix GeometryInstance3D Custom AABB assignment in the editor not working
2024-04-10 14:22:33 +02:00
Rémi Verschelde 50b89e6c56
Merge pull request #89752 from ze2j/fix_false_positive_errors_in_gdshaderinc_files
Fix false positive errors in gdshaderinc files
2024-04-10 14:22:00 +02:00
Rémi Verschelde c59f493620
Merge pull request #89729 from jitspoe/master.shadow_distance_fade_optimization
Shadow fade for omni lights actually stops the shadow from updating while faded out to improve performance.
2024-04-10 14:21:56 +02:00
clayjohn bafbde9f4b Clear RIDs of weight buffers when freeing to avoid double free 2024-04-09 17:52:05 -07:00
Hugo Locurcio 084b8d1246
Fix GeometryInstance3D Custom AABB assignment in the editor not working
This also fixes error spam when changing Custom AABB on a MeshInstance3D
that has no Mesh resource assigned yet (which is allowed in the editor).
This avoids pitfalls when assigning a custom AABB in a script when
loading meshes at runtime.
2024-04-09 19:02:43 +02:00
Rémi Verschelde 9cba6ec216
Merge pull request #89491 from thimenesup/compute_dispatch_indirect
Expose bindings to compute dispatch indirect of rendering device
2024-04-09 10:42:22 +02:00
thimenesup 8017c8cf21 Expose bindings to compute dispatch indirect rendering device 2024-04-08 20:46:53 +02:00
jsjtxietian 5a5453bcf2 Fixes RenderingDevice::get_driver_resource will crash or give incorrect result with certain resources 2024-04-08 12:31:22 +08:00
Rémi Verschelde c1b2cfdced
Merge pull request #90271 from DarioSamo/pipeline_cache_setting
Add toggle for enabling or disabling RenderingDevice's pipeline cache.
2024-04-06 13:06:47 +02:00
Rémi Verschelde 10d67e590d
Merge pull request #90191 from BastiaanOlij/fix_mobile_canvas_copy
Don't use subpasses when we're using Canvas background mode in Mobile
2024-04-06 13:06:37 +02:00
Dario ecaafa6001 Add toggle for enabling or disabling RenderingDevice's pipeline cache. 2024-04-05 13:14:07 -03:00
Rémi Verschelde ca2d28602b
Merge pull request #90196 from bruvzg/ts_tcase
[TextServer] Expose ICU title case string conversion to scripting.
2024-04-05 12:16:18 +02:00
Rémi Verschelde b5064a6160
Merge pull request #89714 from lawnjelly/tighter_light_cull_colinear_fix
Tighter shadow culling - fix light colinear to frustum edge
2024-04-05 12:15:53 +02:00
Rémi Verschelde 0c71ba7801
Merge pull request #89880 from dsnopek/openxr-composition-layers-node3d-drs
Add support for OpenXR composition layers
2024-04-04 17:09:07 +02:00
David Snopek 0f2b804059 Add support for OpenXR composition layers
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2024-04-04 09:20:23 -05:00
Rémi Verschelde 7a42afbba0
Merge pull request #90200 from smix8/debug_enabled
Fix `NavigationServer.set_debug_enabled()` doing nothing
2024-04-04 14:37:35 +02:00
Rémi Verschelde 550f5a577f
Merge pull request #90055 from Sauermann/fix-add-tbg-check
Add early return when setting `transparent_bg`
2024-04-04 14:36:54 +02:00
Rémi Verschelde d604899be8
Merge pull request #89960 from Mknsri/fix/cylinder_face_edge_point_collision
Fix separating axes for 3D cylinder-face collisions
2024-04-04 14:35:34 +02:00
Rémi Verschelde 64c4a53a2c
Merge pull request #89849 from EIREXE/cute_and_funny_decals
Fix decal modulate being passed as srgb instead of as linear color.
2024-04-04 14:31:53 +02:00
Rémi Verschelde a28be933ee
Merge pull request #89398 from clayjohn/visual-debugger-coverage
Increase coverage of timestamps for visual profiler
2024-04-04 14:31:19 +02:00
Rémi Verschelde 69a4ff8996
Merge pull request #88328 from Khasehemwy/reversed-z
Use Reverse Z for the depth buffer
2024-04-04 14:30:53 +02:00
Khasehemwy d950f5f838
Use Reverse Z for the depth buffer 2024-04-04 13:54:15 +02:00
smix8 282d772f1b Fix NavigationServer.set_debug_enabled() doing nothing
Fixes NavigationServer.set_debug_enabled() doing nothing because it was not updated for newer dirty flags.
2024-04-04 13:47:06 +02:00
bruvzg 27f6f4147b
[TextServer] Expose ICU title case string conversion to scripting. 2024-04-04 10:56:49 +03:00
Bastiaan Olij 9e9a6fb6d6 Can't use subpasses when we're using Canvas background mode in Mobile 2024-04-04 15:59:11 +11:00
clayjohn ac6c648645 Increase coverage of timestamps for visual profiler 2024-04-03 19:29:02 -07:00
lawnjelly 691854d589 Jitter raster occlusion camera to reduce false positives.
Due to the low resolution of the occlusion buffer, small gaps between occluders can be closed and incorrectly occlude instances which should show through the gaps. To ameliorate this problem, this PR jitters the occlusion buffer over time, making it more likely an instance will be seen through a gap. This is used in conjunction with an occlusion timer per instance, to prevent instances flickering on and off rapidly.
2024-04-03 12:18:45 +01:00
Markus Mikonsaari 3f69af9e64 Fix separating axes for 3D cylinder-face collisions
When checking for lateral surfaces of a cylinder against the points on a
face, the axis projection does not remove the cylinder position. This
results in the axis pointing to the wrong direction and reports
collisions when there shouldn't be.
2024-04-01 21:47:54 +03:00
Markus Sauermann d14a84a166 Add early return when setting transparent_bg
Fix memory leak on Mac.
2024-03-30 22:33:54 +01:00
Rémi Verschelde 7092230df6
Merge pull request #89907 from bruvzg/nat_dlg_ftr_flags
[DisplayServer] Add separate feature flags for different native dialog types.
2024-03-28 10:47:15 +01:00
Rémi Verschelde df6f4ce5e9
Merge pull request #89851 from rburing/bind_6dof_enums
Bind constants related to 6DOF joints
2024-03-28 10:47:11 +01:00
bruvzg dc01658ee9
[DisplayServer] Add separate feature flags for different native dialog types. 2024-03-26 15:18:06 +02:00
Rémi Verschelde 7d151c8381
Merge pull request #89902 from timothyqiu/not-available
Return `ERR_UNAVAILABLE` if native dialog is not supported
2024-03-26 13:45:53 +01:00
Rémi Verschelde bad1f4aae5
Merge pull request #89900 from bruvzg/nmenu_move
[NativeMenu] Move files to the `display` subfolder.
2024-03-26 13:45:46 +01:00
Rémi Verschelde 2597f60de1
Merge pull request #88830 from beiller/bugfix/taa_xr_fix
Add fix for TAA passes rendering black meshes on XR
2024-03-26 13:45:10 +01:00
Haoyu Qiu 7118fb9cda Return ERR_UNAVAILABLE if native dialog is not supported 2024-03-26 18:45:51 +08:00
bruvzg 399899a095
[NativeMenu] Move files to the display subfolder. 2024-03-26 10:18:08 +02:00
jitspoe a0969a0931 Shadow fade for omni lights actually stops the shadow from updating while faded out to improve performance. 2024-03-25 21:25:56 -04:00
Rémi Verschelde 80a5da5242
Merge pull request #89088 from lander-vr/limiter
Add AudioEffectHardLimiter as a rework of audio limiter effect
2024-03-25 15:25:39 +01:00
landervr 61a5d52388 Add AudioEffectHardLimiter as a rework of audio limiter effect 2024-03-25 13:37:03 +01:00
bruvzg 5851f1e2dd
[MenuBar] Use NativeMenu RIDs instead of indices to track items. 2024-03-25 10:58:05 +02:00
Ricardo Buring 38a31f4cb5 Bind constants related to 6DOF joints
This makes physics server GDExtensions able to use the enums without
workarounds.
2024-03-24 15:16:33 +01:00
Álex Román Núñez 2f0ba1ed3f Fix decal modulate being passed as srgb instead of as linear color. 2024-03-24 14:59:43 +01:00
Rémi Verschelde c3370023b6
Merge pull request #89692 from Scony/baking-crash-prevention
Add navigation baking crash prevention mechanism
2024-03-24 01:21:56 +01:00
Rémi Verschelde 70c05f63da
Merge pull request #89531 from sullyscience/fix-resource-leaks
Fix mobile renderer RID leaks
2024-03-24 01:16:48 +01: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
Pawel Lampe 64fc9e2156 Add navigation baking crash prevention mechanism 2024-03-23 22:20:00 +01:00
Ricardo Buring 2ed2ccc2d8 Fixed Timestep Interpolation (2D)
Adds fixed timestep interpolation to the rendering server (2D only).
Switchable on and off with a project setting (default is off).

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-03-23 12:28:36 +01:00
ze2j 993cd25ff2 Fix false positive errors in gdshaderinc files
These language features are wrongly detected as errors (not supported)
when used in gdshaderinc files:
- instance uniforms
- hint_normal_roughness_texture
- hint_depth_texture

This type of error should only occur when the shader type is not spatial
and not a gdshaderinc file.
2024-03-21 15:46:41 +01:00
lawnjelly 70cd25f3eb Tighter shadow culling - fix light colinear to frustum edge
In rare situations if a light is placed near colinear to a frustum edge, the extra culling plane derived can have an inaccurate normal due to floating point error.
This PR detects colinear triangles, and prevents adding a culling plane in this situation.
2024-03-20 16:47:54 +00:00
A Thousand Ships 79ba22a73f
Use Vector* component-wise min/max/clamp functions where applicable 2024-03-20 13:47:42 +01:00
bruvzg 0587a1d217
[StatusIndicator] Switch API to use Texture2D instead of Image, improve handling on macOS, add method to set native popup menu directly. 2024-03-20 11:56:07 +02:00
David Sullivan dfa326ef55 Fix: Address mobile resource leaks in render
Update render_forward_mobile destructor to include instance buffers.
Update render_scene_buffers_rd cleanup to include weight buffers / blur
textures.
2024-03-15 14:48:12 -04:00
Mikael Hermansson 7901a0524b Allow for 32 max collisions in test_body_motion 2024-03-15 15:40:42 +01:00
Rémi Verschelde 3e79cdbee2
Merge pull request #89450 from RandomShaper/fix_inside_lights
Fix missed light clusters when inside clipped lights
2024-03-14 22:34:56 +01:00
Rémi Verschelde 4ca6cd054f
Merge pull request #89273 from bruvzg/win_native_menu
[NativeMenu] Implement native popup menu support on Windows.
2024-03-14 22:34:42 +01:00
Rémi Verschelde 453485aede
Merge pull request #89270 from Repiteo/enforce-typename-in-templates
Enforce template syntax `typename` over `class`
2024-03-14 22:34:37 +01:00
Pedro J. Estébanez 605fdb655c Fix missed light clusters when inside clipped lights 2024-03-13 23:38:46 +01:00
Rémi Verschelde 1030f1f6db
Merge pull request #89411 from aaronfranke/disable-3d-xr
Disable XR server when compiling without 3D
2024-03-13 18:41:31 +01:00
Aaron Franke 9e0b38ecd3 Disable XR server when compiling without 3D 2024-03-13 09:02:10 -07:00
bruvzg 3bb5047db3
[TextServer] Use GDVIRTUAL_REQUIRED_CALL for required extensions methods, update extension docs. 2024-03-13 12:57:39 +02:00
bruvzg ac7583e449
[NativeMenu] Implement native popup menu support on Windows. 2024-03-13 10:51:38 +02:00
Pedro J. Estébanez 49625beac2 Ensure specialization constants come sorted from reflection 2024-03-12 14:42:01 +01:00
Rémi Verschelde 061e0c758d
Merge pull request #89395 from bruvzg/rtl_ts_img_range
[RTL] Use "visible characters" property for inline object visibility
2024-03-12 14:23:03 +01:00
bruvzg 433de7f1a8
[RTL] Use "visible characters" property for inline object visibility 2024-03-12 11:28:45 +02:00
Rémi Verschelde d5856f864f
Merge pull request #89383 from bruvzg/font_no_bitmaps
[Font] Add option to disable embedded bitmaps loading.
2024-03-11 23:48:17 +01:00
bruvzg 911fa38d3a
[Font] Add option to disable embedded bitmaps loading. 2024-03-11 16:31:10 +02:00
Rémi Verschelde f040a351c2
Merge pull request #89381 from aaronfranke/disable-3d
Disable all 3D nodes, physics, and resources when compiling without 3D
2024-03-11 14:02:57 +01:00
Aaron Franke 6aac3e4a16 Disable all 3D nodes, physics, and resources when compiling without 3D 2024-03-11 01:00:55 -07:00
Bastiaan Olij df8ff797b7 Consistantly use USE_MULTIVIEW as the define in shaders 2024-03-11 14:40:00 +11:00
Rémi Verschelde 5c6614fd52
Merge pull request #89281 from permelin/fix-lm-capture-octant
Fix lightmap captures not applied in one octant
2024-03-09 00:52:19 +01:00
Rémi Verschelde ffc41fb76d
Merge pull request #89277 from RandomShaper/rdd_public_shader_desc
Make `ShaderDescription` and related types public
2024-03-08 13:09:50 +01:00
Rémi Verschelde f8140a4e9a
Merge pull request #89253 from Calinou/debug-draw-modes-ignore-decals-2
Make Overdraw, Lighting and Shadow Splits debug draw modes ignore decals
2024-03-08 13:09:40 +01:00
Rémi Verschelde cebaf9dac5
Merge pull request #89042 from permelin/fix-particle-trail-activation
Fix early activation of particle trail sections
2024-03-08 13:09:25 +01:00
Per Melin 46610117d3 Fix lightmap capture not applied in one octant
GI from probe captures was not applied to dynamic objects in the (-,-,-)
octant of the lightmap. If the object had traveled from a different part
of the lightmap, it would simply not update anymore and kept whatever
ambient light it had from before. If the object on the other hand came
from outside of the lightmap into this octant, it would receive no
ambient light at all.
2024-03-08 12:43:38 +01:00
Pedro J. Estébanez 560e79c67f Make ShaderDescription and related types public 2024-03-08 09:55:44 +01:00
Thaddeus Crews 9903e6779b
Enforce template syntax typename over class 2024-03-07 22:39:09 -06:00
Hugo Locurcio 26a220bd31
Make Overdraw, Lighting and Shadow Splits debug draw modes ignore decals
This also makes the Overdraw and Shadow Splits debug draw modes ignore fog.
The Lighting debug draw mode still displays fog as that debug draw mode
is intended to preview scene lighting, and fog has an impact on how
lighting is perceived.
2024-03-07 17:40:49 +01:00
bruvzg da02ca7e75
[NativeMenu] Add checks to avoid unnecessary warnings.
Added by Rémi: Add dummy NativeMenu to DisplayServerHeadless,
fixing crashes when using `--headless`.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-03-07 00:23:26 +01:00
Rémi Verschelde ec55028f26
Merge pull request #89209 from RandomShaper/padding_for_dummies
Make shader binary alignment handling simpler and more robust
2024-03-06 13:17:09 +01:00
Rémi Verschelde a735c51c3c
Merge pull request #88658 from akien-mga/fix-audio-effect-pitch-shift-Wstring-overflow-take-2
AudioEffectPitchShift: Actually fix `-Wstringop-overflow warning`
2024-03-06 13:16:56 +01:00
Rémi Verschelde 13954fc33e
Merge pull request #87452 from bruvzg/native_menu
Move `global_menu_*` methods to a separate `NativeMenu` class.
2024-03-06 13:16:52 +01:00
Pedro J. Estébanez f77b4d155b Make shader binary alignment handling simpler and more robust
Bonus:
Also simplified the rounding to block size in image size calculations.
2024-03-06 11:48:23 +01:00
Rémi Verschelde e74f4ea115
Vulkan: Don't warn about pipelines cache if missing
It used to warn when opening a new project because no cache pre-exists,
which isn't particularly helpful.

Also include the rendering method in the cache filename, as it differs
between Forward+ and Mobile for a same GPU.
2024-03-05 16:39:14 +01:00
Rémi Verschelde a52e575652
Merge pull request #89134 from BastiaanOlij/fix_recursive_reflection_probes
Fix never ending loop with overlapping probes
2024-03-05 09:56:05 +01:00
Rémi Verschelde 2d408f48e7
Merge pull request #88546 from bruvzg/indent_wrap
[TextEdit] Add support for optional wrapped line indentation.
2024-03-05 09:55:51 +01:00
Bastiaan Olij a5d3d23db4 Fix never ending loop with overlapping probes 2024-03-05 10:07:56 +11:00
bruvzg c65a667924
Move global_menu_* methods to a separate NativeMenu class. 2024-03-04 23:41:41 +02:00
Rémi Verschelde 3be5d9b01a
Merge pull request #89046 from permelin/fix-particle-aabb-recalc-with-userdata
Fix error in AABB calculation for particles with USERDATA
2024-03-04 13:33:33 +01:00
markdibarry a62870956a Add new Parallax2D node 2024-03-03 15:46:40 -05:00
Per Melin 853935a5c9 Fix error in AABB calculation for particles with USERDATA
Selecting "Generate AABB" on a 3D particle node in the editor would not work
and printed an error about incorrect buffer size if the particle shader used
one or more of the USERDATA build-ins.
2024-03-02 14:26:09 +01:00
Per Melin 9b2d77a238 Initialize particle trail history frame numbers
Fixes #88712

All particle trail sections were activated at once on the first cycle, instead
of being spread out over the trail's lifetime.
2024-03-01 19:32:43 +01:00
Rémi Verschelde 0618bff394
Merge pull request #86777 from Mickeon/autocomplete-classdb
Add autocompletion for ClassDB & AudioServer
2024-03-01 14:56:12 +01:00
Rémi Verschelde c1377920cd
Merge pull request #86743 from Mickeon/autocompletion-optimise-object
Optimise comparisons for Object's `get_argument_options`
2024-03-01 14:56:06 +01:00