Commit graph

2595 commits

Author SHA1 Message Date
PouleyKetchoupp
e6f7235ffb Fix SoftDynamicBody3D crash when setting disable mode
Proper logic for changing physics state when disabled and disabled mode
is changed (it was unnecessarily making calls to re-initialize physics).

Extra error handling in soft body implementations to avoid crashes with
invalid mesh.
2021-10-21 08:56:12 -07:00
Rémi Verschelde
194b72821d
Merge pull request #54011 from nekomatata/center-of-mass-2d-transform 2021-10-21 11:41:56 +02:00
Yuri Roubinsky
9142df46b3 Fix built-in texture samplers passing for spatial shader mode 2021-10-21 12:32:32 +03:00
Yuri Roubinsky
5a354aaf6d Prevent a rendering crash and error spam for uniform texture array 2021-10-20 21:30:27 +03:00
Rémi Verschelde
da98357e6e
doctool: Fix differences between headless and Vulkan rendering backends
Fixes #53913.
2021-10-20 17:48:50 +02:00
Rémi Verschelde
8748247d6f
Merge pull request #53702 from ConteZero/primary_clipboard_linux 2021-10-20 16:35:04 +02:00
Bastiaan Olij
6794b6f10b Fix double _get_tracking_status declaration 2021-10-20 17:39:08 +11:00
PouleyKetchoupp
c1577e5a3f Fix 2D center of mass not updated from transform
Same logic as what was done in 3D, applied to 2D center of mass.

Also did some minor cleanup in 3D and fixed center of mass transform
during the first frame after teleporting a dynamic body.
2021-10-19 16:22:30 -07:00
Rémi Verschelde
244faf5588
Merge pull request #53972 from zedutch/fix-shader-time-update
Fix shaders using `TIME` not continuously updating
2021-10-19 16:37:55 +02:00
Rémi Verschelde
85a8939fa2
Merge pull request #53790 from briansemrau/remove-distant-shadowy-void 2021-10-19 15:17:09 +02:00
Bastiaan Olij
96b707215d Add support for returning the play area from XRInterface 2021-10-19 21:17:04 +11:00
Rémi Verschelde
4387f9645b
Merge pull request #52940 from groud/toast_notification 2021-10-19 09:57:13 +02:00
Rémi Verschelde
483df71120
Merge pull request #53980 from nekomatata/rename-godot-physics-classes 2021-10-19 08:24:02 +02:00
Rémi Verschelde
723b988fde
Merge pull request #52210 from BastiaanOlij/enhance_xr_trackers 2021-10-19 08:11:32 +02:00
Rémi Verschelde
fbd701a128
Merge pull request #53960 from Klowner/audioserver-startplaybackstream-potential-leak 2021-10-19 08:09:45 +02:00
PouleyKetchoupp
cc39dca9f7 Rename Godot Physics classes from *SW to Godot*
Also moved MT physics server wrappers to the main servers folder, since
they don't have to be implementation specific.
2021-10-18 17:01:10 -07:00
Robin Arys
0e31465a59 Fix shaders that use TIME do not force editor to continuously update 2021-10-18 22:53:20 +02:00
Haoyu Qiu
2200544141 Validate enum range in RendererViewport::viewport_get_render_info 2021-10-18 22:58:38 +08:00
Mark Riedesel
61ab63a4be fix potential memory leak of AudioStreamPlaybackBusDetails in AudioServer::start_playback_stream() 2021-10-18 10:47:11 -04:00
ConteZero
838c9d37b4 Added primary clipboard for Linux 2021-10-18 14:01:06 +02:00
bruvzg
7c4fbc31a6 [TextServer] Use round instead of floor for hex code box size calculation to better match font size. 2021-10-18 11:02:49 +03:00
Bastiaan Olij
5d1ea92daf Rework XR positional trackers 2021-10-17 12:12:20 +11:00
mennomax
b4eeeb315a
Swap args of Plane(point, normal) constructor
Now (normal, point)
2021-10-15 20:49:42 -05:00
Rémi Verschelde
5a276443bd
Merge pull request #53815 from Chaosus/fix_wireframe_render_mode 2021-10-15 16:19:36 +02:00
Yuri Roubinsky
31ad85881d Fix wireframe render mode 2021-10-15 06:53:52 +03:00
Brian Semrau
e9f1b0a0b2 Remove incorrect fog height density remapping 2021-10-14 16:09:45 -04:00
Brian Semrau
4fefd7cddd Fix several issues with directional shadows
- Internally disable blend splits in orthogonal directional shadow mode
- Fix soft shadows ignoring fade and blend_splits
- Fix soft shadow edge stability
2021-10-14 11:44:32 -04:00
Gilles Roudière
0587e5e018 Implement toast notifications in the editor 2021-10-14 13:30:54 +02:00
Brian Semrau
a62e240260 Fix the height fog effect 2021-10-14 04:08:39 -04:00
Yuri Roubinsky
e9b7ffd1fa Added few more built-ins to shader language 2021-10-13 20:27:36 +03:00
Rémi Verschelde
88463c3eee
Merge pull request #53712 from CakHuri/nullptr
Replace NULL with nullptr
2021-10-12 22:30:43 +02:00
M. Huri
033dc4dbef Replaced NULL with nullptr 2021-10-12 20:20:19 +07:00
Aaron Franke
7e51e4cb84
Fix some LGTM errors of "Multiplication result converted to larger type" 2021-10-12 00:17:27 -05:00
Yuri Roubinsky
db2ee03fff Fix shader crash on using METALLIC and ROUGHNESS built-ins in light func 2021-10-11 13:35:53 +03:00
Rémi Verschelde
b47580a7a4
Merge pull request #53641 from DeeJayLSP/audio_pitch_fix 2021-10-11 09:22:49 +02:00
Douglas Leão
39a90751dc Allow AudioStreamPlayer(2D) to provide pitch_scale on playback 2021-10-10 18:52:29 -03:00
Rémi Verschelde
09b0293fad
Merge pull request #53066 from Chaosus/shader_funcs 2021-10-10 21:37:07 +02:00
Joan Fons
8ab7ca4b32 Fix auto LOD generation for blendshapes. 2021-10-09 20:31:28 +02:00
Rémi Verschelde
5ae569560d
Fix missing argument names in bindings
While at it, tweak some boolean setters to use `p_enabled` for the bool.

