Commit graph

1910 commits

Author SHA1 Message Date
Hugo Locurcio
4b399b2285
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-04-28 20:40:01 +02:00
Haoyu Qiu
d088128b43 Remove duplicate editor settings definitions 2022-04-27 15:26:46 +08:00
Haoyu Qiu
76343f4055 Validate theme type/item names 2022-04-26 20:09:18 +08:00
kobewi
e1c74ae83f Implement Scene Unique Nodes 2022-04-26 13:55:48 +02:00
Hugo Locurcio
b9dd0180eb
Hide Tonemap White property when tonemapper is Linear in Environment
The whitepoint property isn't used when the tonemapper is Linear.
2022-04-10 23:50:14 +02:00
Rémi Verschelde
cfdb99a741
Merge pull request #57411 from Scony/fix-threaded-navmesh-baking-3.x
Fix navmesh baking
2022-04-05 19:59:32 +02:00
Haoyu Qiu
f6251724af Add an explicit way to remove a theme type
Co-Authored-by: Yuri Sizov <yuris@humnom.net>
2022-04-05 11:51:15 +08:00
Pawel Lampe
fad77ecc39 Fix debug navmesh errors, fixes #59845 2022-04-03 21:47:20 +02:00
Pawel Lampe
3035b9c44c Fix navmesh baking, fixes #57148
- 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-02 23:20:41 +02:00
Rémi Verschelde
c4897c4b8d Improve range property hints for various collision shapes
Fixes #36419.

Co-authored-by: Andrii Doroshenko (Xrayez) <xrayez@gmail.com>
(cherry picked from commit 0d772c6e6e)
2022-03-28 23:57:43 +02:00
Rémi Verschelde
113102aa51 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.

(cherry picked from commit b389ce5ccd)
2022-03-28 23:46:29 +02:00
bruvzg
fd2fba7c2c
Add binary MO translation file support. Add brotli decoder and WOFF2 support.
Use smaller .mo files instead of .po, if gettext is available.
Convert editor fonts to .woff2 format.
2022-03-25 19:51:39 +02:00
Silc 'Tokage' Renew
7b9a912ff6 fix cubic interpolate when looping 3.x
Co-authored-by: robfram <robfram@gmail.com>
2022-03-01 19:15:25 +09:00
Hugo Locurcio
967821f719
Clamp SpatialMaterial triplanar sharpness to values that never look broken 2022-02-27 18:58:22 +01:00
jfons
0959ff2fe4 Add sanity checks to lightmap unwrap texel size
(cherry picked from commit d0fd5fd3c7)
2022-02-24 13:31:17 +01:00
Markus Sauermann
156d9d1643 simplify calculation of max in grayscale
(cherry picked from commit 79a75cd683)
2022-02-21 11:12:54 +01:00
Yuri Sizov
df13466139 Add type variations to Theme 2022-02-17 15:24:10 +03:00
Rémi Verschelde
2dd545b512
Merge pull request #58141 from lawnjelly/occluder_shared_resources 2022-02-16 13:29:55 +01:00
lawnjelly
3c2df49832 Fix Occluder to properly share resources
In order to properly support the resource sharing paradigm, Occluders are split into Instances and Resources in the VisualServer. Instances are owned by a Scenario, and Resources are global. OccluderShape resources can now correctly be shared by multiple OccluderInstances.
2022-02-16 09:55:11 +00:00
lawnjelly
522bce1159 Fixed Timestep Interpolation (3D)
Adds fixed timestep interpolation to the visual server.
Switchable on and off with project setting.

