Commit graph

4067 commits

Author SHA1 Message Date
Rémi Verschelde
57540ae00d
Merge pull request #70858 from Malcolmnixon/fast-concave-support
Optimize GodotConvexPolygonShape3D::get_support
2023-01-07 13:17:39 +01:00
bruvzg
2718a7b7d3
Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02:00
Bastiaan Olij
9b549231e4 Move luminance effect into its own class and use new buffers system 2023-01-07 14:40:42 +11:00
Rémi Verschelde
163f6f5fe8
Merge pull request #68429 from KoBeWi/PropertySettings
Add PropertyInfo overload for GLOBAL_DEF
2023-01-06 22:59:29 +01:00
EpEpDragon
36d02882b9 Added optional offset and size parameter to RenderDevice buffer_get_data method 2023-01-06 17:08:37 +02:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Rémi Verschelde
a5e43daca1
Merge pull request #70929 from clayjohn/RD-mobile
Use proper indices for lights, decals, and reflection probes in mobile scene shader
2023-01-05 12:57:46 +01:00
Rémi Verschelde
0668b64c32
Merge pull request #70924 from clayjohn/canvas-bg-bugs
Always try to clear render target before drawing 3D with Canvas BG mode
2023-01-05 12:57:39 +01:00
clayjohn
aaa9d626f3 Use proper indices for lights, decals, and reflection probes in mobile scene shader 2023-01-04 14:03:48 -08:00
clayjohn
72bc7e5a9d Always try to clear render target before drawing 3D with Canvas BG mode
This is necessary to ensure that we aren't copying garbage data to the 3D renderbuffer
2023-01-03 15:46:03 -08:00
Rémi Verschelde
0160fea1ce
Merge pull request #70884 from clayjohn/Depth-prepass
Ignore depth draw optimization when using depth draw alpha prepass
2023-01-03 23:23:29 +01:00
Rémi Verschelde
698ee56e54
Merge pull request #70638 from markusneg/cull-masked-shadows-gd4
Visual instance layers are regarded during shadow culling
2023-01-03 23:22:31 +01:00
clayjohn
062fb8b0dc Ignore depth draw optimization when using depth draw alpha prepass
This is necessary as the scene shader still uses alpha in this case so we can't discard fragments that weren't written to the depth buffer
2023-01-03 12:33:07 -08:00
Rémi Verschelde
8791e333da
Merge pull request #70624 from bruvzg/cur_sc
Improve `window_set_current_screen` and fix secondary window initial mode and positions.
2023-01-03 15:56:05 +01:00
Rémi Verschelde
432c0dee7c
Merge pull request #70708 from rburing/bind_pin_joint_set_param_2d
Bind setter and getter for pin joint parameters in `PhysicsServer2D`
2023-01-03 12:39:43 +01:00
Rémi Verschelde
151e1355e8
Merge pull request #63650 from fabriceci/apply-moving-platform-angular-velocity
Allow to apply the angular velocity of a moving platform
2023-01-03 12:39:35 +01:00
Rémi Verschelde
1b634c06d0
Merge pull request #69972 from adamscott/add-server-checks-before-free
Add safety-checks before some servers `free()`
2023-01-03 12:22:24 +01:00
Rémi Verschelde
6d7f6c1eb9
Merge pull request #70654 from Malcolmnixon/concave_collisions
Fix move_and_collide for concave CharacterBody3D objects
2023-01-03 12:20:11 +01:00
Malcolm Nixon
37e4f8befa Micro-optimizations of the GodotConvexPolygonShape3D::get_support function. Specifically this uses pointer-array-dereference rather than LocalVector<T> dereference as this performs range-checking on known-good indexes.
Added more comments. Changed loops back to classic for-iteration style.
2023-01-02 21:15:46 -05:00
Peter Eastman
d1f95c75cc Analytic sphere-box, sphere-cylinder, and capsule-cylinder collisions 2023-01-02 12:30:16 -08:00
Malcolm Nixon
220e8a0390 Modified the collision_sphere_capsule function to only test the one "correct" axis which corresponds to the correct collision normal.
Added logically identical fix to the capsule/capsule collision, and verified it now produces correct collision points and normals.

Added analytic_sphere_collision helper function which reports the A and B points directly without using SAT.

Modified _collision_sphere_sphere, _collision_sphere_capsule, and _collision_capsule_capsule to use the new analytic_sphere_collision.

Fix white-space issue

Additional code formatting fixes.