Also renames `draw_minimap()` to `set_draw_minimap()`.
2021-10-09 00:20:10 +02:00
Hugo Locurcio
73c6e19acc
Allow any floating-point value as a 3D rendering scale option
This allows for finer control over 3D rendering resolution.
Supersampling can also be performed by setting a 3D rendering
resolution above 1.0, which is useful for offline rendering or
for very high-end GPUs.
2021-10-08 18:22:10 +02:00
Rémi Verschelde
96767c18f8
Merge pull request #53527 from Chaosus/shader_array 2021-10-08 12:37:05 +02:00
Yuri Roubinsky
b1ac3e256f Allow declare the shader arrays with a size defined before identifier 2021-10-08 10:28:31 +03:00
Rémi Verschelde
a6c4de49e1
Merge pull request #53523 from Calinou/remove-occlusion-color 2021-10-07 22:26:10 +02:00
Hugo Locurcio
265bae824f
Remove unimplemented Environment.ambient_light_occlusion_color property
This property was intended to provide a way to have SSAO or VoxelGI
ambient occlusion with a color other than black. However, it was
dropped during the Vulkan renderer development due to the performance
overhead it caused when the feature wasn't used.
2021-10-07 17:47:52 +02:00
Hugo Locurcio
bcf4a56c74
Replace references to VisualServer in code comments with RenderingServer
VisualServer no longer exists in the `master` branch.
2021-10-07 15:49:41 +02:00
Yuri Roubinsky
e707391fb8 Fix shader crash when passing array to index expression 2021-10-07 10:48:32 +03:00
Yuri Roubinsky
410cab4c61
Merge pull request #53491 from Chaosus/shader_fix_texture_array_uniforms 2021-10-07 10:00:12 +03:00
Rémi Verschelde
149e10da1c
Merge pull request #53504 from clayjohn/VULKAN-sky-bug
Remove bogus sky error check
2021-10-07 08:09:01 +02:00
Rémi Verschelde
3f94a5ebe7
Merge pull request #51115 from clayjohn/VULKAN-SSAO-radius
Move assignment of SSAO radius push constant
2021-10-07 08:04:17 +02:00
clayjohn
23dc490f40 Remove bogus sky error check 2021-10-06 22:04:56 -07:00
Yuri Roubinsky
b5028da5c0 Fix regression which prevents using texture array uniforms 2021-10-06 22:31:07 +03:00
Yuri Roubinsky
be6f36a66d Add missing shader built-ins 2021-10-05 20:50:26 +03:00
Rémi Verschelde
08eee3a669
Merge pull request #53425 from Chaosus/shader_fix 2021-10-05 13:06:32 +02:00
Yuri Roubinsky
7c07ae4c50 Fix shader crash when passing array.length to functions
and similar cases
2021-10-05 12:49:59 +03:00
Rémi Verschelde
6637207c70
Merge pull request #53420 from nekomatata/fix-tilemap-moving-platform 2021-10-05 10:50:56 +02:00
Yuri Roubinsky
0e1f4628f4
Merge pull request #53412 from Chaosus/shader_fix_uniform_arrays 2021-10-05 06:56:58 +03:00
Camille Mohr-Daurat
4778770d3c
Merge pull request #53365 from danger-dan/wakeup_fix
Use wakeup() function to wake sleeping bodies on impulse, force and velocities. Fix for PR #52967
2021-10-04 18:03:35 -07:00
Daniel
243f235300 Changed from directly waking bodies to using the wakeup() functions in direct body state changes (forces, impulses and veloicities). this 'bug' was introduced in PR #52967
added wakeup to 2d direct body
2021-10-05 13:17:05 +13:00
Yuri Roubinsky
69ece73653 Fix syntax parsing error of uniform arrays declaration in shader 2021-10-04 23:19:43 +03:00
PouleyKetchoupp
4f8d761be6 Fix physics glitch with TileMap moving platforms
Added a parameter in test_body_motion to exclude attached objects from
collision, used to avoid collision with all TileMap tiles with moving
platform motion instead of just the one tile the character touches.

