Commit graph

89 commits

Author SHA1 Message Date
bruvzg 26318f3bd1 Fix Vector3 ambiguities and out of bounds init. 2020-02-11 12:03:39 +01:00
Juan Linietsky dd3682e5fe Modernized default 3D material, fixes material bugs. 2020-02-11 12:01:24 +01:00
Juan Linietsky 449df8f688 Base 3D engine done, still untested, though. 2020-02-11 11:59:25 +01:00
bruvzg eb48be51db Add static Vulkan loader.
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Juan Linietsky 9b0dd4f571 A lot of progress with canvas rendering, still far from working. 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
Rémi Verschelde f3726ee994 Use modules_enabled.gen.h to improve inter dependency checks
- Fix build with gdscript module disabled. Fixes #31011.
- Remove unused `gdscript` compile option.
- Fix build with regex module disabled.
- Fix ImageLoaderSVG to forward declare thirdparty structs.
2020-02-07 11:50:40 +01:00
Marcel Admiraal 6d69cd40bd Add do..while(0) wrappers to macros without one.
- Add do..while(0) wrapper to ERR_FAIL_NULL macros.
- Add do..while(0) wrapper to ERR_FAIL_COND macros.
- Add do..while(0) wrapper to ERR_CONTINUE macros.
- Add do..while(0) wrapper to ERR_BREAK macros.
- Add do..while(0) wrapper to CRASH_COND macros.
- Add do..while(0) wrapper to ERR_FAIL macros.
- Add do..while(0) wrapper to ERR_PRINT macros.
- Add do..while(0) wrapper to WARN_PRINT macros.
- Add do..while(0) wrapper to WARN_DEPRECATED macros.
- Add do..while(0) wrapper to CRASH_NOW macros.
2020-02-05 11:19:12 +01:00
Marcel Admiraal f0db13502a Remove duplicate WARN_PRINT macro. 2020-02-05 11:13:24 +01:00
Hugo Locurcio a002b93d86
Add explanations for errors related to Vector/Quat normalization 2020-01-24 14:19:23 +01:00
Haoyu Qiu 92b36d4706 Adds NULL check before using image loader 2020-01-16 21:49:23 +08:00
K. S. Ernest (iFire) Lee 0172a7f932 Use cycle and loop hint flags in glTF2. 2020-01-10 08:02:16 -08:00
K. S. Ernest (iFire) Lee f028b8b0e4 Support GLTF2 alpha scissors. 2020-01-02 11:52:08 -08: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
Marios Staikopoulos d3cf8cfb7d Fix Hard Crash on glTF Color Accessor Import 2019-12-24 15:03:24 -08:00
Marios Staikopoulos 4b28fd4f23 Bugfix: Sanitize glTF importer Animation Names and do not set bone_pose 2019-11-27 12:20:38 -08:00
K. S. Ernest (iFire) Lee 80b1604fa9 33714 glTF2 handle undefined load-time scene. 2019-11-22 08:48:23 -08:00
Rémi Verschelde ab3bccdb78 Fix typos with codespell
Using codespell 1.16.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
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-11-22 08:35:03 +01:00
Rémi Verschelde 28613ab8c9
Merge pull request #33794 from nekomatata/gltf-morph-shapes-crash2
Error instead of crash in gltf import with more than one morph target
2019-11-21 22:09:08 +01:00
PouleyKetchoupp e949665489 Error instead of crash in gltf import with more than one morph target
Redone from PR #33782 to fix the crash without adding compatibility with Blender 2.8
Helps with #16124, while Blender 2.81 has the proper export fix.
2019-11-21 17:25:01 +01:00
K. S. Ernest (iFire) Lee d0de373884 33756 gltf2 importer should use zfar 2019-11-21 07:52:18 -08:00
K. S. Ernest (iFire) Lee 3b44866bf2 33714 If the gltf2 asset has no scene, it is corrupt. 2019-11-20 10:49:24 -08:00
qarmin 616ab4fac2 Small fixes to redundand code, copy paste bugs 2019-10-14 11:40:55 +02:00
gladmin 7f3e37fead Fix import hints being ignored by glTF importer
This fixes a regression introduced in commit 72d2468
due to hyphens being removed from nodes names.
2019-09-25 16:58:05 +02:00
Rémi Verschelde dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin 17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Rémi Verschelde 8c0595b722
Merge pull request #32306 from hbina/unused_variable
Fixed incorrect usage of variables in querying values.
2019-09-25 08:49:31 +02:00
Marios Staikopoulos 4631b0ca62 glTF: Fixed mistake with root node calculation in skin_verify
Was not actually grabbing the computed roots for comparison, but instead
was grabbing the disjoint_set representatives.
2019-09-24 21:49:25 -07:00
Hanif Bin Ariffin d1e069ea23 Fixed incorrect use of variables
The previous committer mistakenly used the wrong variable to query some values.
This commit simply changes it so that it queries the right Dict.
2019-09-24 16:45:34 -04:00
Marios Staikopoulos 77e223ff94 GLTF: Fixed some issues with skin groups joining incorrectly and removed unused code
- Skin groups now merge more cleanly together
- Skins whose highest nodes are siblings of another skin now get merged also
- Skin nodes who have children of another skin now also fuse together
- Removed the re-rooting of IBM code, as it is no longer needed with the Skin system
2019-09-22 17:45:36 -07:00
Marios Staikopoulos 72d2468d68 More GLTF Fixes
1: Depth draw mode set for transparent materials (iFire)
2: Skeletons
  - Bone names now unique and seperate from scene names
  - Due to mixture of fake joints and joints, new bone sanitizing for names added
  - Fixed an issue where some disjoint skins were not being joined due to a logic error
  - Deterministic and Depth-first bone creation order
