Commit Graph

433 Commits

Author SHA1 Message Date
Rémi Verschelde 9f2c24e8ce
Cleanup: Remove executable bit from files which don't need it
Drop unused xpmfix.sh script.

(cherry picked from commit 76c6007aa6)
2021-01-26 17:00:15 +01:00
Pedro J. Estébanez 0f4c44c9fb Fix freeze-crash in lightmapper under MinGW-GCC 2021-01-23 05:53:10 +01:00
Pedro J. Estébanez 3c4b607faf Fix freeze-crash in lightmapper under MinGW-GCC 2021-01-21 12:09:37 +01:00
Lyuma a0c8f45095 Rename patches folder 2021-01-18 06:52:58 -08:00
Lyuma 2c2f70c444 embree: cross compile fixes.
Fix typos in #if; add missing _MSC_VER; avoid warning in random generator.
2021-01-18 06:20:24 -08:00
JFonS b1ca82c43a CPU lightmapper fixes.
- Fix Embree runtime when using MinGW (patch by @RandomShaper).
- Fix baking of lightmaps on GridMaps.
- Fix some GLSL errors.
- Fix overflow in the number of shader variants (GLES2).
2021-01-15 12:32:54 +01:00
JFonS 7d7d7ef16d CPU lightmapper formatting and minor fixes. 2021-01-14 18:08:33 +01:00
JFonS 112b416056 Implement new CPU lightmapper
Completely re-write the lightmap generation code:
- Follow the general lightmapper code structure from 4.0.
- Use proper path tracing to compute the global illumination.
- Use atlassing to merge all lightmaps into a single texture (done by @RandomShaper)
- Use OpenImageDenoiser to improve the generated lightmaps.
- Take into account alpha transparency in material textures.
- Allow baking environment lighting.
- Add bicubic lightmap filtering.

There is some minor compatibility breakage in some properties and methods
in BakedLightmap, but lightmaps generated in previous engine versions
should work fine out of the box.

The scene importer has been changed to generate `.unwrap_cache` files
next to the imported scene files. These files *SHOULD* be added to any
version control system as they guarantee there won't be differences when
re-importing the scene from other OSes or engine versions.

This work started as a Google Summer of Code project; Was later funded by IMVU for a good amount of progress;
Was then finished and polished by me on my free time.

Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2021-01-14 18:05:56 +01:00
JFonS a80e4a6158 Add Embree thirdparty library 2021-01-14 18:02:07 +01:00
JFonS ad8abef74c Add OpenImageDenoise thirdparty library 2021-01-14 18:02:07 +01:00
Rémi Verschelde 52e674ded1
pcre2: Update to upstream version 10.36
Changelog: https://vcs.pcre.org/pcre2/code/tags/pcre2-10.36/ChangeLog?view=markup
(cherry picked from commit 951ad29c0f)
2021-01-13 16:17:08 +01:00
Rémi Verschelde 08efd1c908
COPYRIGHT: Update with recent additions, cleanup
Also include public domain assets in `COPYRIGHT.txt` with Unlicence text or
dual-licensing scheme.

And document commit hashes for most thirdparty code in `thirdparty/README.md`
for clarity, and in case there's no tag matching the included version numbers.

(cherry picked from commit c6802a65c6)
2021-01-13 16:17:08 +01:00
Rémi Verschelde d044c57069
enet: Sync with upstream 1.3.17
(cherry picked from commit d8495d41ca)
2021-01-13 16:17:08 +01:00
Rémi Verschelde 4b59e1e736
zstd: Update to upstream version 1.4.8
(cherry picked from commit 3645c9c80c)
2021-01-13 16:17:08 +01:00
Rémi Verschelde 49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Rémi Verschelde 387390d638
mbedtls: Update to upstream version 2.16.9
(cherry picked from commit 2872006039)
2020-12-29 16:02:01 +01:00
Fabio Alessandrelli ab4423e7ad
Fix some easing equations' undefined behaviours.
Spotted via -Wunsequenced.
Easing equations had different behaviours depending on the toolchain
due to its abusing of inline assignments.