Same changes made in 3D for consistency, and handling potential similar
cases.
2021-10-04 12:27:42 -07:00
Rémi Verschelde
5b270278c8
Merge pull request #53280 from nekomatata/test-body-motion-parameters 2021-10-04 21:05:38 +02:00
PouleyKetchoupp
3ae5687d48 Script interface improvements for test body motion
-Physics servers test body motion use a class to hold parameters instead
of multiple arguments to make it more readable and flexible since there
are many options
-Improved documentation for test body motion and kinematic collision
-Removed read-only properties for body motion results (not handled in
scripts, so they should be get_ methods only instead)
2021-10-04 10:49:10 -07:00
Rémi Verschelde
a2361851dc
Merge pull request #53398 from nekomatata/soft-body-index-check
Fix remaining crashes with pinned vertices in GodotPhysics Soft Body
2021-10-04 19:21:08 +02:00
Yuri Roubinsky
87e7f793e4
Merge pull request #49485 from Chaosus/shader_uniform_arrays 2021-10-04 19:16:19 +03:00
PouleyKetchoupp
f9702cc8d0 Fix crashes with pinned vertices in GodotPhysics Soft Body 2021-10-04 08:45:27 -07:00
Rémi Verschelde
2a09e11986
Merge pull request #52802 from V-Sekai/gltf-extensions 2021-10-04 15:52:24 +02:00
Yuri Roubinsky
6873ecaaf9 Added support for uniform arrays in shaders 2021-10-04 13:57:44 +03:00
Haoyu Qiu
f3816898fa Fix crash when pinned SoftBody point is out of range 2021-10-04 16:42:53 +08:00
K. S. Ernest (iFire) Lee
1463fc889b GLTF for game templates.
Convert GLTF Document to use ImporterMeshInstance3D.

Add a GLTFDocument extension list and an extension for converting the importer mesh instance 3d to mesh instance 3d.

Use GLTF module when the editor tools are disabled.

Modified the render server to be less restrictive on matching blend arrays and have more logging.

Misc bugs with multimesh.

