Commit graph

2412 commits

Author SHA1 Message Date
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
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
Bastiaan Olij
32ddcaf15e Add missing parameter names to _commit_views GDVIRTUAL_BIND 2021-09-05 11:51:13 +10: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
Ellen Poe
3598d300cb Do all audio mixing in the AudioServer 2021-08-27 10:41:57 -07:00
Ellen Poe
53843ba872 Require AudioStream::mix to return the number of frames successfully mixed 2021-08-27 10:27:58 -07:00
PouleyKetchoupp
cc43c2ea16 Optimize area detection and intersect_shape queries with concave shapes
Whenever contact points are not needed, collision checks with concave
shapes (triangle mesh and heightmap) stop at the first colliding
triangle.
2021-08-27 09:53:40 -07:00
K. S. Ernest (iFire) Lee
90a35dac48
Merge pull request #51908 from bruvzg/msdf_fonts2
Make FontData importable resource. Add multi-channel SDF font rendering.
2021-08-27 08:51:37 -07:00
Camille Mohr-Daurat
ca4f20529c
Merge pull request #51896 from nekomatata/restore-ray-shape
Refactor RayShape and rename to SeparationRayShape
2021-08-27 08:49:49 -07:00
Juan Linietsky
712bcf564f
Merge pull request #52092 from Calinou/voxelgi-remove-anisotropic-leftovers
Remove leftovers of anisotropy in the VoxelGI shader code
2021-08-27 12:22:57 -03:00
bruvzg
4c3f7d1290 Makes FontData importable resource.
Adds multi-channel SDF font texture generation and rendering support.
Adds per-font oversampling support.
Adds FontData import plugins (for dynamic fonts, BMFonts and monospaced image fonts), font texture cache pre-generation and loading.
Adds BMFont binary format and outline support.
2021-08-27 15:43:18 +03:00
Bastiaan Olij
c5f62fad90
Merge pull request #52003 from BastiaanOlij/xr_interface_extension
Adding GDExtension support to XRInterface
2021-08-27 11:51:43 +10:00
Camille Mohr-Daurat
f89adbf112
Merge pull request #51801 from nekomatata/area-one-directional-layer-check
One-directional layer check for Area vs. RigidBody/SoftBody/Area
2021-08-26 07:59:06 -07:00
Bastiaan Olij
86ff7f8550 Adding GDExtension support to XRInterface 2021-08-26 23:24:44 +10:00
Bastiaan Olij
64626cc435 Optionally scale 3D render content 2021-08-26 20:48:40 +10:00
Bastiaan Olij
6e87d62873
Merge pull request #50883 from BastiaanOlij/mobile_hdr
Scale color output in the mobile renderer to provide HDR support
2021-08-26 11:23:22 +10:00
PouleyKetchoupp
6a9ed72185 Clean physics direct body state usage in 2D and 3D physics
Use a C++ callback instead of Callable for synchronizing physics nodes' state with physics servers.

Remove usage of PhysicsDirectBodyState in physics nodes when not
necessary.

Store PhysicsDirectBodyState for bodies individually instead of a
singleton to avoid issues when accessing direct body state for multiple
bodies.

PhysicsDirectBodyState is initialized only when needed, so it doesn't
have to be created when using the physics server directly.

Move PhysicsDirectBodyState2D and PhysicsDirectBodyState3D to separate
cpp files.
2021-08-25 08:57:42 -07:00
JFonS
c334989e00
Merge pull request #51821 from Calinou/builtin-shaders-add-comments
Add comments at the top of each built-in shader to ease debugging
2021-08-25 11:37:57 +02:00
Hugo Locurcio
6a6c0890c2
Remove leftovers of anisotropy in the VoxelGI shader code
Anisotropy support was removed when VoxelGI was reworked as it was
too demanding on the GPU.
2021-08-25 10:23:28 +02:00
PouleyKetchoupp
3d5dc80348 Rename RayShape to SeparationRayShape
Makes it clearer that it's used for special cases when picking a
collision shape.
2021-08-24 17:34:55 -07:00
PouleyKetchoupp
aa4791735d Rename slips_on_slope to slide_on_slope
Also added some precision to the documentation.
2021-08-24 17:34:55 -07:00
PouleyKetchoupp
d9720d4395 Fix CharacterBody motion with RayShape
Make separation ray shapes work properly in move_and_slide, wihtout the
specific code in CharacterBody like before.

Now most of the logic is handled inside the physics server. The only
thing that's needed is to use ray shapes only for recovery and ignore
them when performing the motion itself (unless we're snapping or slips
on slope is on).
2021-08-24 17:34:55 -07:00
PouleyKetchoupp
829fb4fba1 Fix RayShape collision detection
One-way collision is disabled for both rigid bodies and character
bodies.

Kinematic margin is now applied to ray shapes to help getting consistent
results in slopes and flat surfaces.

Convex shapes don't return inverted normals when a segment test starts
inside (raycasting will be made consistent in a separate patch).

Ray shapes also discard contacts when fully contained inside a shape
and when the contact direction is inverted, so the behavior is
consistent with all shape types. Now they always separate only when
intersecting the top of a shape (for downward rays).
2021-08-24 16:03:05 -07:00
PouleyKetchoupp
45c7af9862 Restore RayShape as a regular shape type
Partial revert from previously removing ray shapes completely, added
back as a shape type but without the specific character controller code.
2021-08-24 16:03:05 -07:00
PouleyKetchoupp
9c9e528e3e Fix point gravity calculation
Removing the + 1 in point gravity formula when using distance scale to
make it more accurate for standard gravitation.

Fixes precession in orbits for games using gravitation.

Also moved gravity calculation to area to use it for both rigid bodies
and soft bodies in 3D (same change in 2D for consistency).

Co-authored-by: Ryan Peach <ryan.peach@keysight.com>
2021-08-24 09:32:28 -07:00
Camille Mohr-Daurat
770a1d00a3
Merge pull request #51751 from jeffrey-cochran/windforce
Created an area-specific wind force that interacts with soft bodies
2021-08-23 16:48:19 -07:00
reduz
44d62a9f4b Implement NativeExtension pointer arguments
* Allows calling into native extensions directly with a pointer
* Makes it easier to implement some APIs more efficiently
* Appears with a "*" in the documentation for the argument.
* Implementing the pointer handling is entirely up to the implementation, although the extension API provides some hint.
* AudioStream has been implemented as an example, allowing to create NativeExtension based AudioStreams.
2021-08-23 19:58:40 -03:00
Jeffrey Cochran
e806397196 Enabled area-specific wind forces 2021-08-23 17:00:50 -04:00
Max Hilbrunner
583b6a594a
Merge pull request #51971 from aaronfranke/https
Replace HTTP URLs with HTTPS for sites with HTTPS versions
2021-08-23 15:58:54 +02:00
Michael Alexsander
88db541705
Merge pull request #51947 from AnilBK/redundant-assignments
[cppcheck] Remove some redundant assignments.
2021-08-23 13:23:45 +00:00
Bastiaan Olij
d22163c657 Scale color output in the mobile renderer to provide HDR support 2021-08-23 15:30:36 +10:00