summaryrefslogtreecommitdiffstats
path: root/servers/visual
Commit message (Collapse)AuthorAgeFilesLines
* Renaming of servers for coherency.Juan Linietsky2020-03-2767-47600/+0
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Fix some -Wmaybe-uninitialized warningsRémi Verschelde2020-03-271-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Namely: ``` modules/basis_universal/register_types.cpp: In function 'Ref<Image> basis_universal_unpacker(const Vector<unsigned char>&)': modules/basis_universal/register_types.cpp:266:15: warning: 'imgfmt' may be used uninitialized in this function [-Wmaybe-uninitialized] 266 | image->create(info.m_width, info.m_height, info.m_total_levels > 1, imgfmt, gpudata); | ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ modules/basis_universal/register_types.cpp:255:39: warning: 'format' may be used uninitialized in this function [-Wmaybe-uninitialized] 255 | bool ret = tr.transcode_image_level(ptr, size, 0, i, dst + ofs, level.m_total_blocks - i, format); | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` ``` servers/visual_server.cpp: In member function 'Error VisualServer::_surface_set_data(Array, uint32_t, uint32_t*, uint32_t, Vector<unsigned char>&, int, Vector<unsigned char>&, int, AABB&, Vector<AABB>&)': servers/visual_server.cpp:636:15: warning: 'iw' may be used uninitialized in this function [-Wmaybe-uninitialized] 636 | copymem(&iw[i * 2], &v, 2); | ^ ``` ``` core/image.cpp: In member function 'Error Image::generate_mipmap_roughness(Image::RoughnessChannel, const Ref<Image>&)': core/image.cpp:1683:11: warning: 'roughness' may be used uninitialized in this function [-Wmaybe-uninitialized] 1683 | float roughness; | ^~~~~~~~~ ```
* Fix various -Wmaybe-uninitialized (#37352).Martin Liska2020-03-271-2/+2
|
* Open sub-windows as embedded if the OS does not support themJuan Linietsky2020-03-262-6/+39
|
* Added a Window node, and made it the scene root.Juan Linietsky2020-03-268-45/+47
| | | | Still a lot of work to do.
* Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky2020-03-262-4/+5
|
* Rename conflicting variable to fix MoltenVK shader compilation.bruvzg2020-03-261-25/+26
|
* Merge pull request #37268 from clayjohn/VULKAN-sky-colorRémi Verschelde2020-03-244-69/+116
|\ | | | | Replace subpass textures with color in sky shader
| * Replace subpass textures with color in sky shaderclayjohn2020-03-244-69/+116
| |
* | Remove unused classes and stray headersRémi Verschelde2020-03-243-86/+1
|/ | | | | | | | 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 ```
* Merge pull request #37179 from clayjohn/VULKAN-sky-shaderRémi Verschelde2020-03-2216-404/+1397
|\ | | | | Implement Sky Shaders
| * Working sky shader implementationclayjohn2020-03-2114-780/+1350
| |
| * Add shader based background modeBastiaan Olij2020-03-1913-66/+489
| |
* | Make file formatting comply with POSIX and Unix standardsAaron Franke2020-03-213-3/+3
| | | | | | | | UTF-8, LF, no BOM, and newlines at the end of files
* | Fix incorrect shader block parsingYuri Roubinsky2020-03-201-1/+3
| |
* | Allow to reassign local variables in shadersYuri Roubinsky2020-03-202-8/+11
| |
* | Fix shader TIME auto-completionYuri Roubinsky2020-03-191-8/+17
|/
* Removed old TIME references from shader_typesYuri Roubinsky2020-03-191-7/+0
|
* Makes shader 'TIME' available in custom functions by defaultYuri Roubinsky2020-03-192-0/+11
|
* Show shader method out/inout qualifier in intellisenseYuri Roubinsky2020-03-181-0/+22
|
* Fix shader crash if passing const values to modf functionYuri Roubinsky2020-03-182-9/+61
|
* Style: Set clang-format Standard to Cpp11Rémi Verschelde2020-03-1710-27/+27
| | | | | | | | | | 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`.
* Enables passing out built-in parameter from parent function in shadersYuri Roubinsky2020-03-141-0/+8
|
* Fix various typosluz.paz2020-03-115-9/+9
| | | Found via `codespell`
* Merge pull request #36021 from YeldhamDev/intersects_touch_exposeRémi Verschelde2020-03-041-1/+1
|\ | | | | Turn Rect2's 'intersects_touch()' into an extra argument of 'intersects()'
| * Turn Rect2's 'intersects_touch()' into an extra argument of 'intersects()'Michael Alexsander2020-03-041-1/+1
| |
* | Merge pull request #36733 from qarmin/static_analyzer_fixesRémi Verschelde2020-03-043-3/+6
|\ \ | |/ |/| Fixes bugs found by Sonarcloud and Coverity
| * Fixes bugs found by Sonarcloud and Coverityqarmin2020-03-023-3/+6
| |
* | Change when we can ERR_FAIL_COND and ERR_FAIL_CONV_V to static_assertMateo Dev .592020-03-041-1/+1
| |
* | Merge pull request #36691 from clayjohn/VULKAN-cubemap-roughnessRémi Verschelde2020-03-025-92/+76
|\ \ | |/ |/| Improve cubemap importance sampling
| * Improve cubemap importance samplingclayjohn2020-02-295-92/+76
| |
* | Properly free reflection probe atlasclayjohn2020-02-291-0/+3
| |
* | Merge pull request #36679 from clayjohn/VULKAN-mem-leakRémi Verschelde2020-02-291-1/+0
|\ \ | | | | | | Remove minimum size for shadow atlas
| * | Remove minimum size for shadow atlasclayjohn2020-02-291-1/+0
| |/
* | Fix shader's step hint range for integersYuri Roubinsky2020-02-291-1/+1
| |
* | Reduce descripter sets in cubemap filterclayjohn2020-02-283-10/+30
|/
* Basic fast filtering implementationclayjohn2020-02-278-55/+812
|
* Merge pull request #36627 from clayjohn/VULKAN-freeRémi Verschelde2020-02-284-1/+25
|\ | | | | Properly free many Vulkan resources
| * Properly free many vulkan resourcesclayjohn2020-02-274-1/+25
| |
* | Merge pull request #36556 from RandomShaper/rework_mutexRémi Verschelde2020-02-284-12/+8
|\ \ | |/ |/| Reimplement `Mutex` with C++'s `<mutex>` (plus more)
| * Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez2020-02-264-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* | Merge pull request #36186 from Calinou/remove-vulkan-debugging-printsRémi Verschelde2020-02-272-4/+2
|\ \ | | | | | | Remove Vulkan debugging prints
| * | Remove Vulkan debugging printsHugo Locurcio2020-02-132-4/+2
| | |
* | | Merge pull request #36428 from clayjohn/VULKAN-ref-probe-skyRémi Verschelde2020-02-261-1/+9
|\ \ \ | |_|/ |/| | Properly flip sky when rendering reflection probes
| * | properly flip sky when rendering reflection probesclayjohn2020-02-211-1/+9
| | |
* | | Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | Replace FALLTHROUGH macro by C++17 [[fallthrough]]Rémi Verschelde2020-02-231-1/+1
|/ / | | | | | | | | | | | | | | | | | | 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.
* | Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-2/+2
| | | | | | | | objects and made them default.
* | Fix MIMPAMPS typos in constants throughout the engineAndrii Doroshenko (Xrayez)2020-02-204-14/+14
| |
* | Fix compilation warnings and re-enable werror=yes on TravisRémi Verschelde2020-02-186-24/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.