Commit graph

2908 commits

Author SHA1 Message Date
Rémi Verschelde
d1bb77076a
Merge pull request #60004 from fire-forge/anim-loop-enum 2022-04-13 13:07:34 +02:00
Hendrik Brucker
cf58d23a72 Add Vector4 to VisualShader 2022-04-12 19:09:29 +02:00
Yuri Rubinsky
3d63f6e36d
Merge pull request #60171 from Chaosus/restore_aa 2022-04-12 18:09:58 +03:00
Yuri Roubinsky
6e9535a9c8 Restore antialiasing for draw_line 2022-04-12 13:03:56 +03:00
bruvzg
4bf99f4af2 Narrow FileAccess scope to prevent deadlocks. 2022-04-12 10:54:39 +03:00
Rémi Verschelde
3fc7a96cf8
Merge pull request #60120 from Calinou/environment-editor-ssil-tonemap-hide
Hide SSIL properties when SSIL is disabled in the Environment resource
2022-04-11 20:34:28 +02:00
Rémi Verschelde
4ab86c6731
Merge pull request #59980 from reduz/animation-libraries 2022-04-11 14:18:35 +02:00
reduz
6f401439f8 Implement Animation Libraries
* Instead of containing single animations, AnimationPlayer now contains libraries.
* Libraries, in turn, contain the animations.

This paves the way for implementing the possibility of importing scenes as animation libraries, finally allowing to import animations separate from the 3D models.

Missing (will be done on separate PRs):

* Make it possible to import scenes (dae/fbx/gltf) as animation libraries.
* Make it possible for AnimationTree to import animation libraries on its own, so it does not rely on AnimationPlayer for everything.
2022-04-11 12:51:54 +02:00
bruvzg
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
FireForge
197be78bc5 Fix Theme type group naming in the inspector 2022-04-10 22:18:21 -05:00
Hugo Locurcio
f9c0a66d6e
Hide SSIL properties when SSIL is disabled in the Environment resource
- Hide Tonemap White property when the tonemapper is Linear
  (as linear tonemapping does not use a whitepoint).
2022-04-10 23:44:19 +02:00
Hugo Locurcio
bc2ca2ebcf
Add dithering to ProceduralSkyMaterial to combat banding
Dithering was already present in PhysicalSkyMaterial. This brings
it to ProceduralSkyMaterial as well, with the same algorithm
and default intensity.
2022-04-09 18:29:41 +02:00
Pawel Lampe
fcd26b8841 Fix navmesh baking
- improved mesh data calculation from standalone static colliders so that no
  VisualServer calls are performed - and thus no VS mutexes need to
  be locked in case of on-thread baking
- improved the same for GridMap's static colliders
2022-04-08 21:01:59 +02:00
FireForge
28261b3da8 Add enum hint for Animation.loop_mode 2022-04-07 17:19:32 -05:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
Rémi Verschelde
e9699dca02
Merge pull request #58062 from Calinou/panoramaskymaterial-default-black 2022-04-05 15:21:01 +02:00
Rémi Verschelde
b512fe67a6
Merge pull request #59888 from akien-mga/clang-tidy 2022-04-04 23:57:30 +02:00
Pawel Lampe
e17e4b34a8 Fix debug navmesh errors 2022-04-04 23:03:14 +02:00
Rémi Verschelde
b78aa4fe19 Style: Apply clang-tidy to current code, add readability-redundant-member-init 2022-04-04 21:49:51 +02:00
Rémi Verschelde
f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
bruvzg
28520002cf
Fix center aligned text clipping. 2022-04-04 09:04:05 +03:00
FireForge
60dfe76e1f Fix group name in FastNoise and Gradient 2022-03-31 21:21:04 -05:00
reduz
45f74ceb85 Add PortableCompressedTexture
* Resource that allows saving textures embedded in scenes or standalone.
* Supports only formats that are portable: Lossy, Lossles or BasisUniversal

This is something I wanted to add for a long time. I made it now because @fire
requires it for importing GLTF2 files with embedded textures, but also this
will allow saving Godot scenes as standalone binary files that will run
in all platforms (because textures will load everywhere).

This is ideal when you want to distribute individual standalone assets online
in games that can be built from Godot scenes.
2022-03-30 10:39:41 +02:00
Rémi Verschelde
f6ef63635f
Merge pull request #59659 from fountainment/fix_callable_bind_usage
Fix Callable::bind usage in connections_dialog.h and packed_scene.cpp
2022-03-30 09:00:07 +02:00
Yuri Roubinsky
509598e8c0 Remove SHADOW_ATTENUATION spatial light shader built-in 2022-03-29 08:43:31 +03:00
C.Even
619d9d143b Fix Callable::bind usage in connections_dialog.h and packed_scene.cpp
* Callable::bind takes an array of pointers to Variant
* Fixes #57057
2022-03-29 12:15:36 +08:00
Rémi Verschelde
5149db8d85
Merge pull request #59644 from akien-mga/template-no-editor-dep 2022-03-28 23:35:51 +02:00
Rémi Verschelde
f3bd700767
Merge pull request #59619 from Chaosus/vs_input_desc 2022-03-28 22:32:11 +02:00
Rémi Verschelde
324215c485
Merge pull request #59525 from fire-forge/fix-group-names 2022-03-28 21:44:35 +02:00
Rémi Verschelde
45ec0e31c3 Remove last editor code dependencies in template build
SConstruct change also makes it possible to outright delete the `editor`
folder in a `tools=no` build, which we use in CI to ensure no invalid
cross-dependencies are added.
2022-03-28 21:13:01 +02:00
FireForge
88b09694e7 Fix inspector group name capitalization 2022-03-28 14:02:06 -05:00
Yuri Roubinsky
9edbdc4f36 Add refs to shading language to the desciption of input nodes in vshader 2022-03-28 22:01:10 +03:00
Rémi Verschelde
7119d355eb String: Remove TTR and DTR defines in non-tools build
This ensures we don't use TTR in runtime code, as it's specifically meant
to source translations for the editor.
2022-03-28 20:26:35 +02:00
Rémi Verschelde
f0407ad14d
Merge pull request #59336 from YeldhamDev/where_we_dropping_boys 2022-03-26 23:30:07 +01:00
Rémi Verschelde
0d772c6e6e Improve range property hints for various collision shapes
Fixes #36419.

