Commit graph

1602 commits

Author SHA1 Message Date
Delf Neumärker 28e36dc7b9 Fix crash when loading a scene containing an uncreatable type
(cherry picked from commit 04a4828c5e)
2021-02-26 11:30:38 +01:00
Rémi Verschelde 6fc9c409dd
Merge pull request #46420 from nekomatata/draw-collision-outline-option-3.2
[3.2] Added option in project settings to draw Shape2D outlines
2021-02-25 17:15:52 +01:00
PouleyKetchoupp d94cd42ccd Added option in project settings to draw Shape2D outlines
Disabling collision outlines can be useful for performance when the game
is running and many collision shapes are displayed.
2021-02-25 07:48:33 -07:00
kleonc 80e4b2d02e MeshDataTool::create_from_surface Fail on invalid index data
(cherry picked from commit 8e82cf8174)
2021-02-25 15:14:32 +01:00
PouleyKetchoupp cefaa6fb06 Fixed export var default value in PackedScene when script is not loaded in editor
(cherry picked from commit 4e14eefd94)
2021-02-22 10:15:00 +01:00
Hugo Locurcio aacaad5066
Draw an outline for 2D debug collision shapes
This makes them easier to distinguish, especially when used
in a TileMap.

The default color's opacity has been slightly decreased to account
for the new outline.
2021-02-21 17:55:54 +01:00
Delf Neumärker 4065fa0bcf Fix crash when calling connect_nodes_forced with invalid params
(cherry picked from commit 4a468171e5)
2021-02-19 15:54:00 +01:00
Delf Neumärker fd90fc2c9b Fix handling of negative indices in SurfaceTool
(cherry picked from commit 735f75a16b)
2021-02-18 23:47:35 +01:00
Pedro J. Estébanez 4485b43a57 Modernize atomics
- Based on C++11's `atomic`
- Reworked `SafeRefCount` (based on the rewrite by @hpvb)
- Replaced free atomic functions by the new `SafeNumeric<T>`
- Replaced wrong cases of `volatile` by the new `SafeFlag`
- Platform-specific implementations no longer needed