Updated new analytic_sphere_collision to correctly handle null collector callback.
2023-01-02 14:52:19 -05:00
Adam Scott
ea33001b95 Add safety-checks before some servers free() 2022-12-29 16:23:38 -05:00
Mikael Hermansson
ba8af83679 Bind methods related to physics query exclusions 2022-12-29 19:29:08 +01:00
Ricardo Buring
6bc313c765 Bind setter and getter for pin joint parameters in PhysicsServer2D 2022-12-29 17:36:08 +01:00
bruvzg
f7955633de
Improve window_set_current_screen and fix secondary window initial mode and positions. 2022-12-29 09:43:39 +02:00
Malcolm Nixon
dfa2a0c9ae Remove unnecessary bail-out if shape A is concave. The test for A being concave is already performed later. 2022-12-27 20:45:43 -05:00
Markus Grafen
041b64ea7e visual instance layers are regarded during shadow culling
Partially cherry-picked from 16517ecb. Todos:
- setting Camera cull_mask should mark affected shadows dirty somehow
2022-12-27 18:43:53 +01:00
Bastiaan Olij
8bf16b0ce5 Fix errors related to reflection probe now using a render buffers object 2022-12-26 22:23:22 +11:00
stmSi
2041616934 Fix Editor hanging if audiostream's pitch_scale is NaN 2022-12-24 12:39:48 +06:30
Rémi Verschelde
f064898956
Merge pull request #70253 from BastiaanOlij/cleanup_sky_render
Cleanup and improve sky render
2022-12-23 23:44:02 +01:00
Rémi Verschelde
d8a0382e3f
Merge pull request #70476 from BastiaanOlij/move_sdfgi_init
Move SDFGI update logic into clustered renderer
2022-12-23 23:43:56 +01:00
Rémi Verschelde
2e07477751
Merge pull request #70214 from Ansraer/speed-maybe
[4.x] Use depth prepass to increase opaque render performance
2022-12-23 23:43:50 +01:00
Ansraer
d44a91c2f7 use depth prepass to increase performance 2022-12-23 17:15:46 +01:00
Mikael Hermansson
c1379523ea Bind methods related to disabling collision between joint bodies 2022-12-23 14:16:33 +01:00
Bastiaan Olij
65ca9e6924 Move SDFGI update logic into clustered renderer 2022-12-24 00:00:11 +11:00
Rémi Verschelde
1cab6c91e9
Merge pull request #69998 from BastiaanOlij/sorting-pivot-4
Added options for sorting transparent objects (port of PR #63040)
2022-12-23 09:47:24 +01:00
Bastiaan Olij
e886a7af81 Cleanup and improve sky render 2022-12-23 19:45:19 +11:00
Bastiaan Olij
6f4f38db07 Added options for sorting transparent objects (port of PR 63040) 2022-12-23 19:30:33 +11:00
Rémi Verschelde
56b828eb82
Merge pull request #70457 from clayjohn/RD-particles-update
Avoid updating particles during 2D rendering
2022-12-23 09:11:58 +01:00
Rémi Verschelde
13850d7812
Merge pull request #70455 from clayjohn/RD-particle-trail
Check for disabled particle trail particle before initializing particle trail
2022-12-23 09:11:48 +01:00
Yuri Rubinsky
f28348fc5c Fix shader crash when using boolean type for vertex->fragment varyings 2022-12-23 07:47:49 +03:00
clayjohn
41021b07be Avoid updating particles during 2D rendering
In 2D the particle uniform set isn't obtained until the render pass. So in 2D just avoid rendering if not updated yet.
2022-12-22 12:04:34 -07:00
clayjohn
4d301ee21e Check for disabled particle trail particle before initializing particle trail 2022-12-22 11:30:59 -07:00
Rémi Verschelde
291add339f
Merge pull request #70422 from clayjohn/RD-trails
Disable particle trails particles when parent parent is not active.
2022-12-21 23:38:04 +01:00
clayjohn
eb10c71d6c Disable particle trails particles when parent parent is not active. 2022-12-21 15:19:57 -07:00
Rémi Verschelde
29464cb9dc
Merge pull request #70418 from clayjohn/RD-particles
Ensure that particles are processed at least once before being used
2022-12-21 22:46:30 +01:00
clayjohn
886cae515c Ensure that particles are processed at least once before being used 2022-12-21 14:06:05 -07:00
Rémi Verschelde
5ad02aa08d
Merge pull request #67111 from DarkKilauea/nav-queries-link
Added signal to NavigationAgent when entering a link
2022-12-21 19:38:20 +01:00
Rémi Verschelde
63f95c0e58
Merge pull request #70366 from quentinguidee/refactoring/fix-double-get-singleton
Fix double get_singleton()
2022-12-21 09:27:02 +01:00
Rémi Verschelde
4f3ec4121a
Merge pull request #70350 from Chaosus/stringname_operator
Add missing != operator to `StringName`
2022-12-21 09:21:32 +01:00
MrBlockers
569ead5762 Add optional arguments to AudioStreamRandomizer
Adds stream and weight parameters to add_stream. By default, weight is
1.0f.
2022-12-20 18:48:02 -05:00
Quentin Guidée
d9c05f7fbd
Fix double get_singleton()
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com>
2022-12-20 14:26:15 -05:00
Yuri Rubinsky
522d4243bf Add missing != operator to StringName 2022-12-20 17:25:54 +03:00
Rémi Verschelde
f318d60e06
Merge pull request #65376 from reduz/astc-support
Implement basic ASTC support
2022-12-20 12:44:30 +01:00
Juan Linietsky
71d21c7ccb Implement basic ASTC support
Implements basic ASTC support:
* Only 4x4 and 8x8 block sizes.
* Other block sizes are too complex to handle for Godot image compression handling. May be implemented sometime in the future.

The need for ASTC is mostly for the following use cases:
* Implement a high quality compression option for textures on mobile and M1 Apple hardware.
* For this, the 4x4 is sufficient, since it uses the same size as BPTC.

ASTC supports a lot of block sizes, but the benefit of supporting most of them is slim, while the implementation complexity in Godot is very high.
Supporting only 4x4 (and 8x8) solves the real problem, which is lack of a BPTC alternative on hardware where it's missing.

Note: This does not yet support encoding on import, an ASTC encoder will need to be added.
2022-12-20 11:26:30 +01:00
Rémi Verschelde
1dad415131
Merge pull request #70300 from RandomShaper/depth_format
Ensure depth buffer format picked actually supports full intended usage
2022-12-19 17:11:24 +01:00
Rémi Verschelde
adc1096b19
Merge pull request #70219 from bruvzg/msdf_outline_scaling
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior.
2022-12-19 16:26:56 +01:00
Rémi Verschelde
f117487ddb
Merge pull request #70236 from quentinguidee/refactor/delete-nullptr
AudioServer: Remove redundant nullptr check before `delete`
2022-12-19 16:26:39 +01:00
Pedro J. Estébanez
d8283550e6 Ensure depth buffer format picked actually supports full intended usage 2022-12-19 16:23:33 +01:00
Rémi Verschelde
e9f3e7111f
Merge pull request #70237 from quentinguidee/refactor/fix-comma-instead-of-semicolon
Fix use of comma instead of semicolon
2022-12-18 16:55:10 +01:00
Quentin Guidée
e0f1e02cc7
Fix use of comma instead of semicolon
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com>
2022-12-17 20:17:04 -05:00
Quentin Guidée
7465ca9587
Remove redundant nullptr check before delete 2022-12-17 19:57:16 -05:00
Josh Jones
5d8ba2b2d1 Add support for emitting a signal when entering a NavLink 2022-12-17 16:33:41 -08:00
smix8
34e7628f5f Fix Navigation API abbreviations inconsistency
Schema for navigation to name user facing API with  "navigation" without abbreviation and e.g. NavigationServer internals with abbr "nav".
2022-12-17 22:06:22 +01:00
bruvzg
20d9457f9d
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior. 2022-12-17 22:47:54 +02:00
smix8
4d68e2b18a Move NavigationPolygon to dedicated resource file
Moves NavigationPolygon resource class from NavigationRegion2D file to a dedicated file in resource folder.
2022-12-17 19:52:40 +01:00
Rémi Verschelde
c903312572
Merge pull request #70160 from Geekotron/ccd-regression-fix-70154
Fix regression 70154 caused by my prior CCD fix.
2022-12-17 14:03:43 +01:00
Rémi Verschelde
2b056115ef
Merge pull request #70091 from clayjohn/bone-aabbs
Remove mesh bone_aabbs as they are not used anywhere and calculating them is a pain
2022-12-17 12:32:32 +01:00
Rémi Verschelde
676f60b0cc
Merge pull request #70132 from clayjohn/RT-update
Implement render_target_was_used API so that Viewports can properly check if they have been used.
2022-12-17 12:26:51 +01:00
Rémi Verschelde
376290ea86
Merge pull request #70163 from clayjohn/particles-sdf
Transform sdf xfrom by particle emission transform when particles are in global space
2022-12-17 12:24:51 +01:00
Rémi Verschelde
740e5a6404
Merge pull request #70172 from clayjohn/RD-boot-filter
Enable using filtering on boot image in RD renderer
2022-12-17 12:24:24 +01:00
Rémi Verschelde
3b6d697676
Merge pull request #70133 from lyuma/negative_scale_backface
Flip culling when rendering a camera with negative scale
2022-12-17 12:22:18 +01:00
Rémi Verschelde
2b2c372dbc
Merge pull request #70122 from clayjohn/VRS-r8uint
Don't attempt to create or use an R8_UINT texture as storage if VRS is not supported
2022-12-17 12:22:03 +01:00
Rémi Verschelde
13593d8644
Merge pull request #70087 from clayjohn/mesh-aabb
Cache mesh AABB when modified by skeleton and update instance AABB when skeleton changes
2022-12-17 12:21:01 +01:00
clayjohn
669a87bd89 Enable using filtering on boot image in RD renderer 2022-12-16 13:42:03 -08:00
clayjohn
99a159cd9b Transform sdf xfrom by particle emission transform when particles are in global space 2022-12-16 11:55:11 -08:00
Geekotron
ae55229618 Fix regression 70154 caused by my prior CCD fix.
At high velocities `from - motion *.1` is *behind the RB* - not within its collider as the comment suggested - so it could not be used for determining movement length
2022-12-16 11:39:19 -07:00
clayjohn
5e90b90a97 Don't attempt to create or use an R8_UINT texture as storage if VRS is not supported 2022-12-16 09:53:12 -08:00
clayjohn
1b330820bf Implement render_target_was_used API so that Viewports can properly check if they have been used.
For the RD renderer, this does not work for Viewports used in scene shaders yet
2022-12-16 09:50:45 -08:00
Haoyu Qiu
207e52c161 Fix String::word_wrap() for long words
- Changes `TextServer.string_get_word_breaks()`
  - Returns pairs of boundary start and end offsets
  - Accepts `chars_per_line` to return line breaks
- Removes `String::word_wrap()`

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-12-16 13:18:57 +08:00
Lyuma
80dea918c4 Flip culling when rendering a camera with negative scale 2022-12-15 16:12:10 -08:00
bruvzg
53c76fa5d1
[RTL/TextServer] Add baseline inline alignment mode for objects and RTL tables. 2022-12-15 23:16:02 +02:00
Yuri Rubinsky
5c83e95103
Merge pull request #70016 from Chaosus/refactor_rd_shader_data
fixed https://github.com/godotengine/godot/issues/69949
2022-12-15 20:28:26 +03:00
Yuri Rubinsky
807632a90c Changed STORAGE_BUFFER_USAGE_DISPATCH_INDIRECT type to enum flags 2022-12-15 14:10:37 +03:00
Rémi Verschelde
762c6d4b36
Merge pull request #69709 from RandomShaper/refactor_spirv_reflection
Refactor SPIR-V reflection into a generic RenderingDevice feature
2022-12-15 09:21:35 +01:00
Rémi Verschelde
a194984e96
Merge pull request #70068 from clayjohn/mobile-lights
Initialize light index push constants to 0xFFFFFFFF instead of 0xFFFF
2022-12-15 09:20:44 +01:00
Rémi Verschelde
e1bcadd12d
Merge pull request #56804 from Calinou/ssr-add-max-roughness-cutoff
Add maximum roughness cutoff to SSR to improve performance
2022-12-15 09:20:29 +01:00
Yuri Rubinsky
56954485ed Refactor ShaderData & fix the sorting of shader uniforms 2022-12-15 10:02:59 +03:00
clayjohn
ef246d9156 Remove mesh bone_aabbs as they are not used anywhere and calculating them is a pain 2022-12-14 19:32:19 -08:00
clayjohn
b7088bbf52 Cache mesh AABB when modified by skeleton and update instance AABB when
skeleton changes
2022-12-14 18:07:07 -08:00
clayjohn
7b0dd7a3e6 Initialize light index push constants to 0xFFFFFFFF instead of 0xFFFF 2022-12-14 15:20:54 -08:00
Rémi Verschelde
feea39f3cf
Merge pull request #69934 from Geekotron/physics3d-ccd-fixes
Fix Physics3D and Physics2D CCD sometimes adjusting velocity too much
2022-12-14 11:25:41 +01:00
Geekotron
57710897d6 Fix Physics3D and Physics2D CCD sometimes adjusting velocity too much (preventing collision) or not enough (allowing tunneling) 2022-12-13 18:01:21 -07:00
Rémi Verschelde
465d4c1d95
Merge pull request #70009 from clayjohn/glow-hq
Remove high quality glow as it is not any higher quality than regular glow
2022-12-13 23:32:15 +01:00
Rémi Verschelde
fc517e6c89
Merge pull request #70003 from clayjohn/GLES3-cc
Various fixes and documentation for CanvasGroup
2022-12-13 23:31:43 +01:00
clayjohn
bdd4001ef0 Various fixes and documentation for CanvasGroup
Properly apply custom materials with CanvasGroups in the GLES3 backend

Properly blur backbuffer when using a partial rect in forward_plus and
gl_compatibility renderers

Properly set fit_margin when clear_margin is set

Fix shader error during backbuffer clear in mobile renderer
2022-12-13 10:22:18 -08:00
clayjohn
5b5cd2b98b Remove high quality glow as it is not any higher quality than regular glow 2022-12-13 10:15:45 -08:00
Rémi Verschelde
83281e7a42
Merge pull request #69985 from clayjohn/mobile-rim
Ensure that rim lighting uses an exponent base greater than zero
2022-12-13 10:12:00 +01:00
Rémi Verschelde
4bfd21b515
Merge pull request #69828 from clayjohn/SSR-roughness
Fade out SSR with roughness so that it doesn't show at high roughness amounts
2022-12-13 10:10:56 +01:00
clayjohn
a062798b76 Ensure that rim lighting uses a exponent base greater than zero
This avoids the undefined behavior that happens if the base is zero and the exponent is zero
2022-12-12 13:41:28 -08:00
Fabio Iotti
c53c687962
Fix screen texture slightly darker 2022-12-12 21:17:36 +01:00
Pedro J. Estébanez
14e301467e Refactor SPIR-V reflection into a generic RenderingDevice feature 2022-12-12 14:14:53 +01:00
Rémi Verschelde
ec8f52df8f
Merge pull request #69629 from smix8/agent_wild_callback_pointer_4.x
Fix Navigation agent callback wild pointer crash
2022-12-12 13:51:48 +01:00
smix8
194c1c44e0 Fix Navigation agent callback wild pointer crash
Fixes crash in sanitizer builds when callback agent or object are already freed.
2022-12-12 13:03:55 +01:00
Rémi Verschelde
f1edd03d4c
Merge pull request #69718 from groud/finally_rename_gdnative_to_gdextension
Rename all gdnative occurences to gdextension
2022-12-12 11:43:59 +01:00
Gilles Roudière
be1c9d677d Rename all gdnative occurences to gdextension
Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
2022-12-12 11:04:57 +01:00
kobewi
7c6b659bd7 Add PropertyInfo overload for GLOBAL_DEF 2022-12-11 21:36:48 +01:00
Yuri Rubinsky
6e48db69a3 Changed RD::PipelineDynamicStateFlags type to enum flags 2022-12-11 15:37:35 +03:00
Rémi Verschelde
60a376ae52
Merge pull request #69852 from rburing/heightmap_shape_typo_bugfix
Fix typo bug in heightmap shape
2022-12-11 11:51:46 +01:00
Josh Jones
5769b0e8d8 Enable assigning an owner to navigation regions and links
This allows users of the server APIs to get back the nodes that created certain regions and links.
2022-12-10 12:03:06 -08:00
Hugo Locurcio
7745bd42a6
Add maximum roughness cutoff to SSR to improve performance
In a test scene with mixed rough and non-rough materials, this saves
upwards of 0.15 ms of GPU time with very little visual artifacting
(GTX 1080, 2560×1440).
2022-12-10 17:35:18 +01:00
Ricardo Buring
55eceb5150 Fix typo bug in heightmap shape 2022-12-10 12:57:43 +01:00
Hugo Locurcio
35d788cff5
Remove warning when playing random no-repeat sound with only 1 sound in pool
This makes setting up sounds for random pitch/volume faster, as you
don't have to change the mode from Random (Avoid Repeats) to Random
anymore if you only care about randomizing pitch/volume but want
to prevent a warning message from appearing on every playback.
2022-12-09 23:06:51 +01:00
clayjohn
e6f8c8517c Fade out SSR with roughness so that it doesn't show at high roughness amounts 2022-12-09 12:59:51 -08:00
Rémi Verschelde
60d7525d84
Merge pull request #69735 from clayjohn/Particles2D-sdf
Detect and report if 2D particles use the screen SDF
2022-12-08 09:52:01 +01:00
clayjohn
0a88c68d0a Detect and report if 2D particles use the screen SDF
This ensures that the SDF is updated even if not used in a canvas_item shader
2022-12-07 10:03:08 -08:00
Rémi Verschelde
0a3f66471e
Merge pull request #69712 from bruvzg/real_size
Rename `window_get_real_size`, add position counterpart.
2022-12-07 14:29:46 +01:00
Rémi Verschelde
ce5464cb42
Merge pull request #69091 from CherrySodaPop/vr-texel-zero-division
Fix VRS object being created even when not supported
2022-12-07 13:26:08 +01:00
Rémi Verschelde
de6994aa95
Merge pull request #69674 from rburing/conStraint
Fix typo in physics step: contraint -> constraint
2022-12-07 13:25:28 +01:00
Lily Garcia
e328a0bcf8
Check if VRS is supported on creating VRS object 2022-12-07 13:00:13 +01:00
bruvzg
edf13eb5a6
Rename window_get_real_size to window_get_size_with_decorations, add window_get_position_with_decorations. 2022-12-07 11:07:30 +02:00
Markus Sauermann
e18107a57c Fix Determining Window for Touchscreen
DisplayServer::screen_is_touchscreen will likely never utilize its
parameter p_screen.
This PR replaces this function by DisplayServer::is_touchscreen_available()
with the same functionality.
This solves the problem, that a SubViewport was used for determining
the screen, which resulted in error messages.
2022-12-07 09:54:29 +01:00
Rémi Verschelde
c241f1c523
Merge pull request #69671 from rburing/cylinder-cylinder_sat_typo
Fix typo in cylinder-cylinder SAT collision solver
2022-12-06 17:44:10 +01:00
Ricardo Buring
53e90bd6ca Fix typo in physics step: contraint -> constraint 2022-12-06 17:32:45 +01:00
Ricardo Buring
e2b013380d Fix typo in cylinder-cylinder SAT collision solver 2022-12-06 16:43:45 +01:00
Rémi Verschelde
c83695c0b5
Merge pull request #69657 from rburing/degenerate_capsule_has_no_edge
Fix collision detection for degenerate capsules
2022-12-06 15:16:44 +01:00
Rémi Verschelde
bd290ad566
Merge pull request #69636 from Malcolmnixon/vulkan-mobile-sky-matrix
Fix mobile renderer sky_transform operations
2022-12-06 15:16:20 +01:00
Ricardo Buring
29ab86aa7d Fix collision detection for degenerate capsules
In GodotCapsuleShape3D::get_supports and
GodotCapsuleShape2D::get_supports, return a point instead of an edge of
length zero in case the capsule degenerates to a sphere or circle.
2022-12-06 14:17:24 +01:00
Malcolm Nixon
0f8a968cd4 Modified the mobile renderer to apply the sky_transform operations in the same order as the forward_plus renderer.
Update rasterizer_scene_gles3.cpp

Apply sky_transform order fix to the gles3 renderer.
2022-12-06 06:47:50 -05:00
Rémi Verschelde
43e9ca40ff
Merge pull request #65035 from nathanfranke/fix-aabb-mesh
Fix AABB errors on meshes with bones on multiple surfaces
2022-12-06 12:26:03 +01:00
Yaohua Xiong
9bdc0cb16f draw fish bones for Path2D and Path3D
These fish bones are add to indicate the direction and local transforms alone the path.
2022-12-05 15:39:14 +08:00
Rémi Verschelde
a0365c140a
Merge pull request #68995 from bruvzg/sys_font_for_text
Use system fonts as fallback.
2022-12-05 00:05:49 +01:00
Nathan Franke
aef261aa2a
fix aabb errors on meshes with bones on multiple surfaces 2022-12-04 14:40:19 -06:00
bruvzg
ecec415988
Use system fonts as fallback and improve system font handling.
Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
2022-12-04 18:44:20 +02:00
NumbuhFour
1b09fd5410 Implement CAMERA_VISIBLE_LAYERS as built-in shader variable 2022-12-03 22:41:27 -08:00
Rémi Verschelde
daf168f4c8
Merge pull request #69522 from clayjohn/IBL-black-metal
Allow black metallic materials to reflect IBL
2022-12-03 12:46:30 +01:00
Rémi Verschelde
29ddbfa19a
Merge pull request #69514 from clayjohn/IBL-roughness
Properly remap roughness when reading from radiance map
2022-12-03 12:46:25 +01:00
clayjohn
1e05dd3504 Allow black metallic materials to reflect IBL 2022-12-02 19:54:59 -08:00
clayjohn
b2b89d7294 Properly remap roughness when reading from radiance map
This ensures that we consistently use perceptual roughness which matches the behaviour of most other PBR renderers like Blender, Ue4 and Godot 3
2022-12-02 15:39:20 -08:00
Rémi Verschelde
7ef9947d0e
Merge pull request #68870 from dsnopek/master-webxr-input
Get WebXR fully working in Godot 4!
2022-12-02 12:24:40 +01:00
David Snopek
310bf39cd3 Get WebXR fully working in Godot 4! 2022-12-01 21:46:30 -06:00
Rémi Verschelde
1bd7b0b269
Merge pull request #69430 from Rindbee/fix-clip-contents
Fix child nodes still being drawn when the visible area of a control with `clip_contents` enabled is `0`
2022-12-01 23:55:18 +01:00
Rémi Verschelde
8177e5d7de
Merge pull request #69325 from clayjohn/GLES3-skeletons
Add Skeletons and Blend Shapes to the OpenGL renderer
2022-12-01 23:22:42 +01:00
Rindbee
7129718dc5 Fix child nodes still being drawn when the visible area of a control with clip_contents enabled is 0 2022-12-01 19:47:33 +08:00
kobewi
9a3960daa5 Simplify GDVIRTUAL_REQUIRED_CALL calls 2022-11-30 18:36:57 +01:00
clayjohn
f33ffd9ab4 Add Skeletons and Blend Shapes to the OpenGL renderer
This uses a similar multipass approach to blend shapes
as Godot 3.x, the major difference here is that we
need to convert the normals and tangents to octahedral
for rendering.

Skeletons work the same as the Vulkan renderer except the bones
are stored in a texture as they were in 3.x.
2022-11-29 09:45:03 -08:00
Yuri Rubinsky
5934eef44c Changed RenderingDevice::TextureUsageBits type to enum flags 2022-11-26 13:08:07 +03:00
Rémi Verschelde
5d20dccade
Add MAKE_RESOURCE_TYPE_HINT macro to simplify binding arrays of resources 2022-11-24 14:06:00 +01:00
Rémi Verschelde
f319123af9
Merge pull request #69037 from M-O-Marmalade/distortion-fixes
AudioEffectDistortion docs & inspector edits
2022-11-24 10:47:27 +01:00
Ricardo Buring
4453d63bb0 Update remaining physics exclude parameters to use TypedArray
Also update the documentation to refer to the get_rid() method.
2022-11-23 19:39:04 +01:00
Rémi Verschelde
714b978044
Merge pull request #69005 from akien-mga/shaderlang-sampler-uniforms-array-type
Shader: Set proper resource type hints for sampler uniforms
2022-11-23 08:33:05 +01:00
M-O-Marmalade
8ea0d727f0 AudioEffectDistorion docs & inspector edits
Fixing a few typos in the AudioEffectDistortion docs, making a few
things clearer, etc

Also adding the decibel (dB) suffix to the pre/post gain properties in
the inspector.
2022-11-22 17:38:13 -08:00
Rémi Verschelde
7f8ecffa56
Merge pull request #69017 from raulsntos/physics3d-array
Change exclude property in `PhysicsRayQueryParameters3D` to TypedArray
2022-11-22 21:48:40 +01:00
Rémi Verschelde
52f65cdb44
Merge pull request #69019 from Sauermann/fix-framebuffer-hashparameter
Fix parameters for hash_murmur3_one_32
2022-11-22 21:38:31 +01:00
Rémi Verschelde
834c7ff2c0
Merge pull request #68997 from ueshita/fix_verts_65536
Fix some switching decisions for index format. (vertex length 65536)
2022-11-22 21:37:17 +01:00
Markus Sauermann
75d56f4201 Fix parameters for hash_murmur3_one_32
In multiple locations in the codebase hash_murmur3_one_32 is used for
generating hash values.

Whenever a sequence of multiple hash-calculation happens within a single
function, the previous hash value is always used as input in the following
hash-calculations. The only exception is get_cache_multipass, where currently the previous
hash value is overridden without utilizing it.
This patch corrects that.
2022-11-22 19:46:54 +01:00
Rémi Verschelde
cb1826deae
Shader: Set proper resource type hints for sampler uniforms
Supersedes #64383.
2022-11-22 15:38:52 +01:00
dzil123
b4437cbaa6 Fix various missing rendering parameter checks 2022-11-22 03:48:32 -08:00
Rémi Verschelde
e7418cac3d
Merge pull request #68942 from Chaosus/barrier_mask_flags
Expose `BarrierMask` as flags enum in `RenderingDevice`
2022-11-22 08:31:12 +01:00
Yuri Rubinsky
acaf38cfbc Expose BarrierMask as flags enum in RenderingDevice 2022-11-22 09:45:20 +03:00
ueshita
454116716e Fix some switching decisions for index format. 2022-11-22 00:09:48 +09:00
Rémi Verschelde
a9a75e643e
Merge pull request #68527 from pkdawson/vertex-array-offsets
Add `offsets` parameter to RenderingDevice::vertex_array_create
2022-11-21 11:43:28 +01:00
Markus Sauermann
28af870750 Code simplifications found by cppcheck
They are based on:
- Boolean arithmetic simplifications
- setting variables that are not accessed
- constant variables
2022-11-21 08:43:36 +01:00
Rémi Verschelde
4a52fb828f
Merge pull request #68884 from dzil123/create_local_rendering_device_null_check_docs
RenderingServer::create_local_rendering_device - Add null check and update docs
2022-11-20 11:44:10 +01:00
Rémi Verschelde
137327812b
Merge pull request #68876 from dzil123/renderdummy_texture_replace_null_check
RenderDummy::TextureStorage::texture_replace add missing null check
2022-11-20 11:36:04 +01:00
Rémi Verschelde
3a43d44656
Merge pull request #68830 from Ayush-singla27/issuebranch
fixed incorrect mesh normals in shaders
2022-11-20 11:35:52 +01:00
dzil123
9ce9c959ab RenderingServer::create_local_rendering_device null check and docs
Co-authored-by: Clay John <claynjohn@gmail.com>
2022-11-19 16:31:05 -08:00
clayjohn
0e5a98cdd8 Fix drawing of 2D skeletons in the RD renderer.
Also clean up skeleton code in preparation for adding them to GLES3

Properly update Mesh2D AABBs when skeleton is updated
2022-11-18 23:36:40 -08:00
dzil123
8000751d90 RenderDummy::TextureStorage::texture_replace add missing null check 2022-11-18 22:03:46 -08:00
Ayush Singla
75ba0a7957 fixed incorrect mesh normals in shaders 2022-11-19 11:06:03 +05:30
Rémi Verschelde
58cb11b396
Merge pull request #68710 from BastiaanOlij/fix_vrs
Fix VRS issues
2022-11-18 16:19:22 +01:00
Yuri Rubinsky
e8f9cd8ac5
Merge pull request #68808 from CherrySodaPop/global-instance-uniform 2022-11-18 09:49:49 +03:00
Lily Garcia
0683bc3783 Fix global uniforms parsed as instance uniform 2022-11-17 17:18:20 -05:00
clayjohn
21ac6d7d8e Finish implementing Canvas Background mode 2022-11-17 12:51:26 -08:00
Rémi Verschelde
e1ead0fbd1
Merge pull request #68779 from dzil123/fix_renderdummy_mesh_surface_overflow
RendererDummy - Fix buffer overflow due to stale mesh_get_surface
2022-11-17 13:48:24 +01:00
dzil123
e9d213e0fd RendererDummy fix buffer overflow due to mesh_get_surface 2022-11-17 03:41:55 -08:00
dzil123
8fab25f32f GLES3 TextureStorage - add missing null checks 2022-11-16 23:31:59 -08:00
Bastiaan Olij
616ba8745f Fix VRS issues 2022-11-17 00:32:42 +11:00
Rémi Verschelde
a6a6af32e2
Merge pull request #68718 from dzil123/fix_fog_shader_buffer_overflow
Fix shader compiler asan out of bounds
2022-11-16 09:23:16 +01:00
Yuri Rubinsky
5693286e90 Mark shader built-ins as used when passed to functions as out parameter 2022-11-15 22:06:16 +03:00
Rémi Verschelde
4935493f72
Merge pull request #67948 from DeeJayLSP/split_webp
Overhaul WebP packer and split compression options
2022-11-15 16:25:40 +01:00
DeeJayLSP
da132f3266 Overhaul WebP packer and split compression options 2022-11-15 11:52:22 -03:00
dzil123
6f0cd8072f Fix Fog shader buffer overflow 2022-11-15 06:51:48 -08:00
Rémi Verschelde
245e6454a0
Merge pull request #68673 from clayjohn/RD-alpha-hash
Fix alpha hash by correcting typos and doing calculations in object space
2022-11-15 10:28:59 +01:00
Rémi Verschelde
5f78f24b08
Merge pull request #68426 from clayjohn/GLES3-particles
Add GPUParticles to the OpenGL3 renderer.
2022-11-15 10:28:44 +01:00
Rémi Verschelde
1e9a61cd40
Merge pull request #68487 from clayjohn/RD-mobile-raster
Use raster versions of copy effects for 2D operations when using the mobile renderer
2022-11-15 10:27:43 +01:00
Rémi Verschelde
64d7ce2a6e
Merge pull request #68628 from clayjohn/shadows
Implement is_animated and casts_shadows
2022-11-15 10:27:29 +01:00
clayjohn
9ce57050a5 Add GPUParticles to the OpenGL3 renderer.
This includes collision (2D SDF, Box, Sphere, Heightmap),
attraction (Box, Sphere), and all sorting modes.

This does not include 3D SDF collisions, trails, or
manual emission.
2022-11-14 23:28:25 -08:00
clayjohn
81d8b502cc Fix alpha hash by correcting typos and doing calculations in object space 2022-11-14 17:57:49 -08:00
Rémi Verschelde
7a9a173a9f
Merge pull request #68339 from clayjohn/RD-shadow-acne
Scale light shadow bias by soft_shadow_scale to reduce shadow acne
2022-11-14 23:25:52 +01:00
Rémi Verschelde
164139b61f
Merge pull request #65821 from raulsntos/xr_notification
Remove redefinition of `notification` method in `XRInterfaceExtension`
2022-11-14 23:25:37 +01:00
Raul Santos
2108019484
Remove redefinition of notification method in XRInterfaceExtension 2022-11-14 20:18:46 +01:00
Markus Sauermann
3b14f0334c Remove redundant Variant-types initializations 2022-11-14 19:35:19 +01:00
Rémi Verschelde
63cded6a85
Merge pull request #61884 from Calinou/alpha-hash-use-opaque-pipeline
Use opaque rendering pipeline for alpha hash materials
2022-11-14 11:08:35 +01:00
clayjohn
4abf47f407 Implement is_animated and casts_shadows
This allows the renderer to correctly decide when to update shadow maps

This PR also adds TIME to a few missing places
2022-11-13 14:09:21 -08:00
Rémi Verschelde
9e97bc5857
Merge pull request #68574 from clayjohn/RD-shadow-time
Properly set TIME shader uniform when rendering shadows
2022-11-13 15:50:54 +01:00
clayjohn
aaaa4b8d68 Properly set TIME shader uniform when rendering shadows 2022-11-12 10:51:02 -08:00
Rémi Verschelde
014fac8f28
Merge pull request #67746 from SonnyBonds/fix_cluster_shader_mvk
Fix cluster_render.glsl failing on some Macs
2022-11-11 21:05:20 +01:00
Rémi Verschelde
c41b9c5f5b
Merge pull request #67972 from and-rad/vector-field-consistency
Fix inconsistency between vector field texture and world space directions
2022-11-11 21:05:00 +01:00
Patrick Dawson
d7136f2d51 Add offsets parameter to RenderingDevice::vertex_array_create 2022-11-11 15:45:36 +01:00
Rémi Verschelde
aae4b3d9d0
Merge pull request #68496 from clayjohn/RD-point
Ensure user shader is used in depth pass when point size is used
2022-11-11 10:54:55 +01:00
Rémi Verschelde
636d2189d0
Merge pull request #68511 from clayjohn/RD-mobile-sky
Enable mipmaps in cubemap roughness shader
2022-11-11 10:54:44 +01:00
Rémi Verschelde
e10f8cbf40
Merge pull request #68186 from pkdawson/expose-texture-rd
Expose texture_get_rd_texture for scripts
2022-11-11 10:43:57 +01:00
Rémi Verschelde
43f2213325
Merge pull request #68235 from pkdawson/pr-expose-vertex-array-create
Expose RenderingDevice::vertex_array_create to scripting
2022-11-11 10:43:35 +01:00
Rémi Verschelde
1691a33eb9
Merge pull request #67374 from MrBlockers/fix-draw-primitive
Fix draw_primitive ignoring texture argument
2022-11-11 10:43:18 +01:00
Rémi Verschelde
2608e71eca
Merge pull request #68425 from clayjohn/RD-doubles-particles
Fix GPUParticles not rendering in doubles build of the engine.
2022-11-11 10:42:24 +01:00
clayjohn
3ceb342d37 Enable mipmaps in cubemap roughness shader 2022-11-10 23:41:51 -08:00
clayjohn
a7adc7ab37 Ensure user shader is used in depth pass when point size is used 2022-11-10 15:26:07 -08:00
clayjohn
8e41221404 Use raster versions of copy effects for 2D operations when using the mobile renderer
This PR implements a few basic copy operations in raster that weren't available before
2022-11-10 12:47:26 -08:00
avemort
84f6791bd8 expose XRInterface::get_transform_for_view and XRInterface::get_projection_for_view to gdscript 2022-11-10 09:30:31 -03:00
Yuri Rubinsky
dca5cb8e40
Merge pull request #68413 from Chaosus/fix_instance_uniforms 2022-11-09 22:55:41 +03:00
Yuri Rubinsky
c07d13182c Some fixes for instance shader parameters 2022-11-09 21:20:11 +03:00
clayjohn
4aab9cbdfc Fix GPUParticles not rendering in doubles build of the engine.
real_t was mistakenly used in uniform structs causing a mismatch between the GPU uniform and the CPU uniform
2022-11-09 08:58:04 -08:00
Rémi Verschelde
f4c354630a
Merge pull request #68440 from clayjohn/redraw-TIME
Request redraw in OpenGL3 and mobile renderers when TIME used in shader
2022-11-09 08:58:06 +01:00
clayjohn
a1c3591461 Request redraw in OpenGL3 and mobile renderers when TIME used in shader 2022-11-08 22:52:11 -08:00
David Snopek
23603e409c Add support for OpenGL to OpenXR 2022-11-08 18:47:11 -06:00
kobewi
d9f066d5fa Remove duplicate project settings definitions 2022-11-08 01:29:39 +01:00
Rémi Verschelde
e2b39bfdc4
Merge pull request #68346 from Calinou/particles-rename-trail-length-property
Rename GPUParticles2D/3D's `trail_length_secs` to `trail_lifetime`
2022-11-07 15:05:55 +01:00
Hugo Locurcio
ab7a807f2b
Rename GPUParticles2D/3D's trail_length_secs to trail_lifetime
The property already has a "seconds" suffix in the inspector.
The "lifetime" term makes it more obvious that the property is
specified as time, not a distance in units.

The property hint now allows manually entering values greater than
10 seconds.

The internal rendering value's default now matches the particles
nodes' default.
2022-11-07 13:37:40 +01:00
Gábor Pál Korom
6865d2d002 Surface AABBs are now set for mesh surfaces even in headless mode. Sponsored by Migeran (https://migeran.com). 2022-11-07 12:53:03 +01:00
clayjohn
5f4a561f6c Scale light shadow bias by soft_shadow_scale to reduce shadow acne on high quality settings 2022-11-06 10:49:55 -08:00
kobewi
1778301cd0 Add call_deferred() method to Callable 2022-11-04 17:24:34 +01:00
Patrick Dawson
e56fc6b338 Expose vertex_array_create 2022-11-03 22:14:55 +01:00
David Snopek
7fb8b931d7 Collapse three seperate texture storage methods into render_target_set_override() 2022-11-03 13:03:30 -05:00
Patrick Dawson
71d8de2763 Expose texture_get_rd_texture 2022-11-03 05:27:24 +01:00
Rémi Verschelde
2c0544a7b8
Merge pull request #67878 from clayjohn/RD-particles-amount
Correctly set number of particle dispatches when setting view axis
2022-11-03 00:32:20 +01:00
Rémi Verschelde
08d56ac2f1
Merge pull request #66747 from aaronfranke/move-euler-order
Move EulerOrder enum to math_defs.h and global scope
2022-11-02 22:37:12 +01:00
Mariano Javier Suligoy
a39ac1383b Avoid memory corruption when GodotConvexPolygonShape3D is setup more than once 2022-11-02 16:16:18 -03:00
Aaron Franke
8556fdd4bc
Move EulerOrder enum to math_defs.h and global scope 2022-11-02 13:44:13 -05:00
Rémi Verschelde
f7c611ab71
Style: Misc docs and comment style and language fixes
- Removed empty paragraphs in XML.
- Consistently use bold style for "Example:", on a new line.
- Fix usage of `[code]` when hyperlinks could be used (`[member]`, `[constant]`).
- Fix invalid usage of backticks for inline code in BBCode.
- Fix some American/British English spelling inconsistencies.
- Other minor fixes spotted along the way, including typo fixes with codespell.
- Don't specify `@GlobalScope` for `enum` and `constant`.
2022-11-02 19:01:18 +01:00
Rémi Verschelde
604abb434f
Merge pull request #52350 from BimDav/viewport_canvas_cull
Added Viewport canvas cull mask feature
2022-11-02 17:14:24 +01:00
Rémi Verschelde
cb1931b271
Merge pull request #67639 from clayjohn/GLES3-2d-shadows
Add 2D shadows and canvas SDF to OpenGL3 renderer
2022-11-02 17:12:20 +01:00
Yuri Rubinsky
0a85d3b0cc Fix predefined constants to be accessible in the shader includes 2022-11-01 19:53:05 +03:00
Rémi Verschelde
a2c0ea248d
Merge pull request #62418 from Calinou/movie-maker-warn-on-low-disk-space
Warn if available disk space is low when Movie Maker mode is enabled
2022-11-01 08:21:27 +01:00
Rémi Verschelde
5dfde1e7bd
Merge pull request #68082 from Klowner/softbody3d-reoptmizelinkorder-crash-fix
Avoid GodotSoftBody3D.reoptimize_link_order() crash if <2 nodes available.
2022-11-01 08:20:15 +01:00
Hugo Locurcio
264ce15a83
Warn if available disk space is low when Movie Maker mode is enabled
Saving movies can require a lot of disk space, and running out of disk
space may cause the entire recording to have to be redone.

This also prints a message on startup to state that Movie Maker mode
is enabled, along with the requested framerate. Since Movie Maker mode
forces non-real-time simulation, it's important to know that it is
enabled when starting the project.
2022-11-01 00:02:55 +01:00
Mark Riedesel
7d1a159ba1 Add safety check for at least 2 nodes and 1 link to GodotSoftBody3D.reoptimize_link_order() before proceeding. Fixes #61474 2022-10-31 10:14:02 -05:00
bruvzg
9f46bf44cd
[DisplayServer] Hide internal window creation/deletion methods and expose some missing methods. 2022-10-31 16:17:45 +02:00
BimDav
fcb9be66a2 Viewport canvas cull mask feature
Co-authored-by: Valentin Zagura <puthre@gmail.com>
2022-10-31 14:09:49 +01:00
Raul Santos
82dac64659
Change exclude property in PhysicsRayQueryParameters3D to TypedArray
Change type of exclude property from `Vector<RID>` to `TypedArray<RID>` which is consistent with the 2D version.
2022-10-31 13:44:46 +01:00
Rémi Verschelde
5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde
be126d42d4
Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don't
Simplify GDVIRTUAL_CALL calls
2022-10-31 11:55:56 +01:00
Yuri Rubinsky
099f127cc3
Make code generation for shader boolean uniform instances easier 2022-10-31 11:52:52 +01:00
Rémi Verschelde
87545bf873
Merge pull request #67519 from BastiaanOlij/change_xr_pre_draw_viewport
Changing timing of call to xr_interface->pre_draw_viewport
2022-10-31 11:08:34 +01:00
Rémi Verschelde
3312d0a87b
Merge pull request #67907 from clayjohn/RD-model-matrix
Correctly rename to read_model_matrix when using shader builtins that rely on model matrix
2022-10-31 11:07:24 +01:00
Rémi Verschelde
d147adc591
Merge pull request #67915 from RevoluPowered/fix-intel-macbook-crash-subgroups
Ensure vulkan subgroups are disabled for MoltenVK
2022-10-31 10:53:30 +01:00
Yuri Rubinsky
11e1bac768
Merge pull request #67112 from Chaosus/fix_boolean_uniform_instances 2022-10-28 23:17:23 +03:00
Clay John
04ac91f786
Merge pull request #67790 from kdada/fix-flash-window
Make creating window do not flicker when specify custom position
2022-10-28 13:02:58 -07:00
clayjohn
2ec234ff67 Add 2D shadows and canvas SDF to OpenGL3 renderer
This is an initial implementation based on the current RD implementation

Performance will improve later
2022-10-28 11:33:23 -07:00
Yuri Rubinsky
468762b3b7
Merge pull request #67498 from Chaosus/fix_shader_crash 2022-10-28 09:25:07 +03:00