Co-authored-by: Andrii Doroshenko (Xrayez) <xrayez@gmail.com>
2022-03-26 16:20:30 +01:00
FireForge
bb7e6e9951 Rename "ss_reflections_" to "ssr_" in Environment 2022-03-25 14:37:01 -05:00
bruvzg
78051f93a3
Convert the editor and default theme fonts to WOFF2 format to save space. 2022-03-25 11:45:55 +02:00
Rémi Verschelde
99139e17e4
Merge pull request #59170 from akien-mga/import-wav-configure-loop-mode 2022-03-22 13:26:31 +01:00
Michael Alexsander
94b8f38de2 Add visual marker when dragging and dropping tabs 2022-03-21 22:16:29 -03:00
Rémi Verschelde
ef24e95f4a
Merge pull request #59268 from Chaosus/shader_renames2
Rename several transform built-ins in shaders
2022-03-18 19:24:38 +01:00
Rémi Verschelde
5c8bd6fd71
Merge pull request #58233 from bruvzg/gde_ts 2022-03-18 14:29:58 +01:00
Yuri Roubinsky
0d9aecd967 Rename several transform built-ins in shaders 2022-03-18 12:10:55 +03:00
Rémi Verschelde
acc9b5b390
Merge pull request #55399 from RPicster/particlesmaterial-sphere-emittershape
ParticleMaterial: Sphere emission shape emitting from the volume.
2022-03-18 08:21:59 +01:00
bruvzg
f19cd44346
Unify TextServer built-in module and GDExtension code. 2022-03-17 08:15:29 +02:00
Bastiaan Olij
57e5a33623 Split dummy renderer classes into separate files
Split canvas_texture_storage and texture_storage from render_storage class
2022-03-16 17:43:10 +11:00
Rémi Verschelde
b389ce5ccd ResourceImporterWAV: Allow configuring loop mode on import
The new `edit/loop_mode` import options lets user choose to either:
- Detect loop points from the WAV (default, same behavior as before)
- Set the loop mode and loop points manually like in AudioStreamSample

Fixes #46164.
2022-03-15 16:16:09 +01:00
Rémi Verschelde
6721290831
Merge pull request #58018 from Calinou/procedural-sky-add-cover-texture
Add sky cover texture for ProceduralSkyMaterial
2022-03-13 00:56:09 +01:00
Rémi Verschelde
e56b69269f
Merge pull request #59013 from bruvzg/fake_bold_italics 2022-03-11 14:24:13 +01:00
bruvzg
b32e8d63d8
Add options to embolden and transform font outlines to simulate bold and italic typefaces. 2022-03-11 14:02:30 +02:00
Rémi Verschelde
768f9422bc Convert uses of DirAccess * to DirAccessRef to prevent memleaks
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.

Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2022-03-11 09:13:11 +01:00
Rémi Verschelde
af9a60d5b3
Merge pull request #58965 from TechnoPorg/remove-stex-occurrences
Remove more occurrences of "stex"
2022-03-11 08:00:52 +01:00
TechnoPorg
f4bc9f5821 Remove more occurrences of "stex" 2022-03-10 18:31:48 -07:00
reduz
6f51eca1e3 Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.

Most classes that make sense have been converted. Missing:

* Physics servers
* VideoStream
* Script* classes.

