Commit graph

768 commits

Author SHA1 Message Date
Juan Linietsky
4ffc0d6b3f Refactored shadowmapping.
- Made shadow bias size independent, so it will remain when changing light or camera size.
- Implemented normal offset bias, which greatly enhances quality.
- Added transmission to subsurface scattering
- Reimplemented shadow filter modes

Closes #17260
2020-04-08 11:19:43 -03:00
Rémi Verschelde
da887714be
Merge pull request #37570 from reduz/implement-sss
Re-implement subsurface scattering.
2020-04-04 17:14:48 +02:00
Juan Linietsky
c54f80d35c Re-implement subsurface scattering.
The size settings are more "just works", with default scale and depth scale
values that don't need much tweaking.

Additionally, a "skin" mode was added so skin looks better.
EDIT: Cleaned up SSR filter shader a bit.
2020-04-04 11:44:28 -03:00
Michael Alexsander
ae34c53590 Take borders into account with floating dock initial position/size 2020-04-04 09:48:59 -03:00
Rémi Verschelde
4a0e99f197
Merge pull request #37363 from YeldhamDev/floating_dock_enhancements
General enhancements to floating docks
2020-04-03 17:39:30 +02:00
Rémi Verschelde
6a38ce1b31
Merge pull request #37512 from reduz/implement-ssr
Re-Added screen space reflection.
2020-04-02 17:17:27 +02:00
Rémi Verschelde
f1e943f6ce
Merge pull request #35720 from Calinou/remove-request-docs-button
Remove Request Docs button in the script editor due to various issues
2020-04-02 16:45:01 +02:00
Juan Linietsky
87c658b304 Re-Added screen space reflection. 2020-04-02 11:25:21 -03:00
Hugo Locurcio
2f6f029a75 Remove Request Docs button in the script editor due to various issues
The Request Docs button is partly responsible for layout overflow
issues on narrow displays, such as #31133.

It also tended to attract spam and low-effort issues that were
difficult to act upon. A "Send Docs Feedback" menu option has been added
to replace it.
2020-04-02 14:07:03 +02:00
lupoDharkael
95a1400a2a Replace NULL with nullptr 2020-04-02 13:38:00 +02:00
Juan Linietsky
89e1263117 Move glow upscale quality to a global setting, for consistency 2020-03-30 10:46:03 -03:00
Michael Alexsander
805ee0ee6c General enhancements to floating docks 2020-03-27 16:49:41 -03:00
Juan Linietsky
a6f3bc7c69 Renaming of servers for coherency.
VisualServer -> RenderingServer
PhysicsServer -> PhysicsServer3D
Physics2DServer -> PhysicsServer2D
NavigationServer -> NavigationServer3D
Navigation2DServer -> NavigationServer2D

Also renamed corresponding files.
2020-03-27 15:21:27 -03:00
Rémi Verschelde
d1acbbce7f Rename more 2D and 3D nodes to follow convention
Rename editor plugins to match the new node names.
2020-03-27 16:26:34 +01:00
Juan Linietsky
eaae4b6408 Renamed 2D and 3D nodes to make their types explicit
Fixes #30736.
2020-03-27 14:54:04 +01:00
bruvzg
15a9f94346 Add macOS DisplayServer implementation.
Change global menu to use Callable, add support for check items and submenus.
2020-03-26 16:24:05 +01:00
Juan Linietsky
c7b4dcae2f Open sub-windows as embedded if the OS does not support them 2020-03-26 15:49:43 +01:00
Juan Linietsky
441f1a5fe9 Popups are now windows also (broken!) 2020-03-26 15:49:42 +01:00
Juan Linietsky
4758057f20 Working multiple window support, including editor 2020-03-26 15:49:40 +01:00
Juan Linietsky
8e6960a69e Refactored input, goes all via windows now.
Also renamed Input to InputFilter because all it does is filter events.
2020-03-26 15:49:39 +01:00
Juan Linietsky
9e08742de8 Added a Window node, and made it the scene root.
Still a lot of work to do.
2020-03-26 15:49:38 +01:00
Juan Linietsky
f8a79a97c7 Effective DisplayServer separation, rename X11 -> LinuxBSD 2020-03-26 15:49:34 +01:00
Juan Linietsky
4396e98834 Refactored Input, create DisplayServer and DisplayServerX11 2020-03-26 15:49:32 +01:00
clayjohn
61a74739ca Working sky shader implementation 2020-03-21 20:43:44 -07:00
Rémi Verschelde
194d2ccb72
Merge pull request #37116 from neikeq/issue-12917
Sync csproj when files are changed from the Godot FileSystem dock
2020-03-18 16:07:49 +01:00
Ignacio Etcheverry
fe0b783e70 Expose FileSystemDock to the scripting API and fixed signals
Fixed FileSystemDock's `file_removed` and `folder_removed` signals not being
emitted because the emitted was using the wrong signal name.
2020-03-18 15:06:07 +01:00
Rémi Verschelde
faca5bafe8
Merge pull request #36993 from van800/editor_metadata
For third-party tools - editor_path is stored in project's editor settings
2020-03-18 10:39:06 +01:00
Rémi Verschelde
cb282c6ef0 Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.

Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Ivan.Shakhov
2f151068b5 for third-party tools - editor_path is stored in project's editor settings 2020-03-12 13:59:48 +01:00
Rémi Verschelde
e162c07af9
Merge pull request #36920 from Faless/debugger/more_instances
Move Debug menu logic to DebuggerEditorPlugin, allow 4 debug instances
2020-03-09 12:01:14 +01:00
Haoyu Qiu
9ed61a70cc Keeps the filename when marking scene as unsaved 2020-03-09 10:26:57 +08:00
Fabio Alessandrelli
4d623b70d7 Move Debug menu logic to DebuggerEditorPlugin 2020-03-08 22:57:48 +01:00
Thakee Nathees
3275e8488b Fix EditorFolding crash when switching scenes 2020-03-05 18:19:58 +05:30
Rémi Verschelde
f742dabafe Signals: Manually port most of remaining connect_compat uses
It's tedious work...

