Commit graph

727 commits

Author SHA1 Message Date
Josh Chandler 8230e08f18 fixed camera2D showing incorrect bounds in editor 2020-04-30 12:25:39 -04:00
Rémi Verschelde 75e4ccc00e
Merge pull request #36427 from nekomatata/scene-thumbnail-flipped
Fixed flipped scene preview thumbnail
2020-04-28 21:59:12 +02:00
Rémi Verschelde fdf58a5858 Rename InputFilter back to Input
It changed name as part of the DisplayServer and input refactoring
in #37317, with the rationale that input no longer goes through the
main loop, so the previous Input singleton now only does filtering.

But the gains in consistency are quite limited in the renaming, and
it breaks compatibility for all scripts and tutorials that access
the Input singleton via the scripting language. A temporary option
was suggested to keep the scripting singleton named `Input` even if
its type is `InputFilter`, but that adds inconsistency and breaks C#.

Fixes godotengine/godot-proposals#639.
Fixes #37319.
Fixes #37690.
2020-04-28 15:19:49 +02:00
Juan Linietsky ae09b55a19 Exposed RenderingDevice to script API
Also added an easier way to load native GLSL shaders.

Extras:

Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload.

Note:

The precommit hooks are broken because they don't seem to support enums from one class being used in another.
Feel free to fix this after merging this PR.
2020-04-20 21:21:58 -03:00
Juan Linietsky 49d0c6a5c9 Ability to create local RenderingDevice instances. 2020-04-18 21:47:17 -03:00
Juan Linietsky 0e1c66d9fc Implement global and per instance shader uniforms.
Adds two keywords to shader language for uniforms:
-'global'
-'instance'

This allows them to reference values outside the material.
2020-04-17 12:35:41 -03:00
Rémi Verschelde 06748a2b5f
Merge pull request #37749 from clayjohn/Vulkan-improved-ss
Add vogel filter and settings to soft shadows
2020-04-13 00:39:37 +02:00
Juan Linietsky a57dc398db Implement MSAA 2020-04-12 15:33:57 -03:00
clayjohn 621f6f09a8 Add proper quality settings to soft shadows 2020-04-10 23:09:17 -07:00
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