which will go in a separate PR due to the complexity involved.
2022-03-10 12:28:11 +01:00
Yuri Roubinsky
4d6790e9df Add _get_func_code/_is_available virtual functions to custom nodes 2022-03-08 16:23:44 +03:00
Rémi Verschelde
eb8ce0ce68
Merge pull request #58750 from Chaosus/vs_varyings
Add varying support to visual shaders
2022-03-07 07:41:11 +01:00
Rémi Verschelde
bb5d71f6cc
Merge pull request #58719 from Chaosus/vs_builtins
Adds few more input/output built-ins to visual shader
2022-03-07 07:39:51 +01:00
Rémi Verschelde
d37e8586be
Merge pull request #58788 from reduz/rename-streamtexture
Rename StreamTexture* to CompressedTexture*
2022-03-06 00:19:55 +01:00
kobewi
bc3aff9b46 Various code and documentation improvements 2022-03-05 22:00:35 +01:00
reduz
ccd4cdfd8b Rename StreamTexture* to CompressedTexture*
* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
2022-03-05 16:43:38 +01:00
Markus Sauermann
c2e9b0c566 Reverse tangents of capsule mesh 2022-03-05 09:23:59 +01:00
Yuri Roubinsky
15a87f8e92 Add varying support to visual shaders 2022-03-04 23:30:47 +03:00
Rémi Verschelde
b2e19b2499 Animation: Silence false positive -Wstringop-overflow warning
And disable debug code which was wrongly left enabled.
2022-03-04 17:10:22 +01:00
Yuri Roubinsky
2f8cb76899 Adds few more input/output built-ins to visual shader 2022-03-03 21:28:23 +03:00
JFonS
73f92a6e4d
Merge pull request #58548 from V-Sekai/lod_lightmaps
Allow automatic lod when importing 3D scenes with Static Lightmaps
2022-03-01 10:23:25 +01:00
kobewi
678ec9bcde Don't abort loading scene on missing dependency 2022-02-26 12:02:05 +01:00
K. S. Ernest (iFire) Lee
ab15267096 Allow automatic lod when importing 3D scenes with Static Lightmaps
Avoid the normal merge procedure when uv2s are different and makes generating LODs happen after the lightmap generation
2022-02-25 18:03:09 -08:00
Hugo Locurcio
1d9bc35496
Add a Skew property to StyleBoxFlat
This makes it possible to create more aesthetically pleasing
styleboxes for GUI theming, especially in games that have
a futuristic appearance (where skewed buttons and progress bars
are common).
2022-02-26 02:39:36 +01:00
Rémi Verschelde
4dc8214831
Merge pull request #58496 from JFonS/fix_lm_crash 2022-02-24 13:29:51 +01:00
jfons
d0fd5fd3c7 Add sanity checks to lightmap unwrap texel size 2022-02-24 13:00:51 +01:00
clayjohn
fe49244611 Use Filament specular models and parametrization 2022-02-22 19:39:41 -08:00
Rémi Verschelde
872e8a43ca
Merge pull request #58343 from aaronfranke/negative-shape-warning 2022-02-22 15:35:18 +01:00
Rémi Verschelde
0beb721c70
Merge pull request #58344 from TokageItLab/fix-cubic-interpolate-with-loop 2022-02-22 12:18:08 +01:00
Rémi Verschelde
ac1a55bc63
Merge pull request #58367 from V-Sekai/tileset_atlas_crash_fix 2022-02-21 11:18:00 +01:00
Markus Sauermann
79a75cd683 simplify calculation of max in grayscale 2022-02-20 18:36:46 +01:00
SaracenOne
257a71d29e Fix nullptr error in _update_padded_texture on texture with no image 2022-02-20 17:22:14 +00:00
Silc 'Tokage' Renew
f3895e7a67 Fixed cubic interpolate with loop 2022-02-20 15:46:58 +09:00
Aaron Franke
9f048f4c4d
Show an error when setting a negative size on a collision shape 2022-02-20 00:37:49 -06:00
Haoyu Qiu
dd9ba6de9f Fix crash when importing small GLTF mesh 2022-02-19 13:30:17 +08:00
clayjohn
63cb91e05c Revert "Default to real-time radiance map filter for environment sky reflections"
This reverts commit 09563e4bd8.
2022-02-17 23:13:32 -08:00
Rémi Verschelde
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Rémi Verschelde
6d57587396
Merge pull request #57931 from Calinou/sky-default-filter-realtime 2022-02-15 20:29:57 +01:00
Rémi Verschelde
760a95e86a
Merge pull request #57877 from bruvzg/subpixel_gl_pos 2022-02-15 13:58:38 +01:00
Rémi Verschelde
b3507ab0cd
Merge pull request #58100 from Calinou/environment-clamp-sky-contribution
Clamp environment light sky contribution to the [0.0; 1.0] range
2022-02-15 07:42:30 +01:00
Hugo Locurcio
c10e97b604
Clamp environment light sky contribution to the [0.0; 1.0] range
The value is already clamped in the editor, but it wasn't being
clamped when the value was set via code. Values outside the [0.0; 1.0]
range can result in broken rendering.
2022-02-14 17:15:32 +01:00
Hugo Locurcio
15244e55bd
Improve completion scroll bar visibility in the script editor
This makes the scroll bar bar thicker and more opaque (roughly
matching the editor theme's scroll bar by default).
2022-02-14 16:49:08 +01:00
Rémi Verschelde
cd6301ae25
Merge pull request #58008 from Geometror/increase-checkerboard-contrast 2022-02-14 15:22:50 +01:00
Hugo Locurcio
a86deac049
Default PanoramaSkyMaterial texture to black instead of white
This prevents blinding the user while the user is still setting up
the panorama sky texture.
2022-02-13 22:03:09 +01:00
Rémi Verschelde
7224389468
Merge pull request #57954 from TokageItLab/refactor-cubic-interpolate
Implement `cubic_interpolate()` as MathFunc for refactoring
2022-02-13 10:34:13 +01:00
bruvzg
29199579f7
Add sub-pixel glyph positioning support. 2022-02-12 19:55:52 +02:00
Hugo Locurcio
56b604bef7
Add sky cover texture for ProceduralSkyMaterial
This brings PhysicalSkyMaterial's Night Sky functionality to
ProceduralSkyMaterial, but in a more powerful and general fashion.

This can be used to display stars at night, or clouds at day and night.
For clouds, it won't be physically accurate, but it can look good still.

The Sky Cover Modulate property can be used to adjust the sky cover's
colors and opacity in real-time, which is useful for day/night or weather
transitions.
2022-02-12 18:39:57 +01:00
Rémi Verschelde
498805282a
Merge pull request #57993 from Calinou/sky-tweak-default-values 2022-02-12 16:46:19 +01:00
Hendrik Brucker
8ebecf5095 Increase checkerboard texture contrast 2022-02-12 14:55:07 +01:00
Rémi Verschelde
93710edb60
Merge pull request #57319 from IgorKordiukiewicz/sprite3d-error-message 2022-02-12 10:22:40 +01:00
Silc 'Tokage' Renew
865da09871 Implement cubic_interpolate() as MathFunc for refactoring 2022-02-12 18:11:17 +09:00
Rémi Verschelde
7a7fabe4f6
Merge pull request #57641 from Geometror/compilation-time-improvements-1 2022-02-12 09:46:02 +01:00
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Hugo Locurcio
b7b18a4940
Tweak default ProceduralSkyMaterial and PhysicalSkyMaterial appearance
- Tweak colors to be less saturated and more balanced (in terms of hue).
  The cool blue sky is balanced by a warm brown ground,
  which makes reflections look closer to how they'd look like when using
  an HDRI panorama texture.
- Make the ground color dark on both ProceduralSkyMaterial and
  PhysicalSkyMaterial to reduce indoor light leaking, especially
  when using GI.
- Tweak the PhysicalSkyMaterial colors to be as close as possible
  to ProceduralSkyMaterial (with the default sun orientation).
- Tweak editor environment defaults to be identical to the default
  ProceduralSkyMaterial colors. Previously, the default editor sky
  color was different from the colors of a newly created
  ProceduralSkyMaterial resource.

Both new skies were tested without GI, with SDFGI and with VoxelGI.
They were tuned to look best when using ACES tonemapping with a
whitepoint set to 6, but they still look good with other
tonemapping operators.
2022-02-12 02:22:40 +01:00
Igor Kordiukiewicz
2fe43a3bd8 Fix SelfList::remove error when animating Sprite3D 2022-02-11 23:32:06 +01:00
Yuri Sizov
175088db25 Add an explicit way to remove a theme type 2022-02-11 17:57:52 +03:00
Hugo Locurcio
09563e4bd8
Default to real-time radiance map filter for environment sky reflections
This makes radiance map updates much faster, which improves performance
when rotating the sun in the editor or at run-time.

This real-time filter is also much less prone to "fireflies" that can
appear when using a sky with a bright sun.
2022-02-10 20:12:33 +01:00
Rémi Verschelde
c6199da8b8
Merge pull request #39965 from Calinou/tweak-sdfgi-defaults 2022-02-10 17:31:54 +01:00
Rémi Verschelde
2fafcfebdf
Merge pull request #57707 from Calinou/sdfgi-tweak-default-num-cascades 2022-02-10 17:27:42 +01:00
Rémi Verschelde
f111768ba9
Merge pull request #57813 from MisoMosiSpy/disabled_icons 2022-02-09 01:20:58 +01:00
MisoMosiSpy
839b8cae1e
Updated alpha value for disabled icons in default theme. 2022-02-09 01:16:39 +01:00
Rémi Verschelde
25d4c14fef
Merge pull request #57627 from JFonS/occluder_improvements 2022-02-08 23:23:50 +01:00
JoJoX
a6c77c7c5a Use source image format when creating padded texture 2022-02-08 15:27:44 -05:00
Rémi Verschelde
a66e55069e
Merge pull request #57796 from akien-mga/revert-sname-theme-setters 2022-02-08 11:13:24 +01:00
Rémi Verschelde
fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
Rémi Verschelde
317cd0b19a
Refactor some object type checking code with cast_to
Less stringly typed logic, and less String allocations and comparisons.
2022-02-08 10:08:34 +01:00
jfons
dd970482c5 Improvements and fixes to occluders
Improvements:
* Occluder3D is now an abstract type inherited by: ArrayOccluder3D, QuadOccluder3D, BoxOccluder3D, SphereOccluder3D and PolygonOccluder3D. ArrayOccluder3D serves the same purpose as the old Occluder3D (triangle mesh occluder) while the rest are primitives that can be used to manually place simple occluders.
* Occluder baking can now apply simplification. The "bake_simplification_distance" property can be used to set a world-space distance as the desired maximum error, set to 0.1 by default.
* Occluders can now be generated on import. Using the "occ" and "occonly" keywords (similar to "col" and "colonly" for colliders) or by enabling on MeshInstance3Ds in the scene's import window.

Fixes:
* Fixed saving of occluder files after bake.
* Fixed a small error where occluders didn't correctly update in the rendering server.

Bonus content:
* Generalized "CollisionPolygon3DEditor" so it can also be used to edit Resources. Renamed it to "Polygon3DEditor" since it was already being used by other things, not just colliders.
* Fixed a small bug in "EditorPropertyArray" where a call to "remove" was left after the "remove_at" rename.
2022-02-07 13:04:51 +01:00
Rémi Verschelde
bfb75d107c
Merge pull request #57741 from Chaosus/vs_fixes 2022-02-07 12:50:44 +01:00
Rémi Verschelde
b024602660
Merge pull request #57725 from jmb462/missing-sname-theme-setters 2022-02-07 11:46:25 +01:00
Yuri Roubinsky
a6e280c5de Add some more fixes to visual shader 2022-02-07 11:28:42 +03:00
jmb462
a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
Yuri Roubinsky
db18faf660 Rename PORT_TYPE_VECTOR to PORT_TYPE_VECTOR_3D 2022-02-06 20:15:28 +03:00
jmb462
1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
Hugo Locurcio
7721e19ccc
Tweak default SDFGI settings for better quality
- Enable Read Sky Light to get proper outdoors lighting out of the box.
- Set bounce feedback to 0.5 by default to get a better quality result.
  - Higher values may cause infinite feedback with bright surfaces.
- Increase the number of frames to converge to improve quality
  at the cost of latency. Most scenes are fairly static after all.
- Use 75% Y scale by default as most scenes are not highly vertical.

- Reorder the Y scale enum to go from the lowest Y scale to the highest.
  Also rename the "Disabled" setting to "100%" for clarity.
2022-02-06 15:28:59 +01:00
Hugo Locurcio
b9cfc74f29
Decrease the default number of SDFGI cascades to 4
This improves rendering performance noticeably, especially when the
camera moves fast.

On a medium-sized test scene on a GTX 1080 in 2560×1440, going
from 6 to cascades saves 0.5 ms of frame time while looking visually
identical (as most of the scene fits within the 4 cascades).
2022-02-06 15:01:25 +01:00
Fabio Alessandrelli
d219547c96 [Net] New replication interface, spawner and synchronizer nodes.
Initial implementation of the MultiplayerReplicationInterface and its
default implementation (SceneReplicationInterface).

New MultiplayerSpawner node helps dealing with instantiation of scenes
on remote peers (e.g. clients).
It supports both custom spawns via a `_spawn_custom` virtual function,
and optional auto-spawn of known scenes via a TypedArray<PackedScenes>
property.

New MultiplayerSynchornizer helps synchronizing states between the local
and remote peers, supports both sync and spawn properties and is
configured via a `SceneReplicationConfig` resource.
It can also sync via path (i.e. without being spawned by a
MultiplayerSpawner if both peers has it in tree, but will not send the
spawn state in that case, only the sync one.
2022-02-04 14:56:30 +01:00
bruvzg
244db37508
Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
Rémi Verschelde
f8f19b313d
Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
2022-02-03 22:21:24 +01:00
Anilforextra
adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Rémi Verschelde
45d5aa5d47
Merge pull request #56365 from aaronfranke/default-shape-size 2022-02-03 16:59:07 +01:00
Yuri Roubinsky
59af063636 Add support for 2D vector type to visual shaders 2022-02-02 19:59:34 +03:00
bruvzg
215bede6ff
[TextServer] Add function to change font, font size, and OpenType features without invalidating line break points, justification points, or recreating shaped text buffer. 2022-02-02 11:20:44 +02:00
Anilforextra
fc27636999 Vectors: Use clear() and has().
Use clear() instead of resize(0).

Use has() instead of "find(p_val) != -1".
2022-02-02 00:11:09 +05:45
Rémi Verschelde
6914a58f99
Merge pull request #57376 from Calinou/gradienttexture2d-clamp-size 2022-02-01 14:22:01 +01:00
Aaron Franke
8cfd264148
Improve the default size for 3D shapes (Box, Capsule, and Cylinder) 2022-02-01 06:43:16 -06:00
Rémi Verschelde
dafadd73ac
Merge pull request #57375 from Calinou/gradienttexture-curvetexture-decrease-default-size 2022-02-01 13:39:16 +01:00
Rémi Verschelde
45553fd586
Merge pull request #56970 from YeldhamDev/rise_tabbar_rise 2022-01-31 21:46:07 +01:00
Michael Alexsander
64c4a5b283 Bring TabBar to full parity with the TabContainer implementation. 2022-01-31 15:35:54 -03:00
Rémi Verschelde
d7822cbf21
Merge pull request #57367 from Chaosus/vs_derivative 2022-01-31 16:51:30 +01:00
Paulb23
1cd1df5dc3 Move placeholder color to theme item 2022-01-30 17:56:23 +00:00
Nathan Franke
8a0a3accee
simplify formatting scripts, add a clang-tidy script, and run clang-tidy 2022-01-29 04:41:03 -06:00
Hugo Locurcio
34d382eab6
Clamp GradientTexture2D dimensions to 2048×2048 in the inspector
Larger sizes take up a lot of memory for little visual benefit.
They also take a while to initialize, which makes the inspector slow
to refresh when the texture needs to be regenerated.
2022-01-29 00:32:16 +01:00
Hugo Locurcio
b4f0d4c7db
Decrease the default GradientTexture and CurveTexture size
This provides better usability when a GradientTexture or CurveTexture
is added to a Control node.

Visual appearance of most GradientTextures and CurveTextures will
be unaffected.
2022-01-29 00:28:10 +01:00
Rémi Verschelde
2a5b136de2
Merge pull request #57371 from Scony/fix-navigation-2d-defaults 2022-01-28 23:24:38 +01:00
Rémi Verschelde
2279edeaf0
Merge pull request #57368 from TokageItLab/fix-delta-for-animation-tree 2022-01-28 23:16:29 +01:00
Pawel Lampe
450e29a569 Improve Navigation2D default settings, see #56852
This commit reduces `cell_size` and `edge_connection_margin` default
values so that `Navigation2D` behaves more like in Godot <= `3.4` by default.
2022-01-28 22:35:05 +01:00
Silc 'Tokage' Renew
0650846248 Make AnimationTree delta argument force double in core 2022-01-29 05:07:30 +09:00
Yuri Roubinsky
88b2afa28f [VisualShader] Merge scalar and vector derivative functions into one 2022-01-28 22:19:10 +03:00
Rémi Verschelde
b8b33df178
TileSetAtlasSource: Make get_tile_data return TileData *
This is now possible thanks to `Variant` changes.

Also unbind some `_` prefixed methods which don't need to be exposed.
2022-01-28 14:27:12 +01:00
Rémi Verschelde
58324f4df8
Merge pull request #54574 from Ansraer/glow_map 2022-01-26 13:39:51 +01:00
Rémi Verschelde
d9fd16c8e4
Merge pull request #53954 from Chaosus/fix_quit_errors 2022-01-25 20:09:52 +01:00
Rémi Verschelde
894e2fddda
Merge pull request #55841 from OverloadedOrama/expose-bitmap-methods 2022-01-25 16:54:26 +01:00
Rémi Verschelde
fba4c6606d
Merge pull request #56891 from rafallus/meshlib_shapes_array 2022-01-25 16:53:41 +01:00
Rémi Verschelde
ee253163ab
Merge pull request #57056 from Chaosus/vs_fix_defaults 2022-01-23 00:27:48 +01:00
Rémi Verschelde
02f3e3346a
Merge pull request #56912 from AnilBK/circle-fix
Circle&CapsuleShape2D: Fix outlines missing line.
2022-01-22 20:50:41 +01:00
Anilforextra
70b0b2f164 Circle&CapsuleShape2D: Fix outlines missing line. 2022-01-22 22:14:41 +05:45
Yuri Roubinsky
56a6e95d6a Remove transform input from fog mode in visual shaders 2022-01-22 16:31:06 +03:00
Yuri Roubinsky
538cff1351 Fix default input port hints for some modes in visual shader 2022-01-22 11:12:56 +03:00
Yuri Roubinsky
cd5b681997 Fix undo after non-last port removal in VisualShaderNodeExpression 2022-01-21 15:21:41 +03:00
Omar Polo
bd448e5535 Rename or refactor macros to avoid leading underscores
These are not used consistently and some can conflict with
system-specific defines.  While here, also delete some unused macros.
2022-01-20 20:29:15 +01:00
Ansraer
90652b1755 add support for glow maps 2022-01-20 16:47:25 +01:00
Rémi Verschelde
9e0973ca23
Merge pull request #56972 from lawnjelly/warn_unused 2022-01-20 15:34:41 +01:00
lawnjelly
b411a731fe Add nodiscard to core math classes to catch c++ errors.
A common source of errors is to call functions (such as round()) expecting them to work in place, but them actually being designed only to return the processed value. Not using the return value in this case in indicative of a bug, and can be flagged as a warning by using the [[nodiscard]] attribute.
2022-01-20 13:07:49 +00:00
Hugo Locurcio
84a69d7429 Improve the default project theme
The new default project theme uses StyleBoxFlat extensively for
a more modern design and better scalability to multiple resolutions.

SVG icons are now used in place of PNG icons. While this does not
allow for true vector-based icon drawing (icons are still rasterized
at load-time), this makes the design work easier for contributors
and opens the door to vector drawing in the future (e.g. with polygons
or SDFs).

Like for editor icons, the SVG header file is now built automatically
when a SVG file is changed. This removing the need for running
`make_header.py` manually (TODO).

The "Use Hidpi" project setting has been removed in favor of a
"Default Theme Scale" project setting, which allows creating the
default theme at a higher/lower scale than the default.
This can be used when designing GUIs with a high base resolution
to ensure crisp visuals.

Co-authored-by: Yuri Sizov <yuris@humnom.net>
2022-01-19 18:46:01 +03:00
rafallus
5f8b292ad3 Make sure MeshLibrary shape array has correct number of elements 2022-01-18 19:48:13 -06:00
Rémi Verschelde
030638e5b4
Merge pull request #56104 from Geometror/add-flow-layout-container
Add FlowContainer
2022-01-18 20:26:29 +01:00
Rémi Verschelde
45cb12955f
Merge pull request #56622 from Pineapple/scenestate-optimizations 2022-01-18 16:35:32 +01:00
Rémi Verschelde
01eefa2c50
Merge pull request #56761 from Calinou/sdfgi-allow-any-number-of-cascades 2022-01-18 16:21:39 +01:00
Hugo Locurcio
2dc7b03a82
Allow using between 1 and 8 cascades for SDFGI
This provides more flexibility between performance and quality
adjustments, especially when using SDFGI for small-scale levels
(which can be useful for procedurally generated scenes).
2022-01-17 16:49:02 +01:00
Rémi Verschelde
a2d323c67e
Merge pull request #54794 from bruvzg/runtime_bmfont_parser 2022-01-17 13:25:08 +01:00
Rémi Verschelde
1cff9a2e49
Merge pull request #55551 from brennengreen/panorama-sky-filtering
Add filtering property to PanoramaSkyMaterial and switch from static shader to shader cache
2022-01-16 01:30:44 +01:00
Paulb23
fffeecfd68 Improvments for SyntaxHighlighters
- Fix immedate Funcion in lamba highlight
- Highlight signals as one colour
- Highlight node paths as one colour
- Highlight escape chars in strings
2022-01-15 15:39:55 +00:00
Brennen Green
0695440124 Add shader cache and filter variable to PanoramaSkyMaterial 2022-01-14 23:30:27 -05:00
kleonc
3f9e50505a Fix AtlasTexture nesting 2022-01-15 00:14:56 +01:00
Rémi Verschelde
f60c81af11
Merge pull request #56784 from V-Sekai/expose-add-named-bind 2022-01-14 14:24:16 +01:00
K. S. Ernest (iFire) Lee
c5528af71c Expose add_named_bind for all essential skin bindings. 2022-01-14 03:20:24 -08:00
Rémi Verschelde
e529803ef9
Merge pull request #56738 from YeldhamDev/improve_tab_consistency 2022-01-14 10:42:30 +01:00
Rémi Verschelde
a987ebfde2
Merge pull request #56714 from bruvzg/fix_alignment_break_overrun 2022-01-13 10:20:02 +01:00
Rémi Verschelde
f6792eacf5
Merge pull request #54956 from Calinou/lineedit-textedit-add-caret-width-theme-item
Add a theme constant to change LineEdit and TextEdit's caret width
2022-01-13 09:21:01 +01:00
bruvzg
baec983d8a
[TextServer] Improvements for line breaking, "Fill" alignment, overrun, and interaction between these modes.
Fix "Fill" alignment processing wrong side of the text if overrun trim was applied.
Improve "Fill" alignment to avoid adding excessive subsequent spaces or elongations.
Add font detection to the overrun, to correctly add ellipsis (was using last glyph font, which doesn't necessary have dot character).
Improve line breaking to avoid adding excessive subsequent soft break points for languages without word separator.
Port missing overrun/justification code to the Fallback text server.
Fix inferred text direction detection by controls.
Add tests for "Fill" alignment and line breaking glyph flags.
2022-01-13 08:53:28 +02:00
Michael Alexsander
a989dc019b Improve looks and consistency of tabs 2022-01-12 22:11:43 -03:00
Rémi Verschelde
585231a172
Merge pull request #56492 from akien-mga/remove-author-docstrings 2022-01-12 15:24:17 +01:00
Yuri Roubinsky
422f7b280f Optimize include files to improve shader_language.h compilation speed 2022-01-12 14:19:12 +03:00
Rémi Verschelde
189662e5bd
Merge pull request #56696 from AnilBK/use-init-lists 2022-01-12 10:04:45 +01:00
Anilforextra
6c3a0460a8 Use List Initializations for Vectors. 2022-01-12 10:15:12 +05:45
Rémi Verschelde
d40d86b959
Merge pull request #56667 from Ice-Cube69/fix_incorrect_property_types 2022-01-11 14:34:18 +01:00
Arnav Vijaywargiya
0c46f73b5e Fixed incorrect property types 2022-01-11 17:17:11 +05:30
Rémi Verschelde
f20ae16e0b
Merge pull request #56323 from Gallilus/Update-default-port_grab_distance_vertical 2022-01-11 11:17:33 +01:00
bruvzg
c89c515ccf
[TextServer] Improve ligature cursor handling.
Fix mid-grapheme hit test.
Fix OpenType features property handling, add default features override option.
Enable mid-grapheme cursor by default.
2022-01-09 19:03:48 +02:00
Rémi Verschelde
1f2958861c
Merge pull request #56330 from nikitalita/convert-old-octahedral
Convert octahedral compressed normals/tangents on 3.x meshes
2022-01-08 23:38:44 +01:00
Bartłomiej T. Listwon
b6cfc55113 Removed redundant ClassDB::is_class_enabled() and moved second dynamic_cast inside worst case if 2022-01-08 14:09:22 +01:00
nikitalita
92a0cbccd5 convert old octahedral compressed normals/tangents 2022-01-08 04:03:57 -08:00
Hugo Locurcio
f6443beade
Add a theme constant to change LineEdit and TextEdit's caret width
This can be useful to improve caret visibility, especially at
larger font sizes. This can also be used for accessibility purposes.
2022-01-07 20:51:22 +01:00
Hendrik Brucker
40ee2b8953 Add FlowContainer 2022-01-07 15:51:49 +01:00
SaracenOne
901f376671 Move metallic and roughness automated assignment to an inspector UndoRedo
callback.
2022-01-06 16:07:26 +00:00
Yuri Roubinsky
8e2398207c
Merge pull request #56480 from Chaosus/vs_plugin_gdscript_template 2022-01-06 14:41:41 +03:00
Rémi Verschelde
a2a4ec7cb5
Merge pull request #56376 from pycbouh/theme-tombe-les-theme-properties 2022-01-06 11:33:43 +01:00
Yuri Roubinsky
21cfcaa129 Add a GDScript template for VisualShaderNodeCustom 2022-01-06 12:06:33 +03:00
Rémi Verschelde
d27f06a61b
Merge pull request #56193 from kodiwills/fix-update-mode-not-refreshed-visually-on-undo 2022-01-05 10:53:34 +01:00
Rémi Verschelde
4b6d2fd163
Merge pull request #56212 from laws65/skin-export-crash-fix 2022-01-05 10:48:52 +01:00
Rémi Verschelde
ba2bdc478b
Style: Remove inconsistently used @author docstrings
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.

`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00
Rémi Verschelde
42312f066b
Merge pull request #53313 from KoBeWi/debinded_konnekt 2022-01-04 12:22:46 +01:00
Rémi Verschelde
7f66c16c03
Merge pull request #51206 from clayjohn/Vulkan-ASSGI 2022-01-04 10:00:17 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
luz paz
a124f1effe Fix various typos
Found via ` codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,expct,fave,findn,gird,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint,varn`
Update editor/import/resource_importer_layered_texture.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update doc/classes/TileSetScenesCollectionSource.xml

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/graph_edit.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/resources/animation.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Update scene/gui/rich_text_label.cpp

Co-authored-by: Raul Santos <raulsntos@gmail.com>
Revert previously committed change
2022-01-02 01:03:58 -05:00
Yuri Sizov
fe283fd07a Correctly use fallback Theme values as last resort 2021-12-31 18:53:43 +03:00
David Cambré
38ad72af44 Update default port_grab_distance_vertical 2021-12-29 19:14:28 +01:00
laws65
c559bef1c7 Prevent crashes on exported project relating to Skin resource 2021-12-24 17:32:51 +10:30
Kodi
51db86d789 add missing emit_changed() to set update mode function 2021-12-23 07:53:36 -05:00
Rémi Verschelde
0f6a6ca5be
Merge pull request #56131 from Chaosus/shader_refactor_render_modes 2021-12-22 13:29:03 +01:00
Yuri Roubinsky
e8a457ba89 Refactor render_mode in shaders, forbid declaring duplicates 2021-12-21 22:20:09 +03:00
Marc Gilleron
830b54a03b Added resource path to message about old mesh format conversion 2021-12-21 14:39:40 +01:00
Yuri Roubinsky
1eb40904ce Add texture filtering properties to VisualShaderNodeTextureUniform 2021-12-16 11:50:33 +03:00
Yuri Roubinsky
f0a58af12f Rename shader hint filter_anisotropy to filter_anisotropic 2021-12-15 22:12:38 +03:00
Yuri Roubinsky
09185d76ac Rename shader hint filter_aniso to filter_anisotropy 2021-12-15 13:18:32 +03:00
Hugo Locurcio
240dfc2c68
Tweak the volumetric fog temporal reprojection property hint
Values below 0.5 will cause constant flickering in most situations,
and values above 0.99 take a very long time to fully update
(10+ seconds at high framerates).
2021-12-13 21:21:08 +01:00
Manolis Papadeas
453912d48d Expose BitMap's convert_to_image and resize methods to GDScript 2021-12-12 14:24:04 +02:00
Pedro J. Estébanez
18663aa305 Stop asuming a default value of NIL means there's no default 2021-12-11 14:03:48 +01:00
Rémi Verschelde
0ba7103bea
Merge pull request #55702 from nekomatata/physics-solver-settings 2021-12-10 22:10:41 +01:00
Hugo Locurcio
92e9cca5be
Rename hint_aniso to hint_anisotropy in the shader language
The word "anisotropy" is used in full form in BaseMaterial3D's
anisotropy-related properties.
2021-12-10 17:41:17 +01:00
Rémi Verschelde
3c448437f6
Merge pull request #55263 from RPicster/ParticleMaterial-random-start-color 2021-12-10 10:06:46 +01:00
Rémi Verschelde
f455660e93
Merge pull request #55572 from aaronfranke/ci-double 2021-12-10 10:02:38 +01:00
Aaron Franke
e9808e3d9a
Add a double-precision editor build to CI 2021-12-09 09:52:48 -06:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Nathan Franke
41a20171eb
align to horizontal_alignment, valign to vertical_alignment, related 2021-12-09 01:38:46 -06:00
PouleyKetchoupp
8682adcb87 Add physics solver settings to project settings
Helps with discovery and setup of physics solver settings, in a specific
project settings section for both 2D and 3D.

Other changes for cleanup:
-Removed unused space parameters in 3D
SPACE_PARAM_BODY_ANGULAR_VELOCITY_DAMP_RATIO
SPACE_PARAM_CONSTRAINT_DEFAULT_BIAS
-Added custom solver bias for Shape3D (same as Shape2D)
-Improved documentation for solver settings
2021-12-07 12:08:04 -07:00
Raffaele Picca
76e2c87f57 Fixed sphere emission shape to emit particles in a spheres volume and added "Sphere Surface" to keep the old behaviour. 2021-12-06 20:48:02 +01:00
Hugo Locurcio
89ec3d3bc7
Remove or make verbose some debugging prints
The message about SpatialMaterial conversion was turned into a warning,
as it can potentially interfere with porting projects from Godot 3.x
(if there's a bug in the conversion code).
2021-12-05 23:22:23 +01:00
Raffaele Picca
ddf82697d7 Random initial color parameter for ParticleMaterial
Works with 2D and 3D GPU Particles
2021-12-03 13:58:17 +01:00
Yuri Roubinsky
b12fea5b52 Add bitwise operators to VisualShaderNodeIntOp 2021-12-03 12:48:35 +03:00
Rémi Verschelde
8f00625824
Merge pull request #54910 from Calinou/basematerial3d-texture-auto-roughness-metallic
Set roughness/metallic to 1 when assigning a texture in BaseMaterial3D
2021-12-02 21:11:32 +01:00
Rémi Verschelde
bb3f0a9d58
Merge pull request #55271 from RPicster/particles-texture-animation-speed 2021-12-02 10:14:26 +01:00
Rémi Verschelde
81b7418013
Merge pull request #55402 from TokageItLab/fixed-immediatemesh-minimum-aabb
Fixed minimum size of `AABB` in `ImmediateMesh` to draw only one vertex
2021-12-02 08:05:56 +01:00
Silc 'Tokage' Renew
ca2b7a87a5 Fixed minimum size of aabb in ImmediateMesh to draw only one vertex 2021-12-02 08:33:33 +09:00
Aaron Franke
129911f61a
Improve Curve with const and real_t 2021-11-30 14:24:27 -06:00
Yuri Roubinsky
93bb34cfb4 Prevent crash when passing empty array to MeshEmitter 2021-11-26 16:07:09 +03:00
Raffaele Picca
459e2a4b6f Fixed texture animation speed when using random lifetime ( Particle2D gpu + cpu) as mentioned here: https://github.com/godotengine/godot/issues/54993 2021-11-26 01:12:23 +01:00
Lightning_A
e078f970db Rename remove() to remove_at() when removing by index 2021-11-23 18:58:57 -07:00
kobewi
4682f22293 Improve various texts 2021-11-23 12:20:57 +01:00
Rémi Verschelde
70d530029a
Merge pull request #55171 from dalexeev/font-data-set-fixed-size 2021-11-22 12:23:41 +01:00
Rémi Verschelde
a387094c25
Merge pull request #55174 from clayjohn/Sky-SRGB 2021-11-22 12:19:20 +01:00
Rémi Verschelde
ed3af70b11
Merge pull request #55170 from Razoric480/raz/cast-handle 2021-11-22 11:53:28 +01:00
clayjohn
7ba555dada Convert PhysicalSkyMaterial colors to SRGB 2021-11-21 12:26:29 -08:00
Danil Alexeev
753d677343
Expose FontData::{set,get}_fixed_size methods 2021-11-20 20:47:01 +03:00
Francois Belair
2e6e3a8ed7 Change cast of int to num to int static cast 2021-11-20 11:58:55 -05:00
Hugo Locurcio
6c0b55acad
Fix ProceduralSkyMaterial colors due to double sRGB -> linear conversion 2021-11-20 17:26:06 +01:00
Yuri Roubinsky
0270144644 Enchance VisualShaderNodeMeshEmitter, add more ports and fix bugs 2021-11-18 14:02:15 +03:00
Yuri Roubinsky
8be89357ce Fix ColorPicker inverted input on color circle 2021-11-17 20:33:17 +03:00
Rémi Verschelde
0ef092a138
Merge pull request #55056 from RandomShaper/fix_crash_instantiate 2021-11-17 15:54:38 +01:00
Pedro J. Estébanez
78ffc2a987 Fix crash when loading scene instance after node vanished from parent 2021-11-17 14:00:23 +01:00
Rémi Verschelde
08eb8c9fc3
Merge pull request #55018 from kodiwills/add-error-macros-for-set_modification_count
add negative number validation for set_modification_count
2021-11-17 08:48:19 +01:00
Kodi
bdcd98c6ce add input validation for set_modification_count
update error macros for set_modification_count
2021-11-16 19:09:01 -05:00
Nathan Lovato
a5d0a74b65 Make bezier handle type a property of keyframes, update interface
- Replaced unused code related to old close icon with a button
- Add bezier handle options to right-click menu
- Remove mirror handle mode, only keep balanced
- Update animation reference
2021-11-16 09:26:35 -05:00
Hugo Locurcio
bad74311db
Set roughness/metallic to 1 when assigning a texture in BaseMaterial3D
This makes material setup faster and avoids mistakes, especially with
the metallic channel which defaults to 0.

The value is only changed when adding a texture when none was
previously assigned, not when assigning a different texture.
2021-11-13 17:46:22 +01:00
Yuri Roubinsky
9da86c2fb7
Merge pull request #54920 from Chaosus/vs_fix_crash 2021-11-12 19:21:49 +03:00
Yuri Roubinsky
d0fbc467a6 Fix editor crash due incorrect setup of default texture in visual shader 2021-11-12 18:23:45 +03:00
Gilles Roudière
1224d7a25c Implement texture padding in TileSetAtlasSources 2021-11-12 15:14:10 +01:00