Some can't be ported as they depend on private or protected methods
of different classes, which is not supported by callable_mp (even if
it's a class inherited by the current one).
2020-02-28 14:24:09 +01:00
Rémi Verschelde
01afc442c7 Signals: Port connect calls to use callable_mp
Remove now unnecessary bindings of signal callbacks in the public API.
There might be some false positives that need rebinding if they were
meant to be public.

No regular expressions were harmed in the making of this commit.
(Nah, just kidding.)
2020-02-28 14:24:09 +01:00
Rémi Verschelde
b7b3978684
Merge pull request #36556 from RandomShaper/rework_mutex
Reimplement `Mutex` with C++'s `<mutex>` (plus more)
2020-02-28 00:26:01 +01:00
Aaron Franke
b8a79d7530
Make internal editor key order consistent
Godot already displays controls in the order Control+Shift+Alt, so the order used with the bitmask flags should be the same.
2020-02-27 03:32:58 -05:00
Pedro J. Estébanez
18fbdbb456 Reimplement Mutex with C++'s <mutex>
Main:
- It's now implemented thanks to `<mutex>`. No more platform-specific implementations.
- `BinaryMutex` (non-recursive) is added, as an alternative for special cases.
- Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes.
- Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts.
- A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this.
- `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`.
- Thread-safe utilities are therefore simpler now.

Misc.:
- `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same.
- Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock).
- `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
2020-02-26 20:40:10 +01:00
Juan Linietsky
33b5c57199 Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.

Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.

For Variant, the float datatype is always 64 bits, and exposed as `float`.

We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.

Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +01:00
Rémi Verschelde
2cf6ac6c50 Replace FALLTHROUGH macro by C++17 [[fallthrough]]
This attribute is now part of the standard we target so we no longer
need compiler-specific hacks.

Also enables -Wimplicit-fallthrough for Clang now that we can properly
support it. It's already on by default for GCC's -Wextra.

Fixes new warnings raised by Clang's -Wimplicit-fallthrough.
2020-02-23 00:52:50 +01:00
PouleyKetchoupp
8f5ac3dbfc Fixed flipped scene preview thumbnail
No need to flip the image generated from the viewport texture anymore.
2020-02-21 17:58:05 +01:00
Fabio Alessandrelli
cbc450c0e5 Huge Debugger/EditorDebugger refactor. 2020-02-21 11:12:03 +01:00
Juan Linietsky
69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +01:00
Juan Linietsky
3205a92ad8 PoolVector is gone, replaced by Vector
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Juan Linietsky
867d073b98 Changed logic and optimized ObjectID in ObjectDB and Variant, removed RefPtr. 2020-02-15 08:36:04 -03:00
Rémi Verschelde
282c8dda98
Merge pull request #36066 from timothyqiu/float-step-range
Fixes range hint for default_float_step
2020-02-14 16:17:31 +01:00
Doug Richardson
edf907213e
Disable video driver option in editor since switching to GLES2 would
currently cause a crash on restart.

Fixes #36190.
2020-02-13 12:30:10 -08:00
Rémi Verschelde
386968ea97 Remove obsolete GLES3 backend
Due to the port to Vulkan and complete redesign of the rendering backend,
the `drivers/gles3` code is no longer usable in this state and is not
planned to be ported to the new architecture.

The GLES2 backend is kept (while still disabled and non-working) as it
will eventually be ported to serve as the low-end renderer for Godot 4.0.

Some GLES3 features might be selectively ported to the updated GLES2
backend if there's a need for them, and extensions we can use for that.

So long, OpenGL driver bugs!
2020-02-13 10:36:44 +01:00
Yuri Roubinsky
516cd821c0 Added high-end (Vulkan) label to some functions in visual shader 2020-02-12 23:17:00 +03:00
Juan Linietsky
cf8c679a23 ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits. 2020-02-12 14:24:54 -03:00
K. S. Ernest (iFire) Lee
f65debaf68 Don't flip screenshot. 2020-02-11 10:10:42 -08:00
Juan Linietsky
2049dec79e Added normalmap guided roughness mipmap generator, and a global roughness limiter. 2020-02-11 12:16:01 +01:00
Juan Linietsky
bed8980ca5 Re-implemented screen space ambient occlusion 2020-02-11 12:15:46 +01:00
Juan Linietsky
f8b5c5f063 DOF fully implemented, can be edited on the fly. 2020-02-11 12:15:26 +01:00
Juan Linietsky
acf0f6c8a7 GIProbes working. 2020-02-11 12:03:20 +01:00
Juan Linietsky
4aea9f74e6 Rewritten StreamTexture for better code reuse, added basis universal support 2020-02-11 12:02:36 +01:00
Juan Linietsky
dd3682e5fe Modernized default 3D material, fixes material bugs. 2020-02-11 12:01:24 +01:00
Juan Linietsky
449df8f688 Base 3D engine done, still untested, though. 2020-02-11 11:59:25 +01:00
bruvzg
eb48be51db Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Juan Linietsky
e1b3444415 Bugfixes and ability to better specify filter and repeat modes everywhere.
Removes antialiased flag for draw_* methods.
2020-02-11 11:53:28 +01:00
Juan Linietsky
3f335ce3d4 Texture refactor
-Texture renamed to Texture2D
-TextureLayered as base now inherits 2Darray, cubemap and cubemap array
-Removed all references to flags in textures (they will go in the shader)
-Texture3D gone for now (will come back later done properly)
-Create base rasterizer for RenderDevice, RasterizerRD
2020-02-11 11:53:26 +01:00
Michael Alexsander
021fdb1b58 Remove AnimationTreePlayer node 2020-02-10 16:25:50 -03:00
Andrea Catania
e6be3f68da - Integrated NavigationServer and Navigation2DServer.
- Added Navigation Agents and Obstacles.
- Integrated Collision Avoidance.

This work has been kindly sponsored by IMVU.
2020-02-10 14:38:52 +01:00
Haoyu Qiu
dfe9825e00 Fixes range hint for default_float_step 2020-02-10 15:39:29 +08:00
Marcel Admiraal
f0db13502a Remove duplicate WARN_PRINT macro. 2020-02-05 11:13:24 +01:00
Marcel Admiraal
5af3b4ca27 Remove duplicate ERR_PRINT macro. 2020-02-05 11:13:24 +01:00
PouleyKetchoupp
9c4a6cf745 Fixed Inspector update when a node is renamed
Whenever any node is renamed, EditorNode::_edit_current() is called and it resets plugins used for current edited properties. This change forces the inspector to update even though the same object is edited, to make sure all plugins are restored properly from unfolded properties/resources/etc.

Fixes #32832
2020-01-24 18:12:05 +01:00
Rémi Verschelde
a565c93aeb Export: Properly disable resource preview thread
Fixes #26857.
Fixes #34433.
Fixes #34826.
2020-01-14 11:34:02 +01:00
Rémi Verschelde
017b7de2df EditorNode: Delay addon init to NOTIFICATION_READY
Fixes #25635.
2020-01-13 15:02:11 +01:00
Haoyu Qiu
047d66cc6f Fixes the New Window option in macOS dock menu 2020-01-13 08:58:12 +08:00
Rémi Verschelde
7c29ce4375 Export: Add dedicated --export-pack option to export data pack
The previous behavior relying on the provided extension was problematic
on macOS since .zip is the main extension used for the full project
export (binary + data pack).

We add a dedicated `--export-pack` command line option to define when
only the data pack should be exported. Its extension will still be
inferred from the path.

Fixes #23073.
2020-01-08 14:57:46 +01:00
Rémi Verschelde
5011afcb6a Export: Improve usability of command line interface
I'm barely scratching the surface of the changes needed to make the
--export command line interface easy to use, but this should already
improve things somewhat.

- Streamline `can_export()` templates check in all platforms, checking
  first for the presence of official templates, then of any defined
  custom template, and reporting on the absence of any.
  Shouldn't change the actual return value much which is still true if
  either release or debug is usable - we might want to change that
  eventually and better validate against the requested target.

- Fix discrepancy between platforms using `custom_package/debug` and
  `custom_template/debug` (resp. `release`).
  All now use `custom_template`, which will break compatibility for
  `export_presets.cfg` with earlier projects (but is easy to fix).

- Use `can_export()` when attempting a command line export and report
  the same errors that would be shown in the editor.

- Improve error reporting after a failed export attempt, handling
  missing template and invalid path more gracefully.

- Cleanup of unused stuff in EditorNode around the export workflow.

- Improve --export documentation in --help a bit.

Fixes #16949 (at least many of the misunderstandings listed there).
Fixes #18470.
2020-01-07 14:25:56 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Rémi Verschelde
86a732b136
Merge pull request #34680 from Calinou/editor-export-nonzero-exit-code-error
Exit the editor export process with a non-zero exit code on error
2019-12-30 18:07:36 +01:00
Rémi Verschelde
388318ad4c
Merge pull request #34614 from qarmin/dont_create_preview_of_empty_scene
Don't create preview of empty scene.
2019-12-30 17:13:07 +01:00
Hugo Locurcio
79494992e4
Exit the editor export process with a non-zero exit code on error
This closes #34672.
2019-12-30 14:34:06 +01:00
Rafał Mikrut
542945f5f0 Don't create preview of empty scene. 2019-12-26 09:15:36 +01:00
Haoyu Qiu
078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Haoyu Qiu
d53c392b34 Centers Dock Position text 2019-12-23 09:37:36 +08:00
Haoyu Qiu
7a9c337dfe Makes more strings in editor translatable
* File type names in file dialogs
* Layout option names
* Visual shader editor UI
2019-12-16 16:41:07 +08:00
Haoyu Qiu
6f178a2061 Fixes infinite loop when switching editor 2019-12-11 13:27:21 +08:00
Rémi Verschelde
2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut
ed1c4bc77d Removed unused variables, add some constants numbers 2019-12-10 05:13:02 +01:00
Haoyu Qiu
93f00c0303 Fixes prompt closes the wrong scene when exiting 2019-12-06 21:46:01 +08:00
PouleyKetchoupp
dd552494eb Debug menu in editor doesn't hide on checkbox toggle
Fixes #33850
2019-11-25 16:25:54 +01:00
Rémi Verschelde
41634199c8 EditorNode: Improve tooltip for pause button
Closes #14742.
2019-11-14 11:44:20 +01:00
PouleyKetchoupp
824bc3fed8 Keep focus on the top-most node for multi-selection in scene tree
Makes behavior consistent with selecting/deselecting single nodes and fixes a regression about the focused node being lost when multi-selecting.

Fixes #33332
2019-11-10 09:37:51 +01:00
PouleyKetchoupp
133014c3fb Fixed errors when saving scene with a shrunk viewport
Handle viewport size larger than preview size but very close, when the ratio was 1 the size ended up being 0.

Fixes #33497
2019-11-09 21:16:19 +01:00
Michael Alexsander
36c4fd8935 Make the editor dimming smarter 2019-10-31 16:58:53 -03:00
Rémi Verschelde
35944aebde
Merge pull request #33019 from volzhs/class_icon
Resize custom class icon
2019-10-23 21:48:40 +02:00
volzhs
9131f70d8a Resize custom class icon 2019-10-24 03:55:56 +09:00
Rémi Verschelde
2d6cf9cc56
Merge pull request #33009 from ebert83/fix_editor_save_layout
Fix layout saving error
2019-10-23 15:31:48 +02:00
Thomas Ebert Hansen
d62ab4ab10 Fix layout saving error
As a result of commit b49226e085 FileAccess::open no longer returns ERR_CANT_OPEN if the file cannot be found/opened.
Instead check against ERR_FILE_NOT_FOUND or ERR_FILE_CANT_OPEN.
2019-10-23 15:02:51 +02:00
Fabio Alessandrelli
2ae3631318 Fix EditorNode.get_editor_theme
EditorNode was not correctly setting the class memeber when creating the
theme, using a local variable instead.
Theme is now created before registering exporters (as they might need it).
2019-10-23 10:59:03 +02:00
Mark Riedesel
6a85614d86 expose EditorSpinSlider to GDScript 2019-10-20 11:54:35 -04:00
Michael Alexsander Silva Dias
4689ece741 Minor visual adjustment in drag preview of the scene and file tree editors 2019-09-30 13:36:49 -03:00
Ruslan Mullayanov
4d5298ed7d Fixed unable to open project data folder
Removed `default` case to prevent hiding such errors in the future.

Fixes #31939.
2019-09-26 08:17:07 +02:00
Rémi Verschelde
dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Stefano Coratti
c46d172533 Fix #32263 - Hide Console Window stores opposite value 2019-09-23 22:06:34 +02:00