Always index the meshes.
2021-10-03 12:37:52 -07:00
Rémi Verschelde
a88e82078d
Merge pull request #42364 from madmiraal/fix-39887 2021-10-03 13:41:25 +02:00
bruvzg
27e9d07f11 Remove Scene dependency from the TextServer, use scalable hex box font instead of built-in bitmap one. 2021-10-03 00:22:10 +03:00
Camille Mohr-Daurat
fdd25d7c84
Merge pull request #53311 from nekomatata/soft-body-remove-mesh-reference
Remove scene code in physics servers
2021-10-01 09:56:49 -07:00
PouleyKetchoupp
b8eeb34b4e Remove scene code in physics servers
Replaced Mesh with mesh RID in Godot Physics 3D and Bullet.
2021-10-01 08:42:47 -07:00
bruvzg
0c0b5c84b0 Implement TextServer GDExtension interface, remove TextServer GDNative interface. 2021-10-01 15:13:29 +03:00
Rémi Verschelde
a7011fa294
Merge pull request #52684 from Frixuu/master 2021-10-01 11:53:01 +02:00
Rémi Verschelde
6ed3e9c182
Merge pull request #53208 from timothyqiu/headless-crash 2021-10-01 11:29:19 +02:00
Lightning_A
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
Camille Mohr-Daurat
1c0ae31c9e
Merge pull request #53266 from nekomatata/remove-shape-metadata
Remove shape metadata from 2D physics server
2021-09-30 12:11:50 -07:00
Juan Linietsky
c370b4c4d0
Merge pull request #52544 from JFonS/lod_fixes
Auto LOD fixes and improvements
2021-09-30 14:49:11 -03:00
PouleyKetchoupp
d0ec46be68 Remove shape metadata from 2D physics server
Shape metadata was only used to get tile information when colliding with
tilemaps. It's not needed anymore since there's an API in tilemap using
body ids instead.
2021-09-30 10:45:36 -07:00
Hugo Locurcio
ba65730cbf
Rename RID's getornull() to get_or_null() 2021-09-29 23:58:02 +02:00
Manuel Dun
485eac3d3f radial fog fix 2021-09-29 15:49:59 -04:00
Haoyu Qiu
9dd0d3f550 Don't memcpy to nullptr even if length is zero 2021-09-29 20:58:14 +08:00
Rémi Verschelde
4c1d2e9350
Merge pull request #53199 from Geometror/fix-skeleton2d 2021-09-29 13:47:12 +02:00
Haoyu Qiu
82f7f2c46c Fix crash in headless mode 2021-09-29 17:24:53 +08:00
Camille Mohr-Daurat
341b532d5e
Merge pull request #52754 from nekomatata/dynamic-body-modes
Clarify RigidDynamicBody modes
2021-09-28 17:11:17 -07:00
Hendrik Brucker
6a9f3746af Fix editor freeze when asigning Skeleton2D to Polygon2D 2021-09-29 01:50:01 +02:00
Rémi Verschelde
4296539d94
Merge pull request #53072 from CaptainProton42/fix-gpuparticles3d-generate-aabb 2021-09-28 16:20:22 +02:00
Bastiaan Olij
0320532876
Merge pull request #52864 from BastiaanOlij/xr_extension_return_buffers
Fix access to render target texture for XR interfaces
2021-09-28 20:19:20 +10:00
Rémi Verschelde
60988a06c2
Merge pull request #52953 from nekomatata/fix-collision-recovery-depth 2021-09-28 12:11:38 +02:00
Bastiaan Olij
cbdde9dff9 Fix access to render target texture for XR interfaces 2021-09-28 19:46:50 +10:00
PouleyKetchoupp
bf523a2b2a Improved logic for CharacterBody collision recovery depth
Allows 2D character controller to work without applying gravity when
touching the ground (also more safely in 3D), and collision detection
is more flexible with different safe margin values.

Character body motion changes in 2D and 3D:
-Recovery only for depth > min contact depth to help with collision
detection consistency (rest info could be lost if recovery was too much)
-Adaptive min contact depth (based on margin) instead of space parameter

Extra CharacterBody changes:
-2D: apply changes made in 3D for stop on slope and floor snap that help
fixing some jittering cases
-3D: fix minor inconsistencies in stop on slope and floor snap logic
2021-09-27 15:31:41 -07:00
jfons
9e1810695c Auto LOD fixes and improvements
* Fixed LODs for shadow meshes.
* Added a merging step before simplification. This helps with tesselated
  meshes that were previously left untouched. The angle difference at
  wich edges ar considered "hard" can be tweaked as an import setting.
* LODs will now start with the highest decimation possible and keep
  doubling (approximately) the number of triangles from there. This
  makes sure that very low triangle counts are included when possible.
* Given more weight to normal preservation.
* Modified MeshOptimizer to report distance-based error instead of
  including attributes in the reported metrics.
* Added attribute transference between the original mesh and the
  various LODs. Right now only normals are taken into account,
  but it could be expanded to other attributes in the future.
2021-09-27 17:04:56 +02:00
CaptainProton42
1731030b3c Fix GPUParticles3D local_coords 2021-09-26 00:30:37 +02:00
CaptainProton42
dd70daafba Fix GPUParticles3D generate AABB 2021-09-26 00:30:37 +02:00
Anilforextra
cdd912c48e Construct values only when necessary. 2021-09-25 14:46:45 +05:45
Rémi Verschelde
fb4fadfd1e
Merge pull request #52967 from danger-dan/dev_vehicle_sleep_fix 2021-09-24 11:47:15 +02:00
Daniel
e8efe621d5 Added set_active(true) to all body direct state force apply/impulses. #52915 2021-09-24 17:22:51 +12:00
Anilforextra
cc51b045da Construct values only when necessary. 2021-09-23 22:26:07 +05:45
Yuri Roubinsky
e9e21a592e Prevents editor crash when compare with negative float in shader 2021-09-22 13:26:40 +03:00