Commit graph

2544 commits

Author SHA1 Message Date
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
fabriceci
fd9e573ba6 Port 2D improvement to move and slide 3D
Co-authored-by: Camille Mohr-Daurat <pouleyketchoup@gmail.com>
2021-09-22 00:14:04 +02:00
Rémi Verschelde
ba57252bd8
Merge pull request #52878 from AnilBK/add-get-center 2021-09-21 21:30:30 +02:00
Anilforextra
90908cd67d Add Get Center Method for Rect2/Rect2i and AABB. 2021-09-21 21:14:17 +05:45
Bastiaan Olij
c527078634 Change to using doubles in XR classes 2021-09-21 22:46:31 +10:00
bruvzg
c931906af7 Add flag to connected grapheme. Apply RTL displacement FX only to the whole connected grapheme. Pass more glyph info to the custom RTL FX. 2021-09-21 13:51:38 +03:00
Frixuu
650e63a7ca Allow for mapping keycodes to current layout 2021-09-21 00:03:02 +02:00
Rémi Verschelde
62aed73d88
Merge pull request #52545 from JFonS/occ_fixes
Occlusion culling fixes
2021-09-20 13:20:03 +02:00
Yuri Roubinsky
f68d3f67b5 Fix shader crash when passing array to built-in function without index 2021-09-18 14:05:14 +03:00
Aaron Franke
bf0213470c
Replace Vector3.to_diagonal_matrix with Basis.from_scale 2021-09-17 10:30:30 -05:00
Rémi Verschelde
ec23d1348a
Merge pull request #52409 from GiantBlargg/position-depth-pre-pass 2021-09-17 14:21:29 +02:00
PouleyKetchoupp
ed1ba5093f Clarify RigidDynamicBody modes
RigidDynamicBody modes are replaced with several properties to make their
usage clearer:
-lock_rotation: disable body's rotation (instead of MODE_LOCKED)
-freeze: no gravity or forces (instead of MODE_STATIC and MODE_KINEMATIC)
-freeze_mode: Static (can be only teleported) or Kinematic (can be animated)

Also renamed MODE_DYNAMIC_LOCKED to MODE_DYNAMIC_LINEAR in the physics
servers.
2021-09-16 16:03:48 -07:00
Camille Mohr-Daurat
062cff373a
Merge pull request #52668 from qarmin/cppcheck_servers_physics
Initialize variables in servers/physics
2021-09-16 09:06:03 -07:00
Camille Mohr-Daurat
1852afb6b0
Merge pull request #52679 from nekomatata/world-boundary-shape
Rename WorldMarginShape to WorldBoundaryShape
2021-09-15 16:02:40 -07:00
qarmin
91257c3900 Initialize variables in servers/physics 2021-09-15 19:41:32 +02:00
Fabio Alessandrelli
d187bb4e11 [HTML5] Use browser mix rate by default on the Web.
Browsers doesn't really like forcing the mix rate, e.g. Firefox does not
allow input (microphone) if the mix rate is not the default one, Chrom*
will exhibit worse performances, etc.
2021-09-15 11:56:21 +02:00
PouleyKetchoupp
bb75aec8bc Rename WorldMarginShape to WorldBoundaryShape 2021-09-14 11:16:31 -07:00
Aaron Franke
3a902c66c4
Revert some URLs from the "Replace HTTP URLs with HTTPS" PR 2021-09-13 15:18:35 -05:00
Rémi Verschelde
70ba366743
Merge pull request #50375 from Paulb23/code_edit_unit_tests 2021-09-13 21:51:20 +02:00
Rémi Verschelde
8ecc571158
Merge pull request #49063 from Calinou/remove-16x-msaa
Remove 16× MSAA support due to driver bugs and low performance
2021-09-13 17:34:04 +02:00
Rémi Verschelde
078bdef7e9
Merge pull request #51939 from clayjohn/VULKAN-horizon-so-fix
Compute horizon SO threshold before transformation
2021-09-13 11:44:42 +02:00
JFonS
5f69218edc
Merge pull request #51604 from TechnoPorg/fix-vulkan-parent-material
Vulkan: Fix CanvasItem::use_parent_material
2021-09-12 01:00:30 +02:00
Lyuma
aca4b737f1 8 uvs for glTF2, URI decode and Vertex Custom api.
Add glTF2 uri decode for paths.

Add vertex custom apis.

Add scene importer api.

Change Color to float; add support for float-based custom channels in SurfaceTool and EditorSceneImporterMesh

Co-authored-by: darth negative hunter
 <thenegativehunter2@users.noreply.github.com>
2021-09-10 09:16:48 -07:00
jfons
d6fb8e1d93 Occlusion culling fixes 2021-09-10 18:15:10 +02:00
Juan Linietsky
7c9cdea836
Merge pull request #52476 from Lauson1ex/master
Replace current ACES tonemapper with a high quality one
2021-09-09 19:13:44 -03:00
Juan Linietsky
3c554f09ea
Merge pull request #52252 from Calinou/sdfgi-use-light-indirect-energy
Use the Light3D Indirect Energy property in SDFGI
2021-09-09 17:17:48 -03:00
Bastiaan Olij
506ae80876 Expose Vulkan internal values for access from extensions 2021-09-09 22:28:32 +10:00
Endri Lauson
065d13eddc Replace ACES tonemapper with a high quality one 2021-09-07 19:46:02 -03:00
Juan Linietsky
ca11f8ad30
Merge pull request #52237 from ellenhp/polyphony
Add optional polyphonic playback to built-in audio player nodes
2021-09-07 17:38:51 -03:00
Ellen Poe
0e3cab41eb Add polyphony to Audio Stream Player nodes 2021-09-07 09:44:39 -07:00
Max Hilbrunner
acc776f7b6
Merge pull request #52442 from Faless/mp/4.x_rpc_manager
[Net] Move multiplayer classes to own subfolder. Split RPC from MultiplayerAPI.
2021-09-07 18:44:39 +02:00
Fabio Alessandrelli
bf9aae09ba [Net] Move multiplayer to core subdir, split RPCManager.
Move multiplayer classes to "core/multiplayer" subdir.