This version does not add new API for set_transform etc, when nodes have the interpolated flag set they will always use interpolation.
2022-02-16 09:41:23 +00:00
Hugo Locurcio
08128351a5
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:06 +01:00
Hugo Locurcio
53b96095eb
Improve completion scroll bar visibility in the script editor (3.x)
This makes the scroll bar bar thicker and more opaque (roughly
matching the editor theme's scroll bar by default).
2022-02-14 14:54:35 +01:00
Rémi Verschelde
7a16bb2ee4
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.

(cherry picked from commit 1bdb82c64e)
2022-02-11 09:50:59 +01:00
Haoyu Qiu
8231303dec Backport FlowContainer 2022-02-11 14:48:40 +08:00
Pawel Lampe
6c6e50bf0c Fix navigation merge errors, fixes #56786
- improved `detail/sample_max_error` default value
- improved floating point precision handling in cell key calculations
- improved `merge error` error message
- exposed `cell_height` of `nav_map` to the `Navigation`
- fixed cell key `y` calculation
2022-02-02 23:52:29 +01:00
lawnjelly
8ea20f5fdd Add OccluderShapePolygon
Add OccluderShapePolygon, glue to Occluder and gizmos etc.
2022-02-01 11:31:06 +00:00
Yuri Sizov
797bb1d97e Ensure that NavMesh baking updates the inspector 2022-01-26 01:16:50 +03:00
Manolis Papadeas
941879f601
Expose BitMap's convert_to_image and resize methods to GDScript
(cherry picked from commit 453912d48d)
2022-01-25 18:55:52 +01:00
rafallus
58191c4b7e
Make sure MeshLibrary shape array has correct number of elements
(cherry picked from commit 5f8b292ad3)
2022-01-25 18:55:52 +01:00
Bartłomiej T. Listwon
58c460b3b7
Removed redundant ClassDB::is_class_enabled() and moved second dynamic_cast inside worst case if
(cherry picked from commit b6cfc55113)
2022-01-19 16:04:16 +01:00
Haoyu Qiu
342035b635 Fix ColorPresetButton's overbright indicator in default theme 2022-01-19 14:31:10 +08:00
Hendrik Brucker
365486543d Improve Colorpicker presets 2022-01-17 15:21:47 +01:00
kleonc
63fd172fce Fix AtlasTexture nesting 2022-01-15 00:11:02 +01:00
Michael Alexsander
9d2070ee19 Modify texture of selected tabs to better blend with the panel 2022-01-13 21:03:52 -03:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Yuri Sizov
58319564fa Unify theme item lookup in Controls and respect default font 2022-01-13 15:21:55 +03:00
David Cambré
c2a9de23f5
Update default port_grab_distance_vertical
(cherry picked from commit 38ad72af44)
2022-01-12 17:28:07 +01:00
Paweł Fertyk
5e57b850b6 Issue 56488 fail when image and texture size are different 2022-01-11 13:19:43 +01:00
Andrii Doroshenko (Xrayez)
8c11c28a8a Fix GradientTexture2D not working with Light2D
`Light2D` expects valid texture resource to be available initially for it to be properly bound.

Changed texture allocation implementation to be consistent/same with `GradientTexture` (1D).
2022-01-08 19:10:12 +02:00
Rémi Verschelde
aad12a2df5
Merge pull request #54824 from LightningAA/backport-gradient-texture-2d 2022-01-07 14:47:44 +01:00
Rémi Verschelde
8f17a4037b
Merge pull request #56466 from Chaosus/vs_uniform_hints_3.x 2022-01-06 09:39:27 +01:00
Kodi
b4be27a68b
add missing emit_changed() to set update mode function
(cherry picked from commit 51db86d789)
2022-01-06 00:21:36 +01:00
Nick Swoboda
4ec6513c42
Improve error messages related to failing to open files
(cherry picked from commit bf8f763524)
2022-01-06 00:21:32 +01:00
Rémi Verschelde
91c5a336e8
Merge pull request #55718 from bruvzg/oversampling_override 2022-01-06 00:07:48 +01:00
Jake Young
09bc9eb101
Backport NavigationServer with RVO2 to 3.x
Change the entire navigation system.
Remove editor prefix from nav mesh generator class. It is now used for baking
at runtime as well.
Navigation supports obstacle avoidance now with the RVO2 library.
Nav system will also automatically link all nav meshes together to form one
overall complete nav map.
2022-01-05 16:00:56 +01:00
Yuri Roubinsky
5b0fe7880e [3.x] Add hints and default values to the uniform nodes in visual shader 2022-01-03 22:59:10 +03:00
Pedro J. Estébanez
4f38a9e4d6
Stop asuming a default value of NIL means there's no default
(cherry picked from commit 18663aa305)
2021-12-21 11:27:14 +01:00
Raffaele Picca
6dd593d579 Random initial color for all Particle Nodes 2021-12-10 16:35:25 +01:00
Raffaele Picca
28a6d32971 Fixed texture animation speed when using random lifetime 2021-12-09 19:59:24 +01:00
bruvzg
eb54676e0f
Add DynamicFontData oversampling override property. 2021-12-08 11:34:56 +02:00
Rémi Verschelde
7c82db2cd4
Merge pull request #55607 from RPicster/3.x-particle-double-seed-use-fix 2021-12-07 12:01:08 +01:00
lawnjelly
3d981b8265 Add option to use handles to RID
Adds an option to compile an alternative implementation for RIDs, which allows checks for erroneous usage patterns as well as providing leak tests.
2021-12-06 14:43:34 +00:00
Raffaele Picca
20568b9768 Fix for double use of seed in random Particle shader variables. 2021-12-03 23:31:55 +01:00
Rémi Verschelde
ade0e700f1
Merge pull request #55591 from RPicster/3.x-particlemat-ring-axis-fix
Fix Ring-Axis parameter being always visible
2021-12-03 21:38:16 +01:00
Raffaele Picca
2f69caaff3 Fix Ring-Axis parameter being always visible 2021-12-03 21:16:32 +01:00
Rémi Verschelde
86fd7da7a3
Merge pull request #54899 from clayjohn/MultiMesh-update 2021-11-22 08:30:49 +01:00
clayjohn
b54d4a93be Update CanvasItem when MultiMesh instance transform changes 2021-11-21 12:27:22 -08:00
Marcel Admiraal
4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
Pedro J. Estébanez
0ebbc5b07c
Fix crash when loading scene instance after node vanished from parent
(cherry picked from commit 78ffc2a987)
2021-11-17 15:55:36 +01:00
Rémi Verschelde
c3a6b0f418
Merge pull request #51433 from Calinou/spatialmaterial-improve-simple-parallax 2021-11-16 14:43:49 +01:00
Rémi Verschelde
6f4858f184
Modules: Make sure to include modules_enabled.gen.h where needed
Fixes #51677.

Co-authored-by: Arkadiusz Marcin Kołek <aksoftware91@gmail.com>
2021-11-12 13:45:33 +01:00
Hendrik Brucker
97074dcf95 Add GradientTexture2D
Co-authored-by: Mariano Javier Suligoy <marianognu.easyrpg@gmail.com>
Co-authored-by: Andrii Doroshenko <xrayez@gmail.com>
2021-11-10 19:00:40 -07:00
Rémi Verschelde
1f8497d281
Merge pull request #53411 from RandomShaper/ubershaders_3.x 2021-11-09 13:12:44 +01:00
Pedro J. Estébanez
4c710780d4 Implement async shader compilation plus caching for GL ES 3
Async. compilation via ubershader is currently available in the scene and particles shaders only.

Bonus:
- Use `#if defined()` syntax for not true conditionals, so they don't unnecessarily take a bit in the version flagset.
- Remove unused `ENABLE_CLIP_ALPHA` from scene shader.
- Remove unused `PARTICLES_COPY` from the particles shader.
- Remove unused uniform related code.
- Shader language/compiler: use ordered hash maps for deterministic code generation (needed for caching).
2021-11-09 12:19:12 +01:00
Rémi Verschelde
f9174d1c28
Merge pull request #54625 from bruvzg/surrogates 2021-11-09 00:08:28 +01:00
Rémi Verschelde
4b4e92b3d4
Merge pull request #52944 from RandomShaper/property_pin_control_natural_3.x 2021-11-08 18:53:25 +01:00
Pedro J. Estébanez
4dba25b3ff Add property value pinning 2021-11-08 17:42:27 +01:00
Rémi Verschelde
5f87d5ebea
Merge pull request #54385 from Calinou/colorpicker-overbright-indicator-tweak-icon-3.x 2021-11-08 13:15:35 +01:00
Pedro J. Estébanez
76b7d23a10 Unify determination of default property values 2021-11-08 11:17:49 +01:00
Hugo Locurcio
cc2b6acbd2
Improve the appearance of simple parallax in SpatialMaterial
This uses offset limiting to avoid distortion in the distance,
and makes simple (non-deep) parallax more usable overall.
2021-11-07 00:58:04 +01:00
bruvzg
262ec9033a Implement limited surrogate pairs support for platforms with 16-bit wchar_t. 2021-11-06 11:55:06 +02:00
Yuri Sizov
ec15227be8 Prevent MeshDataTool from crashing due to invalid bones/weights arrays 2021-11-02 16:52:36 +03:00
Hugo Locurcio
cb441dd9eb
Tweak overbright indicator icon to be more visible on white background
An outline is now present on all sides to ensure it's more visible
when the "new" color (on the right of a ColorPicker) is overbright.
2021-10-29 16:20:40 +02:00
Rémi Verschelde
1b65550ec7
clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
Rémi Verschelde
42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Yuri Sizov
7fe0dab69b Add focus font color to Button and derivatives 2021-10-26 17:40:51 +03:00
Sean Kim
8de5b78a97 Fix crash on null image ref in ProceduralSky 2021-10-20 22:55:08 -07:00
Hugo Locurcio
c4a3560884
Allow negative scale in Particles and CPUParticles
This can be used to make 2D particles look more 3D-y with thoughtful use
of scale curve animation.
2021-10-15 19:06:30 +02:00
Rémi Verschelde
06fc2378de
Merge pull request #51491 from Calinou/glow-add-high-quality-mode-3.x
Add high quality glow mode (3.x)
2021-10-08 07:47:07 +02:00
PouleyKetchoupp
00d4a30b05
Fix editable children errors when packing scene tree at runtime
When packing a scene node which is not the root, errors where caused
by internal checks in is_editable_instance method.

This check can be safely made outside instead.

(cherry picked from commit 2f6cf3b8a8)
2021-10-06 09:29:31 +02:00
Hugo Locurcio
fd5e3d9702
Add an use_hdr property to GradientTexture to allow storing HDR colors
This is disabled by default to save some memory and preserve the existing
behavior of clamping colors.
2021-10-05 19:32:54 +02:00
Rémi Verschelde
bd7bea2087
Merge pull request #53233 from metinc/fix-animated-sprite-precision-error 2021-10-05 15:23:51 +02:00
Yuri Sizov
457d48a1f1 Make Theme report property list changes less often 2021-10-04 18:05:23 +03:00
Yuri Sizov
98cf645258 Expose API to retrieve Theme's default font 2021-10-04 17:44:53 +03:00
Yuri Sizov
cd45a70f2d Reorganize Theme resource code for better maintainability 2021-10-04 17:09:32 +03:00
boruok
85dd970b81 [3.x] Fix AtlasTexture get_data crash 2021-09-30 22:22:10 +09:00
Metin Celik
edcb7b8129 Add half frame to floor() 2021-09-29 20:03:07 +02:00
Duarte David
a4fecbb0da
Fixes the normals of SphereMesh when the sphere/hemisphere is oblong
(cherry picked from commits f4ac08a182
and 7d53755ca7)
2021-09-29 10:55:51 +02:00
boruok
768cff7c02 fix atlas texture return null 2021-09-28 16:34:00 +09:00
Rémi Verschelde
ac01b1cb1c
Revert "Fixes the normals of SphereMesh when the sphere/hemisphere is oblong"
This reverts commit c4d0074aae.

It caused regression #52965.
2021-09-27 18:27:55 +02:00
John Wigg
d484e30247
Fix y billboard shear when rotating camera
Fixes shear effect with `BILLBOARD_FIXED_Y` when the camera is rotated around the z-axis by rotating the mesh correctly into view space.

Also removes shearing effects that occur when rotating the mesh by excluding the model rotation and scale from the billboard matrix.

(cherry picked from commit d3850a0954)
2021-09-21 20:33:11 +02:00
skysphr
f53294f874
Added increment_pressed and decrement_pressed icons to scrollbars
(cherry picked from commit e27ab2708f)
2021-09-21 17:14:59 +02:00
gyroninja
9f0d7b70fd
Fail at instantiating if the root node is instantiated
(cherry picked from commit f400c9239e)
2021-09-21 17:14:58 +02:00
Rémi Verschelde
be6b7b4f9f
Merge pull request #52475 from tcoxon/fix_43733_3.x
Prevent shaders from generating code before the constructor finishes. [3.x]
2021-09-21 13:53:17 +02:00
Tom Coxon
9e9bac1549 Prevent shaders from generating code before the constructor finishes.
Fixes #43733: "creating SpatialMaterial in a separate thread creates invalid
shaders (temporarily)."

The bug occurred because various setters called in materials' constructors add
materials to queues that are processed on the main thread. This means that
when the materials are created in another thread, they can be processed on the
main thread before the constructor has finished.

The fix adds a flag to affected materials that prevents them from being added
to the queue until their constructors have finished initialising all the
members.
2021-09-21 11:47:51 +01:00
Hugo Locurcio
210ab11643
Write node groups one a single line when saving a .tscn file
This makes `.tscn` files more readable by ensuring sections are always
written on a single line.

(cherry picked from commit d33a7367b6)
2021-09-19 11:30:21 +02:00
Rémi Verschelde
c33ff6bf6b
Merge pull request #47235 from opl-/fix/25046-3.x 2021-09-16 15:24:09 +02:00
Rémi Verschelde
627577d615
Merge pull request #47346 from nekomatata/heightmap-draw-triangles-3.x 2021-09-16 15:23:06 +02:00
PouleyKetchoupp
389e67aa98
Fix loading packed scene with editable children at runtime
At runtime, packed scenes with nodes marked as editable instance where
saved with node type tags, which prevented the scene to be then loaded
as an instance, causing duplicated nodes in the tree.

This change ensures nodes marked as editable instances and their owned
children are properly set as instances.

That doesn't make a difference in the editor, since such nodes where
already set as instances based on their instance state, but it helps
at runtime where instance states are disabled.

Co-authored-by: latorril <latorril@gmail.com>
(cherry picked from commit fab88a810c)
2021-09-14 13:41:27 +02:00
Yuri Roubinsky
b36b81cbdd
Better port handling connection for GraphEdit
(cherry picked from commit 61904d56ea)
2021-09-14 13:41:27 +02:00
Duarte David
c4d0074aae
Fixes the normals of SphereMesh when the sphere/hemisphere is oblong
(cherry picked from commit f4ac08a182)
2021-09-14 13:41:26 +02:00
Vincent
ea13ff860d
implement individual mesh transform for meshlibrary items
(cherry picked from commit 70108fd850)
2021-09-14 13:41:22 +02:00
opl-
a8a52f576e Fix DynamicFont breaking mouse grab in inspector spinners
This was caused by DynamicFont not specifying which property was edited, resulting in the whole inspector property tree being recreated.
2021-09-11 20:12:44 +02:00
Endri Lauson
077083938e Add a new high quality tonemapper: ACES Fitted 2021-09-08 19:12:09 -03:00
Camille Mohr-Daurat
8608ece42f
Merge pull request #50405 from nekomatata/clean-convex-hull-decomposition-3.x
[3.x] Clean convex hull decomposition code
2021-09-06 09:34:50 -07:00
Hugo Locurcio
1ab3ddf94a
Allow using WOFF fonts in DynamicFont
This is already supported by FreeType, but it wasn't exposed.

Adding support for WOFF2 would require linking a Brotli decompression
library in Godot, so only WOFF1 is exposed here.
2021-08-25 08:09:23 +02:00
Hugo Locurcio
33d23281cb
Allow clearcoat, anisotropy and refraction in SpatialMaterial in GLES2
These SpatialMaterial features work just fine in GLES2,
but they were not exposed in the inspector when GLES2 was used.
2021-08-22 02:18:36 +02:00
Rémi Verschelde
6a058cbf39
Merge pull request #51746 from Calinou/add-shader-comment-3.x
Add a comment at the top of generated shaders (3.x)
2021-08-19 00:16:29 +02:00
Yuri Sizov
29f0a0eebf Adjust the material key bit size for ParticlesMaterial 2021-08-18 17:53:24 +03:00
Rémi Verschelde
c0fc475078
Merge pull request #51521 from lawnjelly/portals_occluders
Sphere occluders (portals and general use)
2021-08-17 13:55:34 +02:00
Rémi Verschelde
53cc7a9be9
Merge pull request #51648 from pycbouh/editor-merge-custom-theme-3.x
[3.x] Add support for partial custom editor themes
2021-08-17 13:12:49 +02:00
lawnjelly
115f4dce55 Sphere occluders (portals and general use)
Add framework for supporting geometrical occluders within rooms, and add support for sphere occluders.
Includes gizmos for editing.

They also work outside the portal system.
2021-08-17 09:02:06 +01:00
Hugo Locurcio
8dae2f9f00
Add a comment at the top of generated shaders
This comment is useful to determine the origin of ShaderMaterials
converted from built-in material types (such as CanvasItemMaterial
or SpatialMaterial).

The Godot version is also included in case the shader needs to be
regenerated with a newer engine version.
2021-08-16 18:46:55 +02:00
Rémi Verschelde
450f7fdc39
Merge pull request #51690 from QbieShay/rotate-y-fix
fixed rotate y flag causing the position to reset
2021-08-15 12:18:54 +02:00
QbieShay
32c287e01b fixed rotate y flag causing the position to reset 2021-08-15 11:35:22 +02:00
Yuri Sizov
ab25266213 Add support for partial custom editor themes 2021-08-14 02:11:54 +03:00
Rémi Verschelde
54d14a912a
Merge pull request #51402 from tinmanjuggernaut/texture_array_anisotropic
[3.x] Add Anisotropic Filter option for TextureArrays
2021-08-13 08:46:22 +02:00
Rémi Verschelde
f75d8d5c04
Merge pull request #51589 from Geometror/improve-stylebox-aa-3.x
StyleBox fake AA improvements (make anti aliasing size a float property) [3.x]
2021-08-13 01:33:01 +02:00
Rémi Verschelde
4b514bfdff
Merge pull request #51577 from m4gr3d/update_external_texture_config
Update external texture flag configuration.
2021-08-12 22:55:15 +02:00
Hendrik Brucker
6d05ef9ccb StyleBox fake AA improvements (aa_size float property) 2021-08-12 22:21:34 +02:00
Fredia Huya-Kouadio
2cc1cdc27b Update external texture flag configuration. 2021-08-12 10:46:09 -07:00
Cory Petkovsek
fb609b22e4 Add Anisotropic Filtering option for TextureArrays 2021-08-12 23:56:03 +08:00
Rémi Verschelde
07c70efcbb
Merge pull request #51555 from mortarroad/3.x-fix-mipmap-loading
[3.x] Fix loading mipmaps, if the mipmap levels have different formats.
2021-08-12 13:17:10 +02:00
Morris Tabor
0e26f1747b Fix loading mipmaps, if the mipmap levels have different formats.
Fixes https://github.com/godotengine/godot/issues/50647
2021-08-12 12:18:13 +02:00
Morris Tabor
fb9685daaa Fix regressions caused by recent particle spread refactor
Caused by https://github.com/godotengine/godot/pull/47310
Fixes https://github.com/godotengine/godot/issues/51043
Fixes https://github.com/godotengine/godot/issues/51424
2021-08-12 11:47:05 +02:00
Hugo Locurcio
0e0af7fa83
Add high quality glow mode
This backports the high quality glow mode from the `master` branch.

Previously, during downsample, every second row was ignored.
Now, when high-quality is used, we sample two rows at once to ensure
that no pixel is missed. It is slower, but looks much better and has
a much high stability while moving.

High quality also takes an additional horizontal sample the width of the
horizontal blur matches the height of the vertical blur.
2021-08-11 17:00:41 +02:00
Rémi Verschelde
69c194736d
VariantParser: Fix uninitialized ResourceParser funcs
They could cause a segfault when parsing values with ID "Resource"
as apparently we never set a valid `func` for it.

Fixes crash part of #42115.

(cherry picked from commit f3aaa713d9)
2021-08-03 09:33:25 +02:00
Rémi Verschelde
9735f2803c
Merge pull request #46800 from The-O-King/normal_compression
[3.x] Implement Octahedral Map Normal/Tangent Attribute Compression
2021-07-30 17:34:47 +02:00
Omar El Sheikh
d274284069 Octahedral Normal/Tangent Compression
Implement Octahedral Compression for normal/tangent vectors
*Oct32 for uncompressed vectors
*Oct16 for compressed vectors

Reduces vertex size for each attribute by
*Uncompressed: 12 bytes, vec4<float32> -> vec2<unorm16>
*Compressed: 2 bytes, vec4<unorm8> -> vec2<unorm8>

Binormal sign is encoded in the y coordinate of the encoded tangent

Added conversion functions to go from octahedral mapping to cartesian
for normal and tangent vectors

sprite_3d and soft_body meshes write to their vertex buffer memory
directly and need to convert their normals and tangents to the new oct
format before writing

Created a new mesh flag to specify whether a mesh is using octahedral
compression or not
Updated documentation to discuss new flag/defaults

Created shader flags to specify whether octahedral or cartesian vectors
are being used

Updated importers to use octahedral representation as the default format
for importing meshes

Updated ShaderGLES2 to support 64 bit version codes as we hit the limit
of the 32-bit integer that was previously used as a bitset to store
enabled/disabled flags
2021-07-30 10:29:09 -04:00
Aaron Franke
e47018ffa4
[3.x] Fix building with the FreeType module disabled 2021-07-29 21:47:40 -05:00
Yuri Sizov
62f7eb7b2f Fix a crash when trying to load a WebP StreamTexture 2021-07-29 16:00:04 +03:00
Haoyu Qiu
2131b3c61c Fix selection of spaced atlas tile when using priority 2021-07-26 20:05:59 +08:00
Aaron Franke
7dc2edc430
[3.x] Allow reading shaders from .gdshader files 2021-07-19 23:34:23 -04:00
Hugo Locurcio
c2e93a5e4d
Hide triplanar sharpness when triplanar is disabled in SpatialMaterial
The Triplanar Sharpness property has no effect when Triplanar
is disabled.
2021-07-17 06:47:15 +02:00
Hendrik Brucker
fe616d443a
Fix color properties of particle nodes/material
(cherry picked from commit 3a4a2198ed)
2021-07-15 10:25:35 +02:00
Rémi Verschelde
875045adde
Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.

(cherry picked from commit f3726ee994)
2021-07-14 23:36:38 +02:00
PouleyKetchoupp
788db5cf47 Clean convex hull decomposition code
Remove unnecessary conversion between triangle data and vertex data
whenever possible.
2021-07-13 11:13:25 -07:00
Hugo Locurcio
c0ccc34eeb
Tweak the GradientTexture property hint to follow CurveTexture
This prevents setting too large values and crashing the editor.

Very low values are also no longer allowed since they are generally
not detailed enough to represent complex gradients, leading to confusion.

(cherry picked from commit 2c7813385d)
2021-07-13 10:20:02 +02:00
Rémi Verschelde
9d2cbe2c02
Merge pull request #50328 from nekomatata/convex-hull-simplification-3.x
[3.x] Options to clean/simplify convex hull generated from mesh
2021-07-12 22:34:22 +02:00
Rémi Verschelde
6ec2caf12c
Merge pull request #48763 from QbieShay/plane-offset
[3.x] Added a center_offset property to both plane primitive and quad primitive
2021-07-12 10:32:19 +02:00
PouleyKetchoupp
240c33708c Options to clean/simplify convex hull generated from mesh
Clean: remove duplicate and interior vertices (uses Bullet algorithm)
Simplify: modify the geometry for further simplification (uses VHACD
algorithm)

In the editor, single convex hull now uses the clean option.
Added a new editor entry to create a simplified convex hull, can be
useful for creating convex hull from highly tessellated triangle meshes.

Specific change for 3.x:
Add support for Vector<Vector3> and PoolVector<Vector3> in the convex hull generator.
2021-07-09 17:45:59 -07:00
Hugo Locurcio
e7d6f8b8b8
Allow a top and bottom radius equal to 0 in CylinderMesh
The CylinderMesh generation code handles this special case and
avoids generating the top and bottom faces if their radius is equal
to 0. This improves performance by reducing the number of vertices
to draw.

If both values are set to 0, nothing will be visible but the mesh
generation will still succeed.

This also improves the CylinderMesh class documentation.

(cherry picked from commit b4ed84ba2b)
2021-06-29 14:02:22 +02:00
Pedro J. Estébanez
cd96e30fee
Remove side effects of scene save
(cherry picked from commit 598fd51277)
2021-06-29 13:13:06 +02:00
PouleyKetchoupp
cad2ba013a
Fix export var override in PackedScene at runtime
Regression fix: update_exports is tool only and should be used only in
the editor, otherwise it can cause export variable overrides from
instances to be discarded in favor of the parent's value.

(cherry picked from commit f1587c8a7d)
2021-06-29 13:12:52 +02:00
Hugo Locurcio
b174c679ab
Print warning in SpatialMaterial when depth and triplanar are active
Using both depth mapping and triplanar mapping isn't supported.
2021-06-28 19:08:20 +02:00
Hugo Locurcio
11033be5c6
Fix flipped binormal in SpatialMaterial triplanar mapping
This made normal maps on triplanar materials use an inverted Y direction
compared to non-triplanar materials.
2021-06-27 16:32:03 +02:00
Yuri Sizov
7120be9ff5 Overhaul the theme editor and improve user experience
Backport of #49388, #49772.
2021-06-21 01:37:54 +03:00
Yuri Sizov
014cb0c33a Refactor Theme item management in the theme editor
Backport of #46593, #46808, #49227
2021-06-20 20:34:37 +03:00
Rémi Verschelde
6fecaddbec
Merge pull request #49731 from Calinou/cylindermesh-allow-zero-rings-3.x
Tweak CylinderMesh `rings` property hint to allow a value of 0
2021-06-20 00:44:08 +02:00
Hugo Locurcio
a82c90ca55
Tweak CylinderMesh rings property hint to allow a value of 0
A value of 0 rings is valid and results in a non-subdivided cylinder.

Compared to the previous lowest allowed value (1), a value of 0 halves
the triangle count in any cylinder.
2021-06-19 08:52:24 +02:00