Co-authored-by: Hein-Pieter van Braam-Stewart <hp@tmm.cx>
2021-02-18 12:23:25 +01:00
Pedro J. Estébanez 6d89f675b1 Modernize Thread
- Based on C++11's `thread` and `thread_local`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed (except for the few cases of non-portable functions)
- Simpler for `NO_THREADS`
- Thread ids are now the same across platforms (main is 1; others follow)
2021-02-18 11:58:08 +01:00
Pedro J. Estébanez 4ddcdc031b Modernize Mutex
- Based on C++11's `mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
- `BinaryMutex` added for special cases as the non-recursive version
- `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`.
- `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
2021-02-18 11:58:08 +01:00
Pedro J. Estébanez b450036120 Modernize RWLock
- Based on C++14's `shared_time_mutex`
- No more need to allocate-deallocate or check for null
- No pointer anymore, just a member variable
- Platform-specific implementations no longer needed
- Simpler for `NO_THREADS`
2021-02-18 11:41:07 +01:00
andybarcia 61c00938a2
Fixes crash when calling VisualShader::set_mode
(cherry picked from commit f455f873c7)
2021-02-18 00:35:57 +01:00
Michael Alexsander c67c3e0a46
Fix StyleBoxLine's incorrect style margin values
(cherry picked from commit ddf05a7c3c)
2021-02-16 14:27:40 +01:00
kleonc 31744577b3
VisualShader::_input_type_changed Fix index out of bounds crash.
(cherry picked from commit 7d451c0040)
2021-02-16 14:27:39 +01:00
bruvzg 56fccb1ec1
[3.2] Fix SPACING_SPACE not used for drawing characters. 2021-02-15 18:03:26 +02:00
Yuri Roubinsky 34d3235c84 [3.2] Visual Shader Parenthesis fix 2021-02-08 19:37:50 +03:00
Rémi Verschelde 30fd2f171d
Merge pull request #45497 from Chaosus/fix_particles_3.2
[3.2] Fix particles not properly updated by their lifetime
2021-02-03 15:51:14 +01:00
jfons 16bbe8ddf4
3D editor grid improvements
This commit adds a view-dependant fade to the 3D viewport grid. It fades out
at steep view angles to hide the solid regions that appear far from the camera.
I also included a fade to hide the grid borders.

I added some improvements to the dynamic grid when the camera is in orthogonal mode.
It properly handles zoom now, and the grid center is now set to the intersection point
between the grid plane and the camera forward ray, keeping the grid
always visible.

(cherry picked from commit 73e62dffb9)
2021-02-02 13:30:50 +01:00
Yuri Roubinsky 8689c1178d
Adds Metallic to spatial light input of visual shaders
(cherry picked from commit f4eef287f9)
2021-02-02 13:02:46 +01:00
Yuri Roubinsky 4ae5aa0153 [3.2] Fix particles not properly modified by their lifetime 2021-01-27 16:32:21 +03:00
Rémi Verschelde 9f2c24e8ce
Cleanup: Remove executable bit from files which don't need it
Drop unused xpmfix.sh script.

(cherry picked from commit 76c6007aa6)
2021-01-26 17:00:15 +01:00
Hugo Locurcio 7133603238
Fix typo in theming methods ("botton" -> "bottom")
(cherry picked from commit 1f9cac1717)
2021-01-26 17:00:15 +01:00
Yuri Sizov a9552cefa2 Fix minimap capturing events and improve its theme
Add an editor setting for minimap opacity in visual editors
2021-01-25 21:49:34 +03:00
Rafał Mikrut f92ad30dfd Fix memory leak dynamic font 2021-01-17 17:53:13 +01:00
JFonS 7d7d7ef16d CPU lightmapper formatting and minor fixes. 2021-01-14 18:08:33 +01:00
JFonS 112b416056 Implement new CPU lightmapper
Completely re-write the lightmap generation code:
- Follow the general lightmapper code structure from 4.0.
- Use proper path tracing to compute the global illumination.
- Use atlassing to merge all lightmaps into a single texture (done by @RandomShaper)
- Use OpenImageDenoiser to improve the generated lightmaps.
- Take into account alpha transparency in material textures.
- Allow baking environment lighting.
- Add bicubic lightmap filtering.

There is some minor compatibility breakage in some properties and methods
in BakedLightmap, but lightmaps generated in previous engine versions
should work fine out of the box.

The scene importer has been changed to generate `.unwrap_cache` files
next to the imported scene files. These files *SHOULD* be added to any
version control system as they guarantee there won't be differences when
re-importing the scene from other OSes or engine versions.

This work started as a Google Summer of Code project; Was later funded by IMVU for a good amount of progress;
Was then finished and polished by me on my free time.

Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2021-01-14 18:05:56 +01:00
Rémi Verschelde 49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
lawnjelly b5edbe0301 Fix BVH physics project setting
Move the GLOBAL_DEF for the `godot_physics/use_bvh` to occur before GLOBAL_GET.

This prevents a warning occurring and the selection not being used.
2021-01-13 09:22:17 +00:00
lawnjelly 690e07b509 Dynamic BVH for rendering and godot physics
Complete rewrite of spatial partitioning using a bounding volume hierarchy rather than octree.

Switchable in project settings between using octree or BVH for rendering and physics.
2021-01-12 12:12:10 +00:00
Rémi Verschelde 6a708d6847
Merge pull request #43893 from Chaosus/vs_warnings_3.2
[3.2] Added extra warning to texture nodes in visual shader
2021-01-05 12:38:50 +01:00
kobewi a227eefd2d
Rename offset to point in remove_point()
(cherry picked from commit 4f72a07eaa)
2020-12-29 16:02:03 +01:00
bruvzg 7ed2cf79ae
[3.2] Use base character advances for outline drawing. 2020-12-25 13:27:36 +02:00
Yuri Sizov 816fef21f9 Add a minimap to the GraphEdit 2020-12-18 01:31:17 +03:00
Michael Alexsander 32da9dc1e9
Add "font_color_separator" theme property to 'PopupMenu'
(cherry picked from commit 383e8919e0)
2020-12-10 13:06:15 +01:00
bruvzg 1b4fab3318
[3.2] Fix fallback emoji font color. 2020-12-09 11:20:55 +02:00
bruvzg 4d58321850
[3.2] Load dynamic fonts to memory on all platforms, to avoid locked files. 2020-12-07 10:24:30 +02:00
Rémi Verschelde 759e53f9c0
Merge pull request #44130 from Calinou/tweak-material-height-hints-3.2
Tweak SpatialMaterial height property hints (3.2)
2020-12-06 09:35:32 +01:00
Hugo Locurcio 9f6628f5ab
Tweak SpatialMaterial height property hints
- Allow finer adjustments of the heightmap scale.
- Allow increasing the heightmap level detail (at the cost of performance).
2020-12-05 21:44:39 +01:00
rileylyman 3c5fb3bbc7
skip extra newline in .tscn when renaming dependency
(cherry picked from commit 40ce9bfc2d)
2020-12-01 09:00:53 +01:00
Yuri Roubinsky 3223747d0d [3.2] Added extra warning to texture nodes in visual shader 2020-11-26 19:14:33 +03:00
Andrii Doroshenko (Xrayez) 2edd489f83 Describe ImageTexture, Image creation and usage
Ported from commit 0ee88d6705.
2020-11-17 18:06:52 +02:00
Michael Alexsander fc1f5e149f
Fix WAV resources ignoring the AudioServer's 'global_rate_scale' value
(cherry picked from commit 04ebe4e7a4)
2020-11-17 12:07:01 +01:00
Hugo Locurcio 575dbd4bb2
Fix artifacts in DynamicFont when scaling with filtering enabled 2020-10-29 00:33:11 +01:00
Rémi Verschelde 150f9ce807
Merge pull request #42009 from Calinou/theme-node-type-3.2
Rename the `type` parameter to `node_type` in Theme and Control (3.2)
2020-10-20 15:58:41 +02:00
lolligerjoj 0586c856f6
Expose Animation::value_track_interpolate to GDscript
(cherry picked from commit ff4af94414)
2020-10-04 20:50:34 +02:00
Yuri Roubinsky ec7228a675 [3.2] Optimizations for Fresnel and Texture nodes in visual shaders 2020-10-02 08:42:06 +03:00
Rémi Verschelde ef223f3aa7
Merge pull request #41185 from Chaosus/vs_uniform_ref_3.2
[3.2] Added UniformRef visual shader node
2020-10-01 13:50:08 +02:00
Danil Alexeev ebb5821bce
Improve appearance of [connection] and [editable] sections in .tscn files
(cherry picked from commit 02c0edac60)
2020-09-29 13:57:58 +02:00
D00T24 766b637ed0
changed max point limit to 1 instead of 2
(cherry picked from commit bcc0493a4a)
2020-09-29 13:57:56 +02:00