Juan Linietsky
b3080bc2f4
Popups have also been converted to windows
...
Controls using the old modal API have been replaced to use popups.
2020-03-26 15:49:44 +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
543fb1c4da
Separate DisplayServer from OS on Windows
2020-03-26 15:49:41 +01:00
Juan Linietsky
f51fdc6eef
Support for transient windows
2020-03-26 15:49:39 +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
bruvzg
1ee27a6d9f
Rename conflicting variable to fix MoltenVK shader compilation.
2020-03-26 09:02:36 +02:00
Rémi Verschelde
641c85a54f
Merge pull request #37268 from clayjohn/VULKAN-sky-color
...
Replace subpass textures with color in sky shader
2020-03-24 19:22:55 +01:00
clayjohn
61c67cd5e1
Replace subpass textures with color in sky shader
2020-03-24 10:11:00 -07:00
Rémi Verschelde
9d24541597
Remove unused classes and stray headers
...
Found by reviewing headers with 1 or less matching includes:
```
find -name thirdparty -prune -o -name "*.h" -exec basename {} \; | sort -u > headers
for header in $(cat headers); do echo "$header: "; rg -l "#include \"(.*/)?$header\"" | wc -l; done > list-includes
```
2020-03-24 09:50:51 +01:00
Rémi Verschelde
ed9a0d0484
Merge pull request #37179 from clayjohn/VULKAN-sky-shader
...
Implement Sky Shaders
2020-03-22 20:03:35 +01:00
clayjohn
61a74739ca
Working sky shader implementation
2020-03-21 20:43:44 -07:00
Aaron Franke
7dbe8b65ae
Make file formatting comply with POSIX and Unix standards
...
UTF-8, LF, no BOM, and newlines at the end of files
2020-03-21 17:41:03 -04:00
Yuri Roubinsky
50729e4e35
Fix incorrect shader block parsing
2020-03-20 17:24:00 +03:00
Yuri Roubinsky
a757bd7625
Allow to reassign local variables in shaders
2020-03-20 14:09:43 +03:00
Bastiaan Olij
c3fee7ba6c
Add shader based background mode
2020-03-19 18:30:39 -07:00
Yuri Roubinsky
523dae6bba
Fix shader TIME auto-completion
2020-03-19 21:42:06 +03:00
Yuri Roubinsky
ef6320d82a
Removed old TIME references from shader_types
2020-03-19 19:09:15 +03:00
Yuri Roubinsky
dbffa2e0bb
Makes shader 'TIME' available in custom functions by default
2020-03-19 17:58:39 +03:00
Yuri Roubinsky
387d6859d7
Show shader method out/inout qualifier in intellisense
2020-03-18 16:06:47 +03:00
Yuri Roubinsky
4709434227
Fix shader crash if passing const values to modf function
2020-03-18 14:07:35 +03: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
Yuri Roubinsky
7a2c6a8c0e
Enables passing out built-in parameter from parent function in shaders
2020-03-14 10:46:27 +03:00
luz.paz
7bf6e5f773
Fix various typos
...
Found via `codespell`
2020-03-11 13:59:18 -04:00
Fabio Alessandrelli
b8ddaf9c33
Refactor ScriptDebugger.
...
EngineDebugger is the new interface to access the debugger.
It tries to be as agnostic as possible on the data that various
subsystems can expose.
It allows 2 types of interactions:
- Profilers:
A subsystem can register a profiler, assigning it a unique name.
That name can be used to activate the profiler or add data to it.
The registered profiler can be composed of up to 3 functions:
- Toggle: called when the profiler is activated/deactivated.
- Add: called whenever data is added to the debugger
(via `EngineDebugger::profiler_add_frame_data`)
- Tick: called every frame (during idle), receives frame times.
- Captures: (Only relevant in remote debugger for now)
A subsystem can register a capture, assigning it a unique name.
When receiving a message, the remote debugger will check if it starts
with `[prefix]:` and call the associated capture with name `prefix`.
Port MultiplayerAPI, Servers, Scripts, Visual, Performance to the new
profiler system.
Port SceneDebugger and RemoteDebugger to the new capture system.
The LocalDebugger also uses the new profiler system for scripts
profiling.
2020-03-08 12:36:39 +01:00
Rémi Verschelde
42595085a5
Merge pull request #36752 from RandomShaper/rework_semaphore
...
Drop old semaphore implementation
2020-03-05 16:33:45 +01:00
Rémi Verschelde
e89754fa1f
Merge pull request #36021 from YeldhamDev/intersects_touch_expose
...
Turn Rect2's 'intersects_touch()' into an extra argument of 'intersects()'
2020-03-04 20:32:20 +01:00
Rémi Verschelde
a0e33e17fb
Merge pull request #36733 from qarmin/static_analyzer_fixes
...
Fixes bugs found by Sonarcloud and Coverity
2020-03-04 13:41:38 +01:00
Michael Alexsander
8c8c48a7ad
Turn Rect2's 'intersects_touch()' into an extra argument of 'intersects()'
2020-03-04 09:32:34 -03:00
Rémi Verschelde
2856740e6b
Merge pull request #36385 from kuruk-mm/some_static_asserts
...
Change when we can ERR_FAIL_COND and ERR_FAIL_CONV_V to static_assert
2020-03-04 13:18:48 +01:00
Bastiaan Olij
f0b1edef8b
Exposing get_tracker_id for ARVRPositionalTracker to GDScript
2020-03-04 10:22:26 +01:00
Mateo Dev .59
c933eb7acc
Change when we can ERR_FAIL_COND and ERR_FAIL_CONV_V to static_assert
2020-03-04 04:44:47 -03:00
Pedro J. Estébanez
9a3a2b03b8
Drop old semaphore implementation
...
- Removed platform-specific implementations.
- Now all semaphores are in-object, unless they need to be conditionally created.
- Similarly to `Mutex`, provided a dummy implementation for when `NO_THREADS` is defined.
- Similarly to `Mutex`, methods are made `const` for easy use in such contexts.
- Language bindings updated: `wait()` and `post()` are now `void`.
- Language bindings updated: `try_wait()` added.
Bonus:
- Rewritten the `#ifdef` in `mutex.h` to meet the code style.
2020-03-03 13:20:42 +01:00
Rémi Verschelde
c292aab247
Merge pull request #36691 from clayjohn/VULKAN-cubemap-roughness
...
Improve cubemap importance sampling
2020-03-02 19:32:19 +01:00
qarmin
1f209bfc41
Fixes bugs found by Sonarcloud and Coverity
2020-03-02 19:17:20 +01:00
clayjohn
a422b8c497
Properly free reflection probe atlas
2020-02-29 23:26:57 -08:00
clayjohn
6bb5117955
Improve cubemap importance sampling
2020-02-29 17:16:50 -08:00
Rémi Verschelde
93dd3d29d2
Merge pull request #36679 from clayjohn/VULKAN-mem-leak
...
Remove minimum size for shadow atlas
2020-02-29 23:32:16 +01:00
clayjohn
03d46ea804
Remove minimum size for shadow atlas
2020-02-29 10:09:15 -08:00
Yuri Roubinsky
924a9bfd16
Fix shader's step hint range for integers
2020-02-29 09:56:02 +03:00
clayjohn
74f6e3e1aa
Reduce descripter sets in cubemap filter
2020-02-28 09:07:09 -08:00
Rémi Verschelde
4f64f3401a
Merge pull request #36388 from AndreaCatania/some_renames
...
Rename Navigation{Mesh,Polygon}Instance and PlaneShape for clarity
2020-02-28 09:15:38 +01:00
clayjohn
3e299aa225
Basic fast filtering implementation
2020-02-27 22:30:34 -08:00
Rémi Verschelde
a596d76156
Merge pull request #36627 from clayjohn/VULKAN-free
...
Properly free many Vulkan resources
2020-02-28 06:39:18 +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
clayjohn
b616c728d7
Properly free many vulkan resources
2020-02-27 15:01:49 -08:00
Rémi Verschelde
3a7f1300ee
Merge pull request #36186 from Calinou/remove-vulkan-debugging-prints
...
Remove Vulkan debugging prints
2020-02-27 21:11:24 +01:00
Andrea Catania
3b64ecbc4b
Renamed NavigationMeshInstance to NavigationRegion
2020-02-27 17:42:53 +01: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
Rémi Verschelde
be4a516b77
Merge pull request #36428 from clayjohn/VULKAN-ref-probe-sky
...
Properly flip sky when rendering reflection probes
2020-02-26 18:59:50 +01:00
Rémi Verschelde
3a4c128f07
Merge pull request #36551 from AndreaCatania/navigation_destruction_flush
...
Flushes commands just before the navigation server is destroyed
2020-02-26 10:09:43 +01:00
Andrea Catania
c143b5c677
Flushes commands just before the navigation server is destroyed
2020-02-26 09:42:51 +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
clayjohn
b0ff427a2a
properly flip sky when rendering reflection probes
2020-02-21 11:42:00 -08:00
Juan Linietsky
3c0059650d
Added StringName as a variant type.
...
Also changed all relevant properties defined manually to StringName.
2020-02-21 14:25:29 +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
Andrii Doroshenko (Xrayez)
fa766265a7
Fix MIMPAMPS typos in constants throughout the engine
2020-02-20 01:31:43 +02:00
Rémi Verschelde
49fec646cb
Fix compilation warnings and re-enable werror=yes on Travis
...
Fix -Wunused-variable, -Wunused-but-set-variable and -Wswitch warnings
raised by GCC 8 and 9.
Fix -Wunused-function, -Wunused-private-field and
-Wtautological-constant-out-of-range-compare raised by Clang.
Fix MSVC 2019 warning C4804 (unsafe use of type 'bool' in comparison
operation).
GCC -Wcpp warnings/Clang -W#warnings (`#warning`) are no longer raising
errors and will thus not abort compilation with `werror=yes`.
Treat glslang headers are system headers to avoid raising warnings.
Re-enables us to build with `werror=yes` on Linux and macOS, thus
catching warnings that would be introduced by new code.
Fixes #36132 .
2020-02-18 20:51:25 +01:00
Andrea Catania
79fc7d7d6a
Added utility functions to the new NavigationServer:
...
- Vector3 get_closest_point_to_segment(const Vector3 &p_from, const Vector3 &p_to, const bool &p_use_collision = false);
- Vector3 get_closest_point(const Vector3 &p_point);
- Vector3 get_closest_point_normal(const Vector3 &p_point);
- Object *get_closest_point_owner(const Vector3 &p_point);
2020-02-18 17:12:45 +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
Marcel Admiraal
b6c9c6261d
Fix VisualServer bindings.
2020-02-17 07:07:28 +01:00
Yuri Roubinsky
a1da8560ee
Fix shader crash if duplicated struct members created
2020-02-15 22:19:45 +03:00
Haoyu Qiu
d9b5cbdffa
Fixes memory leaks in GdNavigationServer and RasterizerSceneHighEndRD
2020-02-15 14:25:32 +08:00
Marcin Zawiejski
2842c6a88c
fix oob write when calling MultiMesh::set_instance_transform
2020-02-14 17:48:48 +01:00
Rémi Verschelde
415a901b68
Merge pull request #36194 from dragmz/dragmz/exit_crash_fix
...
Fix crash when closing project manager
2020-02-14 14:31:54 +01:00
Rémi Verschelde
79d42069a9
Merge pull request #36208 from akien-mga/warnings
...
Fix various GCC compilation warnings after Vulkan merge
2020-02-14 13:49:20 +01:00
Rémi Verschelde
d2537407ef
Fix various GCC compilation warnings after Vulkan merge
...
Part of #36132 .
2020-02-14 10:02:31 +01:00
clayjohn
b878e5bbe8
Fix error flood with sky background
2020-02-13 16:31:21 -08:00
Marcin Zawiejski
17ea60bb92
fix crash when closing project manager
2020-02-13 22:03:46 +01:00
Yuri Roubinsky
41643e268e
Prevent usage 'out' modifier on opaque shader types (textures currently)
2020-02-13 21:02:47 +03:00
Hugo Locurcio
71b74195de
Remove Vulkan debugging prints
2020-02-13 18:50:07 +01:00
Yuri Roubinsky
01de6513ac
Fix bugs in shader swizzling
2020-02-13 18:11:21 +03:00
Yuri Roubinsky
ef51726ff3
Merge pull request #36176 from Chaosus/shader_fix_const_crash
...
Fix shader crash if pass const argument to 'out/inout' parameter
2020-02-13 17:00:37 +03:00
Yuri Roubinsky
516aa46fe5
Fix shader crash if pass const argument to 'out/inout' parameter
2020-02-13 16:15:08 +03:00
Rémi Verschelde
54ac8eaba6
Remove more deprecated methods and code
2020-02-13 12:37:45 +01: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
Yuri Roubinsky
4aa31a2851
Merge pull request #36141 from Chaosus/shader_struct_member_arrays
...
Added support for arrays as shader struct members
2020-02-12 20:12:05 +03:00
Yuri Roubinsky
6b99bda1e8
Added support for arrays as shader struct members
2020-02-12 17:10:20 +03:00
Rémi Verschelde
0e3d625737
doc: Sync classref with current source
...
Lots of internal API changes and some docstrings were lost in the conversion.
I manually salvaged many of them but for all the rendering-related ones, an
additional pass is needed.
Added missing enum bindings in BaseMaterial3D and VisualServer.
2020-02-12 12:37:13 +01:00
Haoyu Qiu
4c42fb0eb7
Fixes friend declaration tag mismatch
2020-02-12 17:41:30 +08:00
Yuri Roubinsky
6f162395ff
Implementation of 'struct' for shaders
2020-02-11 20:00:42 +03:00
Rémi Verschelde
db81928e08
Vulkan: Move thirdparty code out of drivers, style fixes
...
- `vk_enum_string_helper.h` is a generated file taken from the SDK
(Vulkan-ValidationLayers).
- `vk_mem_alloc.h` is a library from GPUOpen:
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
2020-02-11 14:08:44 +01:00
Yuri Roubinsky
21e3cc7bb8
[Vulkan] Fix shader crash if using multiple underscores in identifier names
2020-02-11 12:16:22 +01: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
ee1e89f8c0
Modified rendering to use cluster instead of foward
2020-02-11 12:15:27 +01:00
Juan Linietsky
f8b5c5f063
DOF fully implemented, can be edited on the fly.
2020-02-11 12:15:26 +01:00
Juan Linietsky
c05da81268
Mostly working DOF Bokeh
2020-02-11 12:15:04 +01:00
Juan Linietsky
f14defb6f9
WIP CameraEffects implementation (bokeh not working for now)
2020-02-11 12:15:03 +01:00
Juan Linietsky
bd364d1447
Auto exposure re-implemented in Vulkan
2020-02-11 12:14:23 +01:00
Juan Linietsky
b859e69919
-Refactored post processing, re-added glow and added a mix blend mode.
2020-02-11 12:14:21 +01:00
clayjohn
e530f49be2
Fix Specular Blinn in vulkan
2020-02-11 12:10:36 +01:00
Rémi Verschelde
6310354cde
Vulkan: Fix false positive in ninepatch axis stretch code
...
Adapted from e4907e50fe
,
supersedes and closes #34704 .
2020-02-11 12:09:55 +01:00
Fabian Mathews
ba6d9597cb
Fixed error condition check for multimesh instance colors
2020-02-11 12:07:03 +01:00
Rémi Verschelde
4cac20aea3
Fix crash after rebase on the master branch
...
Apparently rasterizer is not initialized yet when this is called
the first time, so it crashes.
2020-02-11 12:06:20 +01:00
Matias Pierdomenico
0e20e349f1
Changed variable name in shader because it was too generic
2020-02-11 12:06:05 +01:00
Rémi Verschelde
fff4240bb4
Fix code formatting issues and VS compilation
...
Also temporarily disable multicheck build so that we get a full build
even when there are style issues on Vulkan.
Fixes #33356 .
2020-02-11 12:05:19 +01:00
Juan Linietsky
b509c814fc
Improved Voxel AO settings.
2020-02-11 12:05:05 +01:00
Juan Linietsky
4949d578f2
Dynamic objects in GIProbes are now affected by propagation parameter.
2020-02-11 12:05:05 +01:00
Juan Linietsky
d6e4b45994
More correctly divide alpha by 8 for mipmaps, fixes voxel overocclusion.
2020-02-11 12:05:04 +01:00
Juan Linietsky
8deb977551
Changed SDF processing to smooth out shadows.
2020-02-11 12:05:03 +01:00
Juan Linietsky
da0457fa29
Several fixes to GIProbes
2020-02-11 12:04:56 +01:00
Juan Linietsky
971ce680f2
Fixes to how anisotropy is handled, makes it work on nvidia.
2020-02-11 12:04:56 +01:00
Juan Linietsky
f4948721e4
Fixed uninitialized memory bug in voxelizer
2020-02-11 12:04:54 +01:00
Juan Linietsky
2af701fa03
Use a different strategy to get textures from GPU (via buffers), for more compatibility.
2020-02-11 12:04:54 +01:00
Juan Linietsky
2c67cc654f
AO support for GIProbe (right on time for Godot Sprint!)
2020-02-11 12:03:55 +01:00
Juan Linietsky
76c6f39d99
GIProbe now generates a distance field on bake using CPU, for better compatibility
2020-02-11 12:03:54 +01:00
Juan Linietsky
561b431d85
Dynamic object support for GI Probes (a bit buggy still)
2020-02-11 12:03:52 +01:00
Juan Linietsky
6ee2f5e6b6
More GIProbe work and fixes
2020-02-11 12:03:49 +01:00
bruvzg
26318f3bd1
Fix Vector3 ambiguities and out of bounds init.
2020-02-11 12:03:39 +01:00
Juan Linietsky
fb739f9da7
Fixed display menu visualizations.
2020-02-11 12:03:24 +01:00
Juan Linietsky
965185c765
Better GIProbe quality settings.
2020-02-11 12:03:23 +01:00
Juan Linietsky
fa548b052e
Missing proper comparison for depth pre-pass.
2020-02-11 12:03:21 +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
263bebe023
Untested support for compute shaders
2020-02-11 12:02:34 +01:00
Juan Linietsky
b08f13d558
Skeletons are now working.
2020-02-11 12:02:17 +01:00
Rémi Verschelde
e3b76fd040
Merge pull request #32281 from Chaosus/vk_shader_array_varying2
...
[Vulkan] Implement shader array support for varyings
2020-02-11 12:02:06 +01:00
Yuri Roubinsky
bfa834a78a
[Vulkan] Implement shader array support for varyings
...
Remake of #32175
2020-02-11 12:02:02 +01:00
Rémi Verschelde
d08bf966eb
Merge pull request #32280 from Chaosus/vk_shader_switch2
...
[Vulkan] Implements switch flow control operator in shaders
2020-02-11 12:01:59 +01:00
Yuri Roubinsky
d51b7aafb5
[Vulkan] Implements switch flow control operator in shaders
2020-02-11 12:01:49 +01:00
Juan Linietsky
bc3dbe8240
Properly working instancing, and compatibility fixing for old meshes
2020-02-11 12:01:33 +01:00
Juan Linietsky
123ee5995c
Visual GPU profiler and related profiling support in Vulkan.
2020-02-11 12:01:26 +01:00
Juan Linietsky
dc32083681
Proper texture reloading (was broken).
2020-02-11 12:01:25 +01:00
Juan Linietsky
dd3682e5fe
Modernized default 3D material, fixes material bugs.
2020-02-11 12:01:24 +01:00
Juan Linietsky
6deffa62fb
Several fixes to 3D rendering, and multimesh implementation.
2020-02-11 12:01:22 +01:00
Juan Linietsky
9d7b7f931b
Reflection probes working
2020-02-11 12:01:21 +01:00
Juan Linietsky
69e83e4815
Directional light cleanup.
2020-02-11 12:01:21 +01:00
Juan Linietsky
88a7debbbc
Directional lights and shadow mapping are functional.
2020-02-11 12:01:20 +01:00
Juan Linietsky
920db604d2
Rewrote large part of rendering, omni and spot shadows now work.
2020-02-11 12:01:18 +01:00
Juan Linietsky
1d871f6226
Tonemapping ported (not all parameters supported yet, only enough to get correct color)
2020-02-11 12:01:09 +01:00
Juan Linietsky
2d6a916835
Environment sky more or less working.
2020-02-11 12:01:05 +01:00
Rémi Verschelde
f7aa7927e7
Merge pull request #31527 from Chaosus/vk_shader_array_support2
...
[Vulkan] Implemented local shader arrays
2020-02-11 12:00:53 +01:00
Yuri Roubinski
ef50752292
[Vulkan] Implemented local shader arrays
2020-02-11 12:00:46 +01:00
Rémi Verschelde
86d0d88b42
Merge pull request #31526 from Chaosus/shader_bug_vk2
...
[Vulkan] Fix ternary operator shader compiler expression
2020-02-11 12:00:16 +01:00
Yuri Roubinski
47c0ef3308
[Vulkan] Fix ternary operator shader compiler expression
2020-02-11 12:00:10 +01:00
Yuri Roubinski
95e8375efb
[Vulkan] Implemented do/while loops for shaders
2020-02-11 11:59:51 +01:00
Juan Linietsky
8cee7703a6
Yay very basic 3D (only white) finally shows.
2020-02-11 11:59:27 +01:00
Juan Linietsky
449df8f688
Base 3D engine done, still untested, though.
2020-02-11 11:59:25 +01:00
Juan Linietsky
dc3b47f3ab
Vulkan/RD rasterizer now does clean exit.
2020-02-11 11:58:16 +01:00
Juan Linietsky
b52a2f3dfa
Fix comment
2020-02-11 11:58:11 +01:00
Rémi Verschelde
6289e7d147
Merge pull request #29993 from bruvzg/vulkan
...
Initial Vulkan support for macOS (MoltenVK) and Windows
2020-02-11 11:57:40 +01:00
bruvzg
b456bfad5c
Add runtime GLES2 / Vulkan context selection.
2020-02-11 11:57:34 +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
6ecedd1e6c
Add a system to properly update materials if the uniform set is gone (likely deleted texture)
2020-02-11 11:53:29 +01:00
Juan Linietsky
4fe3ee1730
Moved the shader source compilation code outside RenderingDevice and Vulkan
2020-02-11 11:53:29 +01:00
Juan Linietsky
c613ead5fa
Added a spinlock template as well as a thread work pool class.
...
Also, optimized shader compilation to happen on threads.
2020-02-11 11:53:29 +01:00
Juan Linietsky
60c7498cee
Replaced GLSLang reflection by SPIRV-Reflect, eventually allowing to move GLSLang out.
2020-02-11 11:53:29 +01:00
Juan Linietsky
0586e18449
Custom material support seems complete.
2020-02-11 11:53:29 +01:00
Juan Linietsky
8bbbb97336
Completed material/2D shader support (missing SCREEN_TEXTURE)
2020-02-11 11:53:29 +01:00
Juan Linietsky
50e9befb88
Changes to material required to add custom shaders in RD renderer
2020-02-11 11:53:28 +01:00
Juan Linietsky
ef083a583b
Modified light rendering to make it more compatible.
...
Modified polygon management to make it more compatible with MoltenVK
2020-02-11 11:53:28 +01:00
Juan Linietsky
a3f8ffac63
Use a special sampler for 2D shadows, so they are softer
2020-02-11 11:53:28 +01:00
Juan Linietsky
f04359e70f
2D lighting seems more or less complete.
2020-02-11 11:53:28 +01:00
Juan Linietsky
a7b2ac7bb1
Normalmapping and Specularmapping working in 2D engine
...
Added support for Sprite, AnimatedSprite and Polygon2D (should add for tileset eventually).
2020-02-11 11:53:28 +01:00
Juan Linietsky
92b27bccf1
Changed allocation strategy of CanvasItem draw commands.
...
They should now allocate memory in blocks and reuse the same
memory every time the item is cleared and redrawn.
This should improve performance considerably.
2020-02-11 11:53:28 +01:00
Juan Linietsky
24b16f3bf0
Fix crash on import.
2020-02-11 11:53:28 +01:00
Juan Linietsky
e3905f9af3
Added ability to retrieve back textures stored on GPU
2020-02-11 11:53:28 +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
1b4281b895
basic 2D engine is more or less working with Vulkan, including editor.
...
Still a lot to do
2020-02-11 11:53:27 +01:00
Juan Linietsky
42b44f43ee
Basic 2D engine is more or less working, needs more work for editor to be usable.
2020-02-11 11:53:27 +01:00
Juan Linietsky
9b0dd4f571
A lot of progress with canvas rendering, still far from working.
2020-02-11 11:53:27 +01:00
Juan Linietsky
836c2109a0
Changed my mind on Vulkan image API, images should now include mipmaps
...
This should make it easier to obtain the data directly from an Image
2020-02-11 11:53:27 +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
Juan Linietsky
9ffe57a10e
Modify RenderingDevice to use RIDs, now that they are O(1)
2020-02-11 11:53:26 +01:00
Juan Linietsky
4f163972bb
Refactored RID/RID_Owner to always use O(1) allocation.
...
* Implements a growing chunked allocator
* Removed redudant methods get and getptr, only getornull is supported now.
2020-02-11 11:53:26 +01:00
Juan Linietsky
1522d8c3ee
Added support for push constants
2020-02-11 11:53:26 +01:00
Juan Linietsky
fd188ddd51
Initial work on Vulkan:
...
-Added VulkanContext
-Added an X11 implementation
-Added a rendering device abstraction
-added a Vulkan rendering device abstraction
-Engine does not work, only shows Godot logo (run it from bin/)
2020-02-11 11:53:26 +01:00
Duroxxigar
383c583a0b
Documented the new NavigationServer and all its associated nodes (2D and 3D)
2020-02-10 15:24:06 +01: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
Rémi Verschelde
6203c38fd1
Merge pull request #35993 from akien-mga/who-let-the-latency-out
...
Workaround WebM playback bug after AudioServer latency fixes
2020-02-08 15:36:50 +01:00
Rémi Verschelde
3a5f45a6d1
Merge pull request #35682 from nathanwfranke/canvas-cull-control-fix
...
Fix bug where canvas culls things at origin with size 0
2020-02-08 14:14:10 +01:00
nathanwfranke
e5cb557b73
Fix bug where Control at origin with 0 size not rendered
...
Make a new method instead to make the code more elegant
Move Function down a bit
2020-02-07 14:43:27 -06:00
Rémi Verschelde
da411d1625
Workaround WebM playback bug after AudioServer latency fixes
...
af9bb0ea15
fixed AudioServer's
`get_output_delay()` (which used to always return 0) while renaming it
to `get_output_latency()`. It now returns the latency from the
AudioDriver, which can be non-0.
While this was a clear bugfix, it broke playback for WebM files without
audio track. It seems like the playback code, even though it queried
the output delay to calculate a time compensation, was designed to work
even though the delay value was actually bogus. Now that it's correct,
it's not working.
As a workaround we comment out uses of the output latency, restoring
the behavior of Godot 3.1.
This code should still be reviewed by someone more versed in video
playback and fixed to properly account for the non-0 driver latency.
Fixes #35760 .
2020-02-07 21:01:05 +01:00
Rémi Verschelde
cdce912de7
Merge pull request #35986 from Chaosus/shader_index
...
Allow non-constants for indexing builtin types in shaders
2020-02-07 20:45:57 +01:00
Rémi Verschelde
a4b8dbdc0b
Merge pull request #35142 from clayjohn/GLES2-add-3d-textures
...
Add support for 3D textures to GLES2
2020-02-07 18:36:24 +01:00
Yuri Roubinsky
8469a383ec
Allow non-constants for indexing builtin types in shaders
2020-02-07 18:41:26 +03:00
Yuri Roubinsky
3a70566b15
Prevent shader crash if invalid builtin used after array member accessor
2020-02-07 15:21:15 +03: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
Yuri Roubinsky
2c4367441c
Prevent shader crash when name conflict with "dus" and "__" occured
2020-02-01 12:38:52 +03:00
clayjohn
68915ce20d
Add support for 3D textures to GLES2
2020-01-31 10:01:05 -08:00
Rémi Verschelde
bb6c0d3e8b
doc: Complete documentation for VideoStreams
...
Also quick clean up of the matching C++ files.
2020-01-26 11:29:07 +01:00
clayjohn
eb5cb5d016
Add project setting for max irradiance size
2020-01-25 13:27:13 -08:00
Yuri Roubinsky
3473a195fc
Hides high-level functions from GLES2 shader autocompletion
2020-01-23 12:41:21 +03:00
Rémi Verschelde
46820527de
Merge pull request #35360 from Chaosus/restrict_uint_gles2
...
Disallow uint/uvec usage on GLES2 platform
2020-01-23 10:12:30 +01:00
Rémi Verschelde
37897dba80
Merge pull request #35406 from lawnjelly/ortho-shadow
...
Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
2020-01-22 22:02:09 +01:00
lawnjelly
eaf8e5ce52
Change CameraMatrix::get_viewport_size to get_viewport_half_extents
...
Fixes #26637 .
Fixes #19900 .
The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2.
Code which called this function has also been modified accordingly.
This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width.
It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22 18:22:00 +00:00
Rémi Verschelde
4faaf6089a
Remove unused #if 0'ed code
2020-01-21 21:41:54 +01:00
Yuri Roubinsky
4c456ef979
Disallow uint/uvec usage on GLES2 platform
2020-01-20 18:59:35 +03:00
Rémi Verschelde
837adb30fd
Revert "Exposes capture methods to AudioServer + documentation" #30468
...
Reverts the following commits:
- c81ec6f26d40b70283958a4ef3e216fb32cbaf14:
"Exposes capture methods to AudioServer, variable renames for
consistency, added documentation."
- 47c558b98abf842910c780294314326662410cdf:
"Expose audio callbacks as signals."
- dabaa11b3c451e9b8f2cca7e563bd9ec51edb169:
"Fix to make sure the capture buffers are deallocated at shutdown.
Silences warnings."
Some documentation improvements were kept for pre-existing methods.
See rationale for reverting these changes in #30468 .
2020-01-20 13:18:01 +01:00
Yuri Roubinsky
3dea1c725e
Clears completion_class in shaders (may cause troubles if not).
2020-01-19 16:35:54 +03:00
Yuri Roubinsky
1eb8d5e142
Added missing form of array constructor in shaders
2020-01-18 11:41:55 +03:00
Rémi Verschelde
669cd46495
Merge pull request #35215 from clayjohn/multimesh-error
...
Add multimesh format max for proper error checking
2020-01-16 23:06:20 +01:00
Rémi Verschelde
6fd4afa96b
Merge pull request #33615 from raphael10241024/fix_shape_change
...
refresh area2d collision when shape changes
2020-01-16 22:56:16 +01:00
clayjohn
041fa57a88
Add multimesh format max for proper error checking
2020-01-16 13:31:17 -08:00
Yuri Roubinsky
5098232ee6
Disabled array initialization, const array and arr.length in shaders
2020-01-16 11:46:11 +03:00
clayjohn
3579187f90
Make texture_debug_usage thread safe
2020-01-12 15:22:54 -08:00
Yuri Roubinsky
1e154e0947
Fix nested break/return in shader switch statement
2020-01-10 11:57:56 +03:00
Rémi Verschelde
5edd1a27d2
Merge pull request #34671 from Chaosus/shader_hex_support
...
Support for hex numbers in shaders
2020-01-08 10:01:49 +01:00
Hugo Locurcio
0cad2c0cd1
Add VisualServer methods to get the video adapter name and vendor
...
These methods can be used in scripts to retrieve the OpenGL
`GL_RENDERER` and `GL_VENDOR` strings (respectively).
This closes #28404 .
2020-01-06 00:37:56 +01:00
Rémi Verschelde
fa82664419
Merge pull request #34726 from nekomatata/polygon2d-antialiasing-fix
...
Fixed antialiasing option for Polygon2D with concave/hollow shapes
2020-01-03 14:17:05 +01:00
PouleyKetchoupp
1591677eb8
Fixed antialiasing option for Polygon2D
...
Some cases were not handled properly for Polygon2D after making changes in common code to fix Line2D antialiasing. Added an option for drawing polygons to differentiate the two use cases.
Fixes #34568
2020-01-01 11:40:14 +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
Yuri Roubinsky
99b92c885f
Support for hex numbers in shaders
2019-12-29 12:19:10 +03:00
Catchawink
86096313be
Fixed an issue with recording audio.
...
Prior to this fix, AudioEffectRecordInstance::init() was called before recording_active is set to true in AudioEffectRecord::set_recording_active(). This was setting is_recording to false in AudioEffectRecordInstance, because is_recording updates to the value of recording_active in AudioEffectRecordInstance::_io_thread_process(). To fix this issue, AudioEffectRecordInstance::init() is now called after recording_active is set to true.
2019-12-12 10:28:46 -05: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
Rémi Verschelde
4eff13d768
doc: Markup fixes for enums and constants
2019-12-06 23:09:20 +01:00
Rémi Verschelde
99b81aa1b9
Merge pull request #34039 from Eoin-ONeill-Yokai/multimeshfix
...
Added Missing Binding for `multimesh_create` to VisualServer
2019-12-05 06:49:43 +01:00
Eoin O'Neill
f7f7544997
Added method binding for `multimesh_create` that was missing from VisualServer class.
2019-12-04 16:00:18 -08:00
Rémi Verschelde
e77c34ab4a
Merge pull request #34061 from Chaosus/fix_shader_const
...
Fix expressions for global constants in shaders
2019-12-03 08:53:55 +01:00
Rémi Verschelde
10bae7c05b
Merge pull request #33857 from nekomatata/polygon-2d-antialiasing
...
Fixed antialiased option for Polygon2D
2019-12-03 07:51:16 +01:00
Yuri Roubinsky
8b8faf03d5
Fix expressions for global constants in shaders
2019-12-02 19:00:21 +03:00
bruvzg
2ef8c5fac5
iOS modular build and export implementation.
2019-12-01 21:57:18 +02:00
PouleyKetchoupp
e6ebc43d72
Fixed antialiased option for Polygon2D / Line2D
...
Polygon2D:
The property wasn't used anymore after switching from canvas_item_add_polygon() to canvas_item_add_triangle_array() for drawing.
Line2D:
Added the same property as for Polygon2D & fixed smooth line drawing to use indices correctly.
Fixes #26823
2019-11-28 22:57:27 +01:00
Bojidar Marinov
2952dc3fe2
Fix crash when disabling a YSort node
...
Fixes #33932
2019-11-27 10:47:11 +02:00
Marcel Admiraal
6c3be2ca74
Fix Visual Studio throwing C4146 warning.
2019-11-18 15:14:04 +00:00
RaphaelHunter
8330e70e2c
refresh area2d collision when shape changes, close #33369
2019-11-14 15:48:41 +08:00
Rémi Verschelde
4b8feff594
Merge pull request #33518 from BastiaanOlij/msaa_ext_modes
...
Add MSAA mode for Quest
2019-11-11 11:46:50 +01:00
Bastiaan Olij
4e2343160c
Add special external MSAA modes for GLES2 Rift S/Quest and OpenXR optimisation
2019-11-11 21:02:06 +11:00
Rémi Verschelde
2143f46df2
Merge pull request #33516 from qarmin/small_fixes
...
Memory leaks and crash fixes
2019-11-10 10:17:19 +01:00
Rafał Mikrut
7dda9309f9
Memory leak and crash fixes
2019-11-10 09:49:13 +01:00
PouleyKetchoupp
530665197f
Fixed Particles restart after visibility has been set to off and on again
...
Make sure particles are processed during the same frame when visibility is set to on, in case they are still active from before and need to be restarted.
Fixed #33476
2019-11-09 09:51:17 +01:00
Rémi Verschelde
621dc7022f
Merge pull request #27742 from rxlecky/camera-replication
...
Game camera override
2019-11-08 10:02:18 +01:00
Marcel Admiraal
fea58321e6
Fix 'r1' (and r2) may be used uninitialized warning in eq.cpp.
2019-11-08 08:37:06 +01:00
Rémi Verschelde
341f37aaed
Merge pull request #33153 from raphael10241024/fix_occluder
...
fix occluders positions error under canvas_layer
2019-11-05 14:41:28 +01:00
Yuri Roubinsky
5e44b5be81
Prevents usage of unsupported texture shader types in GLES2
2019-11-03 13:41:15 +03:00
Rémi Verschelde
d89f24b6c9
Merge pull request #33259 from Chaosus/remove_gles2_switch_op
...
Removed switch operator from GLES2 shader back-end
2019-11-02 19:28:18 +01:00
Yuri Roubinsky
6b7f8558d9
Removed switch operator from GLES2 shader back-end
2019-11-02 12:43:32 +03:00
Rémi Verschelde
af4fd9de9c
Merge pull request #33238 from qarmin/other_fixes
...
Fix some crashes, overflows and using variables without values
2019-11-01 22:12:47 +01:00
Rafał Mikrut
9ddb3265e1
Fix some crashes, overflows and using variables without values
2019-11-01 16:16:31 +01:00
Yuri Roubinsky
1b003f3d64
Prevents shader crash on GLES2 if unsupported built-in has been used
2019-10-31 09:21:44 +03:00
Yuri Roubinsky
76eb486413
Added check if field name in the shader is equal to builtin
2019-10-29 15:37:19 +03:00
RaphaelHunter
c4cea10402
fix occluders positions error under canvas_layer, close #32880
2019-10-29 14:51:58 +08:00
Yuri Roubinsky
ef6161532d
Fix shader crash if non-boolean expression inserted into "if"
2019-10-28 08:35:33 +03:00
Hugo Locurcio
701581d1d3
Improve error messages related to `shader_type`
...
The list of allowed shader types is now displayed if any
`shader_type`-related error is emitted.
This makes it easier to remember which shader types are allowed
when creating a new shader.
2019-10-26 17:43:14 +02:00
Rémi Verschelde
5cdecb8227
Merge pull request #32845 from madmiraal/rigidbody-mode-change
...
Activate Body(2D)SW when switching to rigid or character mode.
2019-10-25 23:36:17 +02:00
Rafał Mikrut
d468e28874
Fix leak in Physics2DServerSW
2019-10-24 20:12:46 +02:00
Erik
8b0546d93b
Implement game camera override
...
Implemented uniform API in Viewport class to override 2D and/or
3D camera.
Added buttons in 2D and 3D editor viewport toolbars that override
the running game camera transform with the editor viewport camera
transform. Implemented via remote debugger protocol and camera
override API.
Removed LiveEditFuncs function pointers from ScriptDebugger class.
Since the debugger got access to the SceneTree instance (if one
exists), there is no need to store the function pointers. The live
edit functions in SceneTree are used directly instead. Also removed
the static version of live edit functions in SceneTree for the same
reason. This reduced the SceneTree -> Debugger coupling too since
the function pointers don't need to be set from SceneTree anymore.
Moved script_debugger_remote.h/cpp from 'core/' to 'scene/debugger/'.
This is because the remote debugger is now using SceneTree directly
and 'core/' classes should not depend on 'scene/' classes.
2019-10-23 02:51:32 +01:00
Marcel Admiraal
13798746e7
Activate Body(2D)SW when switching to rigid or character mode.
2019-10-15 07:41:13 +02:00
Rémi Verschelde
d0628180ae
Merge pull request #32799 from clayjohn/free_pools
...
Properly free sky and lightmap caches in multithreaded server
2019-10-13 19:44:04 +02:00
clayjohn
62fb462165
Properly free sky and lightmap caches in multithreaded server
2019-10-13 09:31:00 -07:00
Rémi Verschelde
5d63cf1610
Merge pull request #32767 from madmiraal/body2d-can_sleep-default
...
Fix mismatch between RigidBody2D and Body2DSW can_sleep defaults.
2019-10-12 14:06:46 +02:00
Marcel Admiraal
42a9ae7a82
Fix mismatch between RigidBody(2D) and Body(2D)SW can_sleep defaults.
...
- Set Body2DSW can_sleep default to true.
- Set Body2D can_sleep default to true.
2019-10-12 12:11:11 +02:00
Saracen
dabaa11b3c
Fix to make sure the capture buffers are deallocated at shutdown. Silences warnings.
2019-10-11 23:40:43 +01:00
Yuri Roubinsky
ada4bcbe30
Fix invalid autocompletion pasting of shader param name
2019-10-08 18:33:22 +03:00
Rémi Verschelde
45577e4233
Merge pull request #32571 from DavidSichma/rect_flip
...
Correctly flip texture src region
2019-10-08 16:15:45 +02:00
Yuri Roubinsky
76324bec8d
Prevent shader crash if name of variable overrides function name
2019-10-06 20:35:41 +03:00
Yuri Roubinsky
d9087e1b44
Prevent shader crash if function call been used on constant
2019-10-06 18:20:05 +03:00
Yuri Roubinsky
5a5a062d61
Fix few redefinition name errors for variable/param/function in shaders
2019-10-06 17:27:28 +03:00
David Sichma
f73e1fae37
Correctly flip texture src region
2019-10-05 16:51:06 +02:00
Yuri Roubinsky
1472fca951
Removed unnecessary shader error log messages
2019-10-02 12:37:22 +03: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
Rémi Verschelde
4f294b958f
doc: Sync classref with current source
...
Fix a few missing bindings or unspecified argument names and default values.
2019-09-24 11:52:06 +02:00
Rémi Verschelde
159470df08
Merge pull request #32275 from godotengine/skin_support
...
Added skin support and simplified APIs to override bone position + glTF 2.0 import fixes
2019-09-23 15:02:15 +02:00
qarmin
50be65bf43
Changed some code found by Clang Tidy and Coverity
2019-09-22 18:45:08 +02:00
Rémi Verschelde
fdc2463a1b
Merge pull request #32150 from luzpaz/typos
...
Fix misc. source comment typos
2019-09-20 17:09:05 +02:00
luz.paz
91ecd7b6a6
Fix misc. source comment typos
...
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-19 14:36:52 -04:00
Rémi Verschelde
28265fb526
Merge pull request #31202 from azagaya/light-data
...
Create shadow_vec for altering shadow computation
2019-09-19 20:03:04 +02:00
Juan Linietsky
d81ddaf33e
Added skin support and simplified APIs to override bone position.
2019-09-18 19:46:32 -03:00
Chaosus
1333ea2a2d
Implement shader array support for varyings
2019-09-14 18:23:25 +03:00
azagaya
b835868067
Create shadow_vec for altering shadow computation
...
In 2.1 and 3.0, light_vec could be modified for altering shadow_computations.
But it broke shadows when rotating light. shadow_vec would do the same, but without breaking
shadows in rotated lights if not used.
Add inverse light transformation to shadow vec, so it's not affected when rotating lights;
Added usage define for shadow vec.
For shadow vec working properly when rotating a light, it's needed to multiply it by light_matrix normalized. Added usage define in order to don't do that if shadow_vec not used.
2019-09-06 13:55:49 -03:00
Yuri Roubinsky
96ea1e6fb0
Merge pull request #31600 from Chaosus/shader_func_return_fix
...
Fix shader crash when users miss the return statement
2019-08-28 16:39:33 +03:00
Yuri Roubinski
38601dd3e9
Fix shader crash when users miss the return statement
2019-08-28 11:32:33 +03:00
follower
8499033354
Typo fix: "differt" -> "different"
2019-08-28 19:12:54 +12:00
Rémi Verschelde
f2777c04c3
Merge pull request #31596 from Chaosus/shader_switch
...
Implements switch flow control operator in shaders
2019-08-24 14:47:44 +02:00
Andrii Doroshenko (Xrayez)
718f09ad20
Fix uninitialized inertia value in Body2DSW
2019-08-23 20:13:57 +03:00
Yuri Roubinski
4dda253ee0
Implements switch to shaders
2019-08-23 14:43:09 +03:00
RaphaelHunter
74713fe970
Fix custom inertia in physics2d, closes#30838
2019-08-22 20:30:03 +08:00
Rémi Verschelde
6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
...
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Yuri Roubinski
a525e3c5ce
Implemented do/while loops for shaders
2019-08-13 18:39:55 +03:00
Yuri Roubinski
24417f1975
Force user to initialize local shader constants
2019-08-13 12:31:25 +03:00
IAmActuallyCthulhu
82b9557803
Remove redundant author doc comments
2019-08-12 04:26:38 -05:00
Saracen
d8ba9f1824
Fix recording bus regression.
2019-08-12 08:10:56 +01:00
Cameron Reikes
9f7a166c35
Show that identifier found in function names
2019-08-09 21:15:33 -07:00
Michael Alexsander Silva Dias
5ca7460421
Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "main" and "servers" directories
2019-08-09 11:27:39 -03:00
Rémi Verschelde
7b514d920d
Merge pull request #31099 from Chaosus/shader_local_const
...
Implemented local shader constants
2019-08-07 15:14:35 +02:00
Rémi Verschelde
ba541bceca
Merge pull request #31077 from qarmin/coverity_bugs
...
Change some code proposed by Coverity and Cppcheck
2019-08-07 13:49:33 +02:00
Rémi Verschelde
af935af38d
Merge pull request #30468 from SaracenOne/expose_audio_capture
...
Exposes capture methods to AudioServer + documentation
2019-08-07 13:27:25 +02:00
qarmin
e0b5b21863
Add some code changes/fixes proposed by Coverity and Clang Tidy
2019-08-07 12:54:30 +02:00
Yuri Roubinski
b24b3497d6
Implemented local shader constants
2019-08-05 10:35:53 +03:00
Rémi Verschelde
507e41e698
Merge pull request #30999 from nekomatata/fix-regression-godot-physics
...
Fixed regression in Godot Physics
2019-07-31 19:47:33 +02:00
PouleyKetchoupp
53ac260d19
Reverted fix that makes sense for collision_solver_2d_sat but not for the 3d version
...
(original commit: aab8da25ad
)
Fixes #30886
2019-07-31 17:36:09 +02:00
IAmActuallyCthulhu
4e617d2ca2
Correct typo and format of comments
2019-07-30 16:43:07 -05:00
santouits
472cda9047
Remove physics thread getting the gl context
2019-07-27 22:08:10 +03:00
Michael Alexsander Silva Dias
12ae7a4c02
Update some dead links in the codebase
2019-07-23 21:06:12 -03:00
Rémi Verschelde
4c943cca2c
Merge pull request #30716 from qarmin/fixed_static_analiser_code
...
Fix some code found by Coverity Scan and PVS Studio
2019-07-23 15:08:44 +02:00
qarmin
aab8da25ad
Fix some code found by Coverity Scan and PVS Studio
2019-07-23 09:14:31 +02:00
Rémi Verschelde
fec28da0ad
Merge pull request #30349 from qarmin/fix_arvr_crash_at_exit
...
Fix ARVRServer crash at exit
2019-07-20 12:41:56 +02:00
Rémi Verschelde
d15cf7b672
Merge pull request #30576 from qarmin/lgtm_coverage
...
Changed some code reported by LGTM and Coverity
2019-07-20 12:00:13 +02:00
qarmin
6cbaf7662f
Changed some code showed in LGTM and Coverage
2019-07-20 08:09:57 +02:00
Rémi Verschelde
df62bfdd49
Merge pull request #30548 from Calinou/tweak-audio-cutoff-property-hints
...
Tweak audio cutoff property hints to allow reasonable values only
2019-07-16 08:54:25 +02:00
Chaosus
cfcc9ee9c1
Allows to use non-constants in the local shader array initializer
2019-07-16 08:04:49 +03:00
Chaosus
9379cbc774
Added local array initializer
2019-07-16 07:13:37 +03:00
Saracen
47c558b98a
Expose audio callbacks as signals.
2019-07-16 04:10:26 +01:00
Saracen
c81ec6f26d
Exposes capture methods to AudioServer, variable renames for consistency,
...
added documentation.
2019-07-15 15:12:29 +01:00
Chaosus
c37379456f
Implemented local shader arrays
2019-07-15 15:57:39 +03:00
Chaosus
e7f5640632
Added missed "textureProjLod" shader built-in overload for 3D textures
2019-07-15 09:59:11 +03:00
Hugo Locurcio
9387114ce1
Tweak audio cutoff property hints to allow reasonable values only
...
This also makes all cutoff property hints consistent.
This closes #29588 .
2019-07-12 22:44:17 +02:00
hbina085
26c0609656
Make the default return value on crash explicit
...
Noticed that the error condition will return a NULL instead of something more explicit like "false".
Should make the code more readable at a glance.
2019-07-11 23:06:58 -04:00
Chaosus
a2b2da2454
Removed invalid mix shader overloads
2019-07-11 17:16:26 +03:00
Rémi Verschelde
34d7484039
Merge pull request #30455 from qarmin/const_reference
...
Pass by reference to const
2019-07-10 15:43:15 +02:00
qarmin
01cc7a996b
Use reference to constant in functions
2019-07-10 11:54:12 +02:00
Chaosus
4083d0c784
Fix "not" shader function return type
2019-07-09 15:55:00 +03:00
Rémi Verschelde
af80182016
Merge pull request #30407 from qarmin/small_fixess
...
Fixes minor issues found by static analyzer
2019-07-08 08:16:50 +02:00
qarmin
9a77d748c0
Fixes minor issues found by static analyzer
2019-07-07 23:08:51 +02:00
Ibrahn Sahir
4e4697b1c4
Added release function to PoolVector::Access.
...
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
2019-07-06 12:04:27 +01:00
geequlim
253cd73f1d
Fix code completion for shader editor
2019-07-06 12:03:17 +08:00
qarmin
a4ae7131c3
Fix ARVRServer crash at exit
2019-07-05 21:14:43 +02:00
Rémi Verschelde
916c5c1e4b
Merge pull request #30318 from bojidar-bg/28501-ysort-modulate
...
Ensure that nested YSort preserves intermediate modulate values
2019-07-05 09:41:11 +02:00
Bojidar Marinov
c3495ef652
Ensure that nested YSort preserves intermediate modulate values
...
Fixes #28501
2019-07-04 17:57:47 +03:00
Bojidar Marinov
f7dad789e9
Fix various memory leaks and errors
2019-07-02 17:23:54 +03:00
Rémi Verschelde
d40dbd6d11
Merge pull request #29951 from raphael10241024/add_physics_2d_optimize
...
add 2d physic optimization similar to 3d physics
2019-07-01 17:08:05 +02:00
Rémi Verschelde
6b30f284a0
Merge pull request #29980 from Dentrax/directed-by-qarmin
...
Fix some editor crashes
2019-07-01 14:59:29 +02:00
Rémi Verschelde
380bf04566
Merge pull request #29413 from YeldhamDev/global_rate_scale
...
Add 'global_rate_scale' to the AudioServer
2019-07-01 13:53:04 +02:00
Furkan Türkal
7d8d337b2c
fix some crashes
2019-07-01 14:28:29 +03:00
Rémi Verschelde
538c8eec15
Merge pull request #30117 from santouits/mt-pools
...
Free server id pools directly on closing
2019-06-27 15:15:15 +02:00
santouits
7aa4622222
Free server id pools directly.
...
When closing the game, we flush the command queue but after we are pushing the freeing calls of the id pool to the
command queue and they are never being run. Now we free them directly.
2019-06-27 03:25:36 +03:00
qarmin
4e5310cc60
Some code changed with Clang-Tidy
2019-06-26 15:08:25 +02:00
yakun.zhang
434fd71d2a
add 2d physic optimization simlilar to 3d physics
2019-06-21 19:33:01 +08:00
Rémi Verschelde
5c66771e3e
Merge pull request #29283 from qarmin/fix_some_always_same_values
...
Remove always true/false values
2019-06-20 21:10:10 +02:00
qarmin
072e40368e
Fix always true/false values
2019-06-20 16:59:48 +02:00
Rémi Verschelde
cf76b713cb
Merge pull request #24487 from Meirinha/master
...
Added UV and UV2 to shader function light() built-in, fixes issue #24120
2019-06-20 12:46:54 +02:00
Rémi Verschelde
5a29be31b3
Merge pull request #27188 from samH-FIT/MacroUpdate
...
Made use of semicolons after GDCLASS more consistent, added semicolons where I found them missing.
2019-06-19 22:59:49 +02:00
Rémi Verschelde
922a4f5413
Merge pull request #29901 from BastiaanOlij/fix_cameraserver_const
...
Made constants fully upper case in camera server
2019-06-19 20:20:47 +02:00
Michael Alexsander Silva Dias
1c2ba35074
Add 'global_rate_scale' to the AudioServer
...
Closes #28953 .
2019-06-19 11:36:46 -03:00
JohnJLight
38d3bfe971
Made use of semicolons more consitent, fixed formatting
2019-06-19 15:24:31 +02:00
Rémi Verschelde
30cbe28677
Merge pull request #27310 from KoBeWi/angular_dank
...
Make angular_damp of new Area nodes match the global default
2019-06-19 15:00:44 +02:00
Bastiaan Olij
4ebedb5f11
Made constants fully upper case in camera server
2019-06-19 22:24:54 +10:00
Rémi Verschelde
0eb8484c8a
Merge pull request #29037 from mdahlgrengadd/master
...
Make FFT size and oversampling adjustable in smbPitchShifter, add windowing to smbFFT
2019-06-19 12:31:09 +02:00
Rémi Verschelde
24ee8c3566
Add script to fix style issues and copyright headers
...
This is only meant to check the validity of the whole codebase every
now and then, or to apply clang-format config changes when relevant.
2019-06-17 13:35:47 +02:00
Rémi Verschelde
6ba1b4e371
Merge pull request #29764 from Calinou/boot-splash-no-filter-option
...
Add an option to disable boot splash filtering
2019-06-16 10:39:53 +02:00
Hugo Locurcio
786a7341a7
Add an option to disable boot splash filtering
...
Disabling filtering is usually desired in projects using a pixel art style.
This closes #19415 .
2019-06-15 23:53:39 +02:00
BastiaanOlij
02ea99129e
Adding a new Camera Server implementation to Godot.
...
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server.
Other parts of Godot can interact with this to obtain images from the camera as textures.
This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
2019-06-15 21:30:32 +10:00
Rémi Verschelde
c8db517993
Merge pull request #29316 from Chaosus/shader_const
...
Added constant support to shaders
2019-06-12 14:26:45 +02:00
Rémi Verschelde
30e8b53c38
Merge pull request #29680 from akien-mga/fix-headers
...
Add missing license headers
2019-06-11 19:01:40 +02:00
Rémi Verschelde
f18121824c
Add missing license headers
...
Make `fix_headers.py` script compatible with Python 3.
2019-06-11 15:33:32 +02:00
Rémi Verschelde
6d16f2f053
Fix error macro calls not ending with semicolon
...
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
Martin Dahlgren
17adece6ad
Add windowing before FFT to avoid flickering spectrogram
2019-06-03 12:58:33 +02:00
Martin Dahlgren
f78c7377c9
Make FFT size and oversampling adjustable for pitchshifting
2019-06-03 12:56:45 +02:00
Chaosus
c2d4abf62e
Added constant support to shaders
...
Co-authored-by: DavidSichma <sichmada@gmail.com>
2019-06-01 13:41:07 +03:00
Arthur Brainville
147b2403e4
audio_server.h : fix typo in comment (minor)
...
Line 152 : `//re-expose this her,` should be `//re-expose this here`
2019-05-30 13:47:18 +02:00
qarmin
66a36ba474
Fix some unincialised variables
2019-05-28 19:12:19 +02:00
Rémi Verschelde
6305030ee5
Merge pull request #29020 from raphael10241024/inertia
...
Fix some shape2d get_moment_of_inertia error
2019-05-28 10:23:55 +02:00
Rémi Verschelde
01c41c782b
Merge pull request #28796 from clayjohn/GLES2-optimization
...
GLES2: Allow Viewports to render directly to screen
2019-05-24 17:31:44 +02:00
Rémi Verschelde
193837a8f5
Merge pull request #28829 from vreon/swizzle-up
...
Allow constructing larger data types by swizzling
2019-05-24 17:02:26 +02:00
Martin Dahlgren
47f628a013
Fix getting max magnitude in AudioEffectSpectrumAnalyzer
2019-05-24 12:40:04 +02:00
Bastiaan Olij
3ea778e66e
Implement shadow to opacity
2019-05-21 20:07:46 +10:00
yakun.zhang
1808c5113a
Fix some shape2d get_moment_of_inertia error
2019-05-20 12:19:14 +08:00
Rémi Verschelde
e0574e1d98
Fix typos with codespell
...
Using codespell 1.15.0.
Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-05-19 13:10:35 +02:00
clayjohn
65c211d303
Implement ability to render viewports directly to screen
2019-05-13 15:20:15 -07:00
Rémi Verschelde
86a74e2cb3
Merge pull request #27798 from clayjohn/gles2-proj-mat-bug
...
Fixes bug when setting projection matrix in shader GLES2
2019-05-13 17:59:40 +02:00
Rémi Verschelde
0594db96a9
Merge pull request #28780 from bojidar-bg/x-audio-record-passthrough
...
Fix AudioEffectRecord messing up the effect stack by not writing to dst_frames
2019-05-13 13:50:34 +02:00
Jesse Dubay
1b9d26765f
Allow constructing larger data types by swizzling
...
GLSL allows the construction of larger data types by swizzling smaller
ones, but Godot shading language treated this as an error:
vec2 test2 = vec2(0.0, 1.0);
vec3 test3 = test2.xxx; // error: Invalid member for vec2 expression
This commit updates the expression parser for the 2 and 3-component data
types accordingly.
Fixes #10496
2019-05-11 11:01:09 -07:00
Bojidar Marinov
9285aad8b3
Fix AudioEffectRecord messing up the effect stack by not writing to dst_frames
2019-05-09 18:03:08 +03:00
Aaron Franke
702b539405
Change "ID" to lowercase "id"
...
Reasoning: ID is not an acronym, it is simply short for identification, so it logically should not be capitalized. But even if it was an acronym, other acronyms in Godot are not capitalized, like p_rid, p_ip, and p_json.
2019-05-09 06:25:32 -04:00
Rémi Verschelde
262924296b
Merge pull request #27415 from aqnuep/kinematicbody_fixes
...
KinematicBody performance and quality improvements
2019-05-02 18:03:58 +02:00
Rémi Verschelde
dd2cd06165
Merge pull request #25670 from aqnuep/bake_mode_affect_gi_prove
...
Disable GI probe capturing lights with bake mode disabled
2019-04-30 18:33:34 +02:00
clayjohn
e37d723695
fixes bug when setting projection matrix
2019-04-30 08:36:38 -07:00
LATRio
0562b78f40
Properly expose PhysicsServer methods
2019-04-30 20:42:07 +09:00
Rémi Verschelde
0327d57cfd
Merge pull request #27007 from BastiaanOlij/arvr_notifications
...
Send notifications to ARVRInterfaces
2019-04-30 12:05:46 +02:00
Rémi Verschelde
f40c62fa29
Merge pull request #27371 from ShyRed/fixdisabled2dcollisions
...
Allow adding disabled shapes
2019-04-30 11:43:11 +02:00
Rémi Verschelde
18e88c8563
Merge pull request #18992 from aaronfranke/mono-equal-approx
...
[Core] [Mono] Improve and use approximate equality methods
2019-04-29 10:16:46 +02:00
Juan Linietsky
c2027c8233
Added functions to further improve music timing
2019-04-27 14:05:16 -03:00
Juan Linietsky
af9bb0ea15
Clean up latency related functions
2019-04-27 12:23:05 -03:00
Bastiaan Olij
1a1b35721a
Send notifications to ARVRInterfaces
2019-04-27 08:39:21 +10:00
Aaron Franke
b659e1eb2b
Use approximate equallity methods in many places
2019-04-25 13:20:29 -04:00
ShyRed
a9d4cde0f5
Allow adding disabled shapes
...
Adds the ability to directly add disabled shapes to a collision object. Before this commit a shape has always been assumed to be enabled and had to be disabled in an extra step.
2019-04-23 18:06:48 +02:00
Daniel Rakos
de33ef2d1b
Disable GI probe capturing lights with bake mode disabled
...
The bake mode property of lights previously didn't affect GI probes.
This change makes the GI probe ignore lights that have their bake mode
set to disabled.
2019-04-23 11:36:36 +02:00
Hein-Pieter van Braam
5d33f241f0
Merge pull request #26064 from JFonS/add_frustum_camera_mode
...
Add FRUSTUM camera mode, allowing tilted frustums
2019-04-23 06:20:13 +03:00
Hein-Pieter van Braam-Stewart
c52f890626
Don't try to statically allocate 2x 8193 pointers
...
Maximum stack size is only 8KiB, this will try to allocate 8193 *
sizeof(void*) * 2 = 131088 bytes on the stack. This causes a crash in
some cases.
2019-04-22 15:27:10 +02:00
Rémi Verschelde
a342131eba
Merge pull request #27673 from qarmin/small_fixes
...
Small fixes, mostly duplicated code
2019-04-22 12:00:34 +02:00
Rémi Verschelde
1120b0b2d3
Merge pull request #28200 from bojidar-bg/28115-ysort-breaks-shader
...
Fix nested YSort breaking "Use parent material"
2019-04-19 21:15:19 +02:00
Juan Linietsky
04847ef5f9
Added ability for multiple images to be imported as an atlas
...
This adds support for groups in the import system, which point to a single file.
Add property hint for saving files in file field
2019-04-19 15:56:34 -03:00
Bojidar Marinov
dd9bb6f186
Fix nested YSort breaking use_parent_material
...
Fixes #28115
2019-04-19 16:18:01 +03:00
Fabio Alessandrelli
d0f2b5c8ab
Bind AudioEffectSpectrumAnalyzer::FFT_Size enums
2019-04-16 18:00:19 +02:00
Juan Linietsky
e33764744c
Added generator audio stream, and spectrum analyzer audio effect
...
Made AudioFrame and Vector2 equivalent for casting.
Added ability to obtain the playback object from stream players.
Added ability to obtain effect instance from audio server.
2019-04-10 12:58:06 -03:00
Rémi Verschelde
5772f60f96
Merge pull request #27843 from bojidar-bg/27678-ysort-visibility
...
Do not YSort canvas items that are not visible
2019-04-09 17:15:27 +02:00
Rémi Verschelde
c8994b56f9
Style: Apply new changes from clang-format 8.0
...
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
Bastiaan Olij
e0b703e3fe
Added eye_height, changed description and fixed size of viewport issue
2019-04-10 01:11:17 +10:00
Bojidar Marinov
11e62cdc79
Do not YSort canvas items that are not visible
...
Fixes an issue with nested YSorts not regarding visibility
2019-04-09 15:49:38 +03:00
Rémi Verschelde
a994db62df
Merge pull request #27644 from lupoDharkael/bus
...
Allow default audio bus layout modification
2019-04-08 11:06:35 +02:00
qarmin
856a8226a5
Small fixes, mostly dupicated code
2019-04-08 11:03:37 +02:00
Rémi Verschelde
4942e96897
Merge pull request #27527 from BastiaanOlij/render_ext_target
...
Add option to have viewport render into supplied texture (VR)
2019-04-07 11:11:50 +02:00
Rémi Verschelde
35f06eb437
Merge pull request #25630 from BastiaanOlij/arvr_positional_mesh
...
Added a mesh interface to the arvr positional trackers
2019-04-07 11:09:21 +02:00
Rémi Verschelde
3b697ce8d5
Merge pull request #26486 from marxin/fix-Wdeprecated-copy
...
Fix new GCC 9 warnings: -Wdeprecated-copy.
2019-04-06 18:21:18 +02:00
Rémi Verschelde
2db0613fb0
Merge pull request #25624 from nekomatata/texture-rect-flip
...
Add ability to flip TextureRect horizontally or vertically
2019-04-06 13:15:01 +02:00
Bastiaan Olij
8349d4fbd9
Add option to have viewport render into supplied texture
2019-04-06 08:24:58 +11:00
lupoDharkael
650b698f51
Allow default audio bus layout modification
2019-04-05 17:19:25 +02:00
Juan Linietsky
19a6a6286a
Ability to make CanvasLayers have pseudo 3D depth.
2019-04-05 10:25:51 -03:00
PouleyKetchoupp
8b84638322
Add ability to flip TextureRect horizontally or vertically
2019-04-03 13:05:29 +02:00
Tomasz Chabora
fc8ad59af3
Make angular_damp of new Area nodes match the global default
2019-04-01 21:42:06 +02:00
ShyRed
96093778ed
Remove hardcoded joint bias
...
Use user provided bias instead of hardcoded bias.
2019-03-27 19:21:07 +01:00
Daniel Rakos
6dd65c0d67
KinematicBody performance and quality improvements
...
With this change finally one can use compound collisions (like those created
by Gridmaps) without serious performance issues. The previous KinematicBody
code for Bullet was practically doing a whole bunch of unnecessary
calculations. Gridmaps with fairly large octant sizes (in my case 32) can get
up to 10000x speedup with this change (literally!). I expect the FPS demo to
get a fair speedup as well.
List of fixes and improvements:
- Fixed a general bug in move_and_slide that affects both GodotPhysics and
Bullet, where ray shapes would be ignored unless the stop_on_slope parameter
is disabled. Not sure where that came from, but looking at the 2D physics
code it was obvious there's a difference.
- Enabled the dynamic AABB tree that Bullet uses to allow broadphase collision
tests against individual shapes of compound shapes. This is crucial to get
good performance with Gridmaps and in general improves the performance
whenever a KinematicBody collides with compound collision shapes.
- Added code to the broadphase collision detection code used by the Bullet
module for KinematicBodies to also do broadphase on the sub-shapes of
compound collision shapes. This is possible thanks to the dynamic AABB
tree that was previously disabled and it's the change that provides the
biggest performance boost.
- Now broadphase test is only done once per KinematicBody in Bullet instead of
once per each of its shapes which was completely unnecessary.
- Fixed the way how the ray separation results are populated in Bullet which
was completely broken previously, overwriting previous results and similar
non-sense.
- Fixed ray shapes for good now. Previously the margin set in the editor was
not respected at all, and the KinematicBody code for ray separation was
complete bogus, thus all previous attempts to fix it were mislead.
- Fixed an obvious bug also in GodotPhysics where an out-of-bounds index was
used in the ray result array.
There are a whole set of other problems with the KinematicBody code of Bullet
which cost performance and may cause unexpected behavior, but those are not
addressed in this change (need to keep it "simple").
Not sure whether this fixes any outstanding Github issues but I wouldn't be
surprised.
2019-03-27 00:39:47 +01:00
Windy Darian
ff318d91ee
Fix bone aabb calculation, which caused a skeletal mesh culling issue
...
There was a bug that could result in most bone aabb boxes ending up with
tiny size upon import and mess up with culling of skeletal meshes. This
fixes it.
2019-03-14 00:35:53 -04:00
Rémi Verschelde
6c2283b2d4
Merge pull request #26660 from marxin/fix-25639-audio-negative-shift
...
Fix #25639 by not shifting a negative value.
2019-03-05 23:10:02 +01:00
marxin
c24f53d4f6
Fix #25639 by not shifting a negative value.
2019-03-05 21:32:18 +01:00
marxin
0e781aeacb
Fix #25641 by not shifting a negative value.
2019-03-05 21:18:46 +01:00
Rémi Verschelde
453d239a69
Merge pull request #26532 from aqnuep/texture_array_fixes
...
Fixed TextureArray and Texture3D issues
2019-03-04 15:09:11 +01:00
Juan Linietsky
34dd772054
Properly redraw if something animated is visible
2019-03-03 13:43:54 -03:00
Daniel Rakos
582f62c2b2
Fixed TextureArray and Texture3D issues
...
- Texture arrays and 3D textures weren't working previously due to an
incorrect number of calls to glTexImage3D with incorrect level parameters.
This change fixes that.
- Fixed the incorrect calculation of the byte size of layered textures.
- Added the layer count to the debugger info when viewing video memory usage.
2019-03-03 16:40:48 +01:00
Juan Linietsky
2f32a75d2e
Skeletons can now choose between using local or world coords for processing, fixes #26468
2019-03-03 12:24:00 -03:00
Rémi Verschelde
467f18b738
Fix style issues from recent commits
2019-03-03 12:45:20 +01:00
Rémi Verschelde
56520d7bd6
Merge pull request #26505 from marcelofg55/input_buffer_crashfix
...
Fix possible crash on AudioDriver::input_buffer_write
2019-03-02 23:51:24 +01:00
Marcelo Fernandez
f529649cec
Fix possible crash on AudioDriver::input_buffer_write
2019-03-02 19:41:45 -03:00
Juan Linietsky
1b8f56c099
Clean up and fix some situations where triangulation may fail, closes #26366
2019-03-02 12:04:24 -03:00
marxin
6be77da7eb
Fix new GCC 9 warnings: -Wdeprecated-copy.
2019-03-02 14:37:02 +01:00
Juan Linietsky
b84b015225
Make query checks less agressive, fixes #24694
2019-03-02 08:48:47 -03:00
Juan Linietsky
3f681b0681
Clean up blend shape support in GLES2 and GLES3.
2019-03-01 16:01:44 -03:00
Marcelo Fernandez
f04bff349b
Fix possible crash when AudioDriver::capture_start fails
2019-03-01 09:33:15 -03:00
Rémi Verschelde
09a541edd0
Merge pull request #26287 from JFonS/fix_25992
...
Use item_shadow_mask for LightOccluder2D culling
2019-02-27 21:28:31 +01:00
Rémi Verschelde
426a6fdc17
Merge pull request #26134 from marxin/fix-Wsign-compare
...
Fix -Wsign-compare warnings.
2019-02-27 09:22:47 +01:00
marxin
e5f665c718
Fix -Wsign-compare warnings.
...
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
2019-02-27 07:45:57 +01:00
Juan Linietsky
ffb9f342a5
Ensure implicit conversions for scalar constants work in shaders, closes #26239
2019-02-26 23:21:37 -03:00
Juan Linietsky
f669ebeeaf
-Properly handle missing ETC support on export
...
-Added ability for resource importers to save metadata
-Added ability for resource importers to validate depending on project settings
2019-02-26 18:45:06 -03:00
Juan Linietsky
5eeb06ffd1
-Remove harcoded opengl extension testing from OS, ask rasterizer instead.
...
-Fixed a bug where etc textures were imported broken
2019-02-26 11:58:47 -03:00
JFonS
1c3a1165e5
Use item_shadow_mask for LightOccluder2D culling
2019-02-25 22:58:14 +01:00
Juan Linietsky
fd68bb2596
-Treat scalar conversions when calling functions as error, closes #24261
...
-Make shader editor display errors if exist when just opening it
-Make ShaderMaterial not lose parameters if opened in error.
2019-02-23 17:55:09 -03:00
Rémi Verschelde
24097811e4
Fix invalid change from CLAMP to MAX in #26099
...
CLAMP limits the value between the two bounds, so for unsigned ints
it should be replaced by MIN(val, max), not MAX.
The issue in voxel_light_baker.cpp was fixed in 4f697f7
.
Fixes #26170 .
2019-02-23 12:08:21 +01:00
Rémi Verschelde
726f31e992
Merge pull request #26132 from marxin/fix-Wignored-qualifiers
...
Fix warnings seen with -Wignored-qualifiers.
2019-02-22 09:55:27 +01:00
Rémi Verschelde
60fe9321ac
Merge pull request #26099 from marxin/fix-Wtype-limits-warnings
...
Fix all -Wtype-limits warnings.
2019-02-22 09:44:59 +01:00
Juan Linietsky
87b303aa95
Fixed bugs in test body motion and removed unnecesary test in move_and_slide. Fixes #25968
2019-02-21 17:21:36 -03:00
marxin
c11e7ffd0e
Fix warnings seen with -Wignored-qualifiers.
2019-02-21 20:24:29 +01:00
marxin
7de7f0ef17
Fix all -Wtype-limits warnings.
2019-02-21 19:34:35 +01:00
Rémi Verschelde
cac1a93d1b
Merge pull request #26103 from nekomatata/area2d-rectangle-collision-fix
...
Fixed Area2d input events ignoring the top and left edge of rectangle shape
2019-02-21 14:39:26 +01:00
PouleyKetchoupp
edcfe41bd5
Area2d rectangle collision check doesn't ignore the first pixel row and column ( fix #25462 )
2019-02-21 00:34:57 +01:00
marxin
8d51618949
Add -Wshadow=local to warnings and fix reported issues.
...
Fixes #25316 .
2019-02-20 19:44:12 +01:00
JFonS
54b95b6c5a
Add FRUSTUM camera mode, allowing tilted frustums
...
This new camera mode makes it easy to create tilted frustums for mirror
or portal effects.
This work was kindly sponsored by IMVU.
2019-02-19 17:48:08 +01:00
JFonS
964338b06b
Fix update of canvas AABB with update_when_visible
...
Ensure the AABB of canvas items is always updated when
`update_when_visible` is enabled.
2019-02-17 20:28:00 +01:00
Juan Linietsky
81e15358c0
Skip disabled shape when getting rest info. Fixes #25941
2019-02-16 16:32:30 -03:00
Juan Linietsky
6d4eaebe1e
Support multiple ray shapes in kinematicbody, fixes #25050
2019-02-16 16:15:22 -03:00
Juan Linietsky
ee464f56c4
Add a minimum treshold for acquiring rest contacts to avoid numerical precision issues. Fixes #25074
2019-02-16 13:45:01 -03:00
Juan Linietsky
f439b786ea
Allow kinematic bodies without shapes to still move, fixes #24775
2019-02-16 11:06:44 -03:00
Juan Linietsky
2e6c98058f
Make ray shapes not work with OWC. They don't make practical sense together. Closes #25532
2019-02-16 10:07:27 -03:00
Rémi Verschelde
5fc86026ca
Fix typos with codespell
...
Using codespell 1.14.0.
Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
doubleclick
lod
nd
numer
que
te
unselect
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-02-13 09:23:29 +01:00
Rémi Verschelde
75dae1b9a9
Drivers, main, servers: Ensure classes match their header filename
...
Renamed:
- `drivers/alsamidi/alsa_midi.h` -> `midi_driver_alsamidi.h`
(same for `coremidi` and `winmidi`)
- `main/timer_sync.h` -> `main_timer_sync.h`
- `servers/visual/visual_server_global.h` -> `visual_server_globals.h`
2019-02-12 14:39:47 +01:00
Rémi Verschelde
b7cc2bb1e2
Core: Ensure classes match their header filename
...
Also drop some unused files.
Renamed:
- `core/dvector.h` -> `pool_vector.h`
- `core/io/resource_import.h` -> `resource_importer.h`
- `core/sort.h` -> `sort_array.h`
- `core/string_db.h` -> `string_name.h`
Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
2019-02-12 13:34:25 +01:00
Juan Linietsky
cb09abdbbd
Fixed OWC for rigid bodies, closes #25732
2019-02-12 08:40:18 -03:00
Rémi Verschelde
13c50e8aa5
Merge pull request #25481 from hpvb/fix-ubsan-asan-reports
...
Fix many asan and ubsan reported issues
2019-02-12 12:21:01 +01:00
Aaron Franke
3f837d5cc5
[Core] Rename Matrix3 file to Basis
...
The code already referred to "Basis", it's just the file name that was different for some reason.
2019-02-09 14:42:23 -05:00
Bastiaan Olij
005fb62284
Added a mesh interface to the arvr positional trackers
2019-02-06 21:03:43 +11:00
Hein-Pieter van Braam
d308eb091a
Fix many asan and ubsan reported issues
...
This allows most demos to run without any ubsan or asan errors. There
are still some things in thirdpart/ and some things in AudioServer that
needs a look but this fixes a lot of issues. This should help debug less
obvious issues, hopefully.
This fixes #25217 and fixes #25218
2019-01-30 06:43:56 +01:00
Rémi Verschelde
5876c3f089
Revert " Deprecated Godot 3D physics engine"
...
This reverts commit 5de5a4140b
.
@reduz still intends to rework it in the future, and it's convenient to
test if issues are specific to Bullet or not, so we keep it around for
the time being.
2019-01-28 16:51:03 +01:00
Rémi Verschelde
d0f289b0d9
Merge pull request #25314 from marxin/fix-24417-class-memaccess
...
Fix class memaccess
2019-01-27 21:32:26 +01:00