Move the RPCConfig and enums (TransferMode, RPCMode) to a separate
file (multiplayer.h), and bind them to the global namespace.

Move the RPC handling code to its own class (RPCManager).

Renames "get_rpc_sender_id" to "get_remote_sender_id".
2021-09-07 11:14:30 +02:00
Camille Mohr-Daurat
29bdd000f0
Merge pull request #48708 from nekomatata/heightmap-raycast-acceleration
Optimize raycast with large Heightmap shape data
2021-09-06 16:22:16 -07:00
Bastiaan Olij
461d31427c
Merge pull request #52205 from BastiaanOlij/blit_source_rect
Add source rectangle to blit
2021-09-07 09:21:13 +10:00
Bastiaan Olij
76b83ff615
Merge pull request #52405 from BastiaanOlij/xr_extension_missing_names
Add missing parameter names to _commit_views GDVIRTUAL_BIND
2021-09-07 09:20:49 +10:00
PouleyKetchoupp
8d56354f7c Optimize raycast with large Heightmap shape data
Port raycast accelerator from Bullet's btHeightfieldTerrainShape.
2021-09-06 16:01:44 -07:00
PouleyKetchoupp
82ea2a7045 Proper support for custom mass properties in 2D/3D physics bodies
Changes:
-Added support for custom inertia and center of mass in 3D
-Added support for custom center of mass in 2D
-Calculated center of mass from shapes in 2D (same as in 3D)
-Fixed mass properties calculation with disabled shapes in 2D/3D
-Removed first_integration which is not used in 2D and doesn't seem to
make a lot of sense (prevents omit_force_integration to work during the
first frame)
-Support for custom inertia on different axes for RigidBody3D
2021-09-06 10:20:16 -07:00
Camille Mohr-Daurat
e1ae2708ee
Merge pull request #52271 from nekomatata/query-layer-default-mask
Harmonize default value for collision mask in ray/shape queries
2021-09-06 09:33:18 -07:00
Daniel Doran
3138b94058 Fix depth pass for shaders that set POSITION 2021-09-05 01:05:42 -06:00
Bastiaan Olij
32ddcaf15e Add missing parameter names to _commit_views GDVIRTUAL_BIND 2021-09-05 11:51:13 +10:00
Paulb23
24d02d0b4e Fix dummy rendering server memory leaks 2021-09-01 16:46:04 +01:00
Paulb23
d186862338 Fix InputMap and display server not nulling singleton on free 2021-09-01 16:46:04 +01:00
PouleyKetchoupp
83baecdff0 Add AnimatableBody inherited from StaticBody for moving platforms
Instead of having a physics node named Static that can be either Static
or Kinematic, AnimatableBody is added again as a separate node:
-Inherited from StaticBody to make its usage clearer
-Still separated from CharacterBody to make its usage more focused

Properly implemented constant velocity for kinematic bodies in godot
physics servers (induced velocity without actually moving).

Also updated description for the different physics nodes to make their
usage clearer.
2021-08-31 18:14:32 -07:00
Clay John
036b7a0985
Merge pull request #51873 from Chaosus/fix_uniform_error_spam
Fix incorrect checking of uniform set to prevent error spam (2)
2021-08-31 11:28:48 -07:00
Juan Linietsky
7946066577
Merge pull request #49471 from nekomatata/body-state-sync-callback
Clean physics direct body state usage in 2D and 3D physics
2021-08-31 14:30:17 -03:00
PouleyKetchoupp
26bd432707 Harmonize default value for collision mask in ray/shape queries
The default mask for queries was 0, 0x7FFFFFFF or 0xFFFFFFFF depending
on the cases.

Now always using 0xFFFFFFFF (in the form of UINT32_MAX to make it clear)
in order to use all layers by default.
2021-08-30 16:42:49 -07:00
Hugo Locurcio
2c507cd426
Use the Light3D Indirect Energy property in SDFGI
The Indirect Energy property was previously ignored in SDFGI
(unlike VoxelGI).
2021-08-30 14:53:03 +02:00
Bastiaan Olij
fbac863bfb Add source rectangle to blit 2021-08-29 14:57:16 +10:00
Max Hilbrunner
7368004869
Merge pull request #52176 from BastiaanOlij/fix_gl_size_param
Fix double named size parameter
2021-08-28 19:35:20 +02:00
Bastiaan Olij
b9c64df69b Fix double named size parameter 2021-08-28 13:30:43 +10:00
Fabio Alessandrelli
dcf2d09231
Merge pull request #52070 from nekomatata/area-point-gravity-fix
Fix point gravity calculation
2021-08-28 05:10:15 +02:00
Juan Linietsky
54caaa21ce
Merge pull request #51296 from ellenhp/mix_in_audio_server
Move mixing out of the AudioStreamPlayback* nodes
2021-08-27 15:38:20 -03:00