(cherry picked from commit 3936da7ab4)
2020-12-10 13:08:05 +01:00
Sacha Waked d5ea412848
Updated open-simplex to have const noise functions
"open-simplex-noise-in-c" now updated to master and "opensimplex" module refactored accordingly

(cherry picked from commit 7e2b88a7eb)
2020-12-09 11:22:04 +01:00
Vincent 75d38765a8 mp3 import and playback support backport 2020-12-07 15:32:09 +01:00
Adam Brown df047e56fe
xatlas: Sync with upstream 5571fc7
Fixes #44017 by changing the `normalize()` function to check for non-negative rather than non-zero via an epsilon check.

(cherry picked from commit 23c754360a)
2020-12-02 16:03:26 +01:00
Rémi Verschelde 6553cd368b
nanosvg: Sync with upstream 3e403ec
Includes some loop condition fixes after fuzzing.

The previously identified regression (#43641) is now fixed upstream.

(cherry picked from commit 1bb6491992)
2020-11-26 09:38:46 +01:00
Rémi Verschelde 08028fa1ee
glad: Sync with upstream 0.1.34 2020-11-17 16:42:42 +01:00
bruvzg da289046b5
Update "open-simplex-noise-in-c" to fix undefined signed overflow.
(cherry picked from commit 70bdf0ecf2)
2020-11-11 15:44:18 +01:00
Rémi Verschelde 4f908fb671
Merge pull request #42941 from RevoluPowered/fbx-3-2-2020
[3.2] FBX importer rewrite
2020-10-30 17:34:28 +01:00
Gordon MacPherson 8197a611fa Rewrite FBX Importer to convert directly to Godot scene format
Co-authored-by: Gordon MacPherson <gordon@gordonite.tech>
Co-authored-by: Andrea Catania <info@andreacatania.com>
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>

This is a complete rewrite of the importer. It will give more deterministic behaviour and has been sponsored by IMVU inc, over 1 year has gone into the development of this importer to remove the burden of the FBX SDK.
This was my project for 1 entire year and I really enjoyed the opportunity to add to Godot.

Along the road of implementing fixes we implemented fbx pivots, animations and inheritance type handling, which in most cases works properly.
We have implemented animation and mesh skinning too this should work out of the box, if there are issues let us know.
It's designed so that you can expand this with ease, and fix bugs easily too.
It can import from Autodesk Maya and import into Godot, with pivots.
There are bits we could polish but for now this is good enough.

Additional fixes made before upstreaming:
- fixed memory leaks
- ensure consistent ordering on mac linux and windows for fbx tree. (very important for material import to be deterministic)
- disabled incorrect warnings for fbx_material
- added compatibility code for /RootNode/ so compat is not broken
- Optimise FBX - directly import triangles
- remove debug messages
- add messages for mesh id, mesh re-import is sometimes slow and we need to know what mesh is being worked on
- Document no longer uses unordered maps
- Removed some usages of &GetRequiredToken replaced with safe *GetRequiredToken() function
- Added parser debugging
- Added ERR_FAIL_CONDS for unsupported mesh formats (we can add these later super easy to do now)
- Add memory debugging for the Tokens and the TokenParser to make it safe
- Add memory initialisation to mesh.cpp surface_tool.h and mesh.h
- Initialise boolean flags properly
- Refactored to correct naming for the fbx_mesh_data.h so you know what data you are working on
- Disabled corruption caused by the FIXME:
- Fixed document reading indexes and index_to_direct vs indexes mode
- Fixed UV1 and UV2 coordinates
- Fixed importer failing to import version 7700 files
- Replaced memory handling in the FBX Document with pointers, before it was dereferencing invalid memory.
- Fixed typed properties
- Improved Document API
- Fixed bug with ProcessDOMConnection() not working with the bool flag set to true.
- Fixed FBX skinning not deforming for more than one single mesh
- Fixed FBX skeleton mapping and skin mapping not being applied properly (now retrieved from document skin list)
- Fixed set_bone_pose being used in final version()
- Fixed material properties exceeding 1.0.
- FBX Document parser revamped to use safe memory practices, and with graceful error messages.
- ScopePtr, TokenPtr and various internal types have been fleshed out to use proper typedefs across the codebase.
- Fixed memory leaks caused by token cleanup failing (now explicit cleanup step, no shared_ptr, etc)
- Fixed bug with PropertyTable not reading all properties and not cleaning up properly.
- Fixed smoothing groups not working
- Fixed normal duplications
- Fixed duplication check for pre-existing coordinates.
- Fixed performance of vertex lookup in large meshes being slow, using lookup table separate to the data for indexing, this reduces import time from 10 minutes of bistro down to 30 seconds.
- Fixed includes requiring absolute path in headers and cpp files using CPPPath.

Bugs/Features wish list:
- locator bones
- quat anim key interpolation (most fbx maya files have euler rotations from blender and maya, nobody uses this)
- some rigs skins scale up when SSC enabled inconsistently per bone
- some skins can disappear entirely
- material mapping needs expanded, but this will be done for 4.0 as it requires rewrite.

Workarounds for issues found until we patch them:
- mesh -> clear skin can resolve most of the bugs above.
- locators can be worked around by removing them before exporting your rig.
- some material properties wont always import, this is okay to override in the material properties.

**If you are having issues or need support fear not!**
Please provide minimal rigs which can reproduce issues as we can't spend a lot of time investigating each rig. We need a small example which breaks and we can then sort the problem. In some cases this is not possible so its okay to privately send models to us via IRC or a ticket and we can provide an email address, we won't reveal or disclose privately sent rig files to any companies, or to companies I work for, they will not be shared, only tested and bugs will be drawn up from the conclusions. Also include identifying information about what you did and how it didn't work. Please file each file separately in a bug report, unless the problem is the same.
This was sponsored by IMVU, and a special thanks to everyone who supported this project.

Signed-off-by: Gordon MacPherson <gordon@gordonite.tech>
2020-10-30 15:59:19 +00:00
volzhs 4e720c064e
Update freetype to 2.10.4
(cherry picked from commit 42959d54ff)
2020-10-28 14:05:40 +01:00
Rémi Verschelde 64b0f5db40
zstd: Update to upstream version 1.4.5
(cherry picked from commit 914591c9ae)
2020-09-24 14:43:11 +02:00
Rémi Verschelde 8a97e65297
tinyexr: Sync with upstream 1.0.0
(cherry picked from commit fa35f53dd2)
2020-09-24 14:43:11 +02:00
Fabio Alessandrelli 48de626949
Update mbedTLS to version 2.16.8 (+ patch).
(cherry picked from commit a905764e3d)
2020-09-08 08:56:33 +02:00
Rémi Verschelde f922452e90 stb_vorbis: Update to upstream version 1.20
Upstreams our crash fixes from #38422 and #40174.

(cherry picked from commit 8dffca4196)
2020-07-24 10:31:57 +02:00
Fabio Alessandrelli 67313c681d Reorganize ENet pactches.
(cherry picked from commit 32fbe37ab4)
2020-07-15 12:48:18 +02:00
Fabio Alessandrelli 18eddfc98d Funnel refuse_new_connections to Godot ENet.
(cherry picked from commit 7ec5c917d1)
2020-07-15 12:48:18 +02:00
Rémi Verschelde 9c68989cf2 stb_vorbis: Add missing error checks in comment reading mallocs
Backported from https://github.com/nothings/stb/pull/989.

Fixes #40164.

(cherry picked from commit 24a01c0d39)
2020-07-08 09:01:57 +02:00
Fabio Alessandrelli 45b1234a82 Update to wslay 1.1.1 .
A minor fix, but let's stay in sync.

(cherry picked from commit d988b0d1a3)
2020-07-03 15:34:30 +02:00
Fabio Alessandrelli 9d25668339 Update to mbedtls 2.16.7
(cherry picked from commit 8ddf9fe4b0)
2020-07-03 15:34:30 +02:00
Rémi Verschelde b4f710c6d8 thirdparty: List release years in README.md
And expand commit hashes to full hashes instead of shortened ones.

(cherry picked from commit 959ffd5979)
2020-07-03 15:34:30 +02:00
Rémi Verschelde 44a516986d
Merge pull request #39084 from madmiraal/backport-37314
[3.2] Better damping implementation for Bullet rigid bodies
2020-07-02 13:26:03 +02:00
Rémi Verschelde 1bd51883c0 xatlas: Sync with upstream 470576d
(cherry picked from commit 59780fd046)
2020-06-04 11:15:06 +02:00
Marcel Admiraal 5d8b0649be Apply old method for linear & angular damping in Bullet, in order to
make it easier to tweak and consistent with Godot Physics.

Include patch applied to Bullet master to enable dampings greater than 1.
2020-05-27 17:53:43 +01:00
Rémi Verschelde 2cf6624965 FastLZ: Update to upstream version 0.5.0
Upstream development restarted after 13 years. Changes:

2020-02-02: Version 0.5.0

    Minor speed improvement on the decompressor.
    Prevent memory violation when decompressing corrupted input.

2020-01-10: Version 0.4.0

    Only code & infrastructure clean-up, no new functionality.

(cherry picked from commit 5167c9186a)
2020-05-25 11:46:03 +02:00
Pedro J. Estébanez 75f6d2ef32 Remove no longer needed patches to jpgd.cpp
(cherry picked from commit abe03ff1f0)
2020-05-19 10:19:52 +02:00
Rémi Verschelde 938a9c95d0 freetype: Update to upstream version 2.10.2
(cherry picked from commit 9c1b20eab6)
2020-05-11 11:12:39 +02:00
Rémi Verschelde d09036992c jpgd: Fix detection of SSE2 support with MSVC
The previous code would always use SSE2 intrinsics, which is not valid
on UWP ARM platforms (and likely not on some x86 platforms either).

The patch has been submitted upstream too:
https://github.com/richgel999/jpeg-compressor/pull/13

(cherry picked from commit 3806efbaa7)
2020-05-07 13:33:39 +02:00
Marcel Admiraal f8b06c8a5c Fix scale calculation in VHACD Volume::Voxelize().
(cherry picked from commit 75553c4f90)
2020-05-06 23:31:18 +02:00
Rémi Verschelde ef715f37d5
Merge pull request #35091 from Faless/dtls/enet
[3.2] DTLS support + optional ENet encryption
2020-05-05 13:40:59 +02:00
Pedro J. Estébanez 97ffd1f8ae Fix crash in stb_vorbis.c
(cherry picked from commit d259094c3a)
2020-05-04 16:10:22 +02:00
Rémi Verschelde e3d913c79a tinyexr: Sync with upstream 4dbd05a
(cherry picked from commit 3a80fce8be)
2020-05-01 11:02:50 +02:00
Rémi Verschelde 8d394f6c01 Recast: Update to upstream commit 57610fa (2019)
(cherry picked from commit 6ba546f98b)
2020-05-01 11:02:29 +02:00
Rémi Verschelde 8730722a74 pcre2: Update to upstream version 10.34
Changelog: https://vcs.pcre.org/pcre2/code/tags/pcre2-10.34/ChangeLog?view=markup
(cherry picked from commit 824736d271)
2020-05-01 11:01:57 +02:00
Rémi Verschelde f43bbc0f4b stb_vorbis: Update to upstream version 1.19
1.19 - 2020-02-05 - warnings
1.18 - 2020-02-02 - fix seek bugs; parse header comments; misc
                    warnings etc.

(cherry picked from commit 8ce7dce511)
2020-05-01 11:01:47 +02:00