3: Skins
  - Removed duplicate skins when possible
4: Animations
  - Fixed invalid morph target names
2019-09-21 21:45:38 -07:00
Marios Staikopoulos 6fc5647bc3 GLTF Importer - Add more Index types and const-ed up the code 2019-09-21 15:21:02 -07:00
Marios Staikopoulos 11e09e59d1 GLTF2 Import Fixes - Skin(s) to Skeleton - Skin Support 2019-09-20 23:08:58 -07:00
Juan Linietsky d81ddaf33e Added skin support and simplified APIs to override bone position. 2019-09-18 19:46:32 -03:00
Fabio Alessandrelli c19871af6d Move CryptoCore to it's own folder.
Crypto classes will be placed in core/crypto.
2019-08-19 16:31:05 +02:00
Braden Bodily 71d71d55b5 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
Condensed some if and ERR statements. Added dots to end of error messages

Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?),
core/os/memory.cpp,
drivers/png/png_driver_common.cpp,
drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-08-17 12:33:15 +02:00
Joseph Catrambone c2e91005ef Bugfix in GLTF import: Flipping boolean check. Reindexing should _NOT_ happen when blend shapes are present. 2019-07-27 14:34:54 -07:00
Rémi Verschelde a1b4568ba9
Revert "Tweak SpatialMaterial's default metallic and roughness texture channels" 2019-07-22 11:56:41 +02:00
Fabio Alessandrelli 564d93ff10 CryptoCore class to access to base crypto utils.
Godot core needs MD5/SHA256/AES/Base64 which used to be provided by
separate libraries.
Since we bundle mbedtls in most cases, and we can easily only include
the needed sources if we so desire, let's use it.

To simplify library changes in the future, and better isolate header
dependencies all functions have been wrapped around inside a class in
`core/math/crypto_base.h`.

If the mbedtls module is disabled, we only bundle the needed source
files independently of the `builtin_mbedtls` option.
If the module is enabled, the `builtin_mbedtls` option works as usual.

Also remove some unused headers from StreamPeerMbedTLS which were
causing build issues.
2019-07-02 12:36:27 +02:00
Rémi Verschelde b9f8e072ce
Merge pull request #26205 from Calinou/spatialmaterial-use-packed-channels
Tweak SpatialMaterial's default metallic and roughness texture channels
2019-06-20 11:46:01 +02:00
Rémi Verschelde b486f5dde0 glTF: Fix import of animations with INTERPOLATION_LINEAR
Bug found thanks to GCC 8's -Wduplicated-branches.
Slight refactor for readability.
2019-06-15 15:20:13 +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
Rémi Verschelde e6979adb1b
Merge pull request #26918 from aqnuep/skeleton_reparenting_fix
Fix skeleton reparenting to also work when the skeleton node is not a bone
2019-04-05 16:48:42 +02:00
Vivatchai Kaveeta 32dd9c67c6 Fix order of transformation in GLTF import
From the gltf 2 spec, the order is R  * S. Previously we did S * R, which broke some mesh with non-uniform scale.

Fix #23356, Fix #14725
2019-03-18 03:08:46 +07:00
Daniel Rakos 1cf7ca87ce Fix skeleton reparenting to also work when the skeleton node is not a bone
Existing code only did the reparenting when the parent node was a bone. This
change fixes that, plus the reparenting code itself, which used the index of
the skin instead of the skin index itself to address the skeleton array.
2019-03-11 16:26:45 +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
Juan Linietsky 3f681b0681 Clean up blend shape support in GLES2 and GLES3. 2019-03-01 16:01:44 -03:00
Hugo Locurcio eb79833770
Tweak SpatialMaterial's default metallic and roughness texture channels
To follow the glTF 2.0 specification in all cases (including outside
of imported glTF scenes), the blue channel is now used for metallic
and the green channel is now used for roughness.
2019-02-23 19:10:31 +01:00
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Juan Linietsky ed1b9c1f15 Avoid crash in import (though model still does not work well), fixes #19346 2019-01-26 16:32:05 -03:00