Commit graph

2424 commits

Author SHA1 Message Date
Rémi Verschelde
aa3a5c9f6a
Merge pull request #50184 from JFonS/cpu_lightmapper_soft_shadows
[3.x] Add soft shadows to the CPU lightmapper
2021-07-14 12:18:08 +02:00
uuuuuup
0dc0a4a523 fix 3D scene not rendered on GLES3 HTML5 export
fix pad size of SceneDataUBO
2021-07-08 22:03:03 +09:00
Bastiaan Olij
34d9b6140b Add precision to view_index 2021-07-08 10:47:07 +10:00
Hugo Locurcio
3b11b1022d
Remove unused code related to Travis CI
(cherry picked from commit 257a8a337e)
2021-07-06 11:19:56 +02:00
JFonS
a2ba7910ba Add soft shadows to the CPU lightmapper
Adds the "light_size" property to Lights. It's only considered in baked
lightmaps for soft shadowing purposes.
2021-07-05 19:02:35 +02:00
Hugo Locurcio
a28a4ef98a
Decrease opacity of the overdraw debug draw mode
This allows distinguishing higher amounts of overlapping objects.
2021-07-04 00:23:06 +02:00
Marcel Admiraal
8788472b8c Clear glErrors instead of crashing when initializing GLES3 2021-06-21 17:53:24 +01:00
Marcel Admiraal
7e03bd1671 Remove duplicate WARN_PRINTS macro 2021-06-18 12:57:59 +01:00
Rémi Verschelde
465ab36ddf
Merge pull request #49653 from madmiraal/remove-err_prints-3.x
[3.x] Remove duplicate ERR_PRINTS macro
2021-06-16 17:33:22 +02:00
Marcel Admiraal
5a58516231 Remove duplicate ERR_PRINTS macro 2021-06-16 11:56:25 +01:00
Hugo Locurcio
9be9304238
Improve the console error logging appearance
This makes secondary information less visually prominent to improve
overall readability.

Various loggers were also tweaked for consistency.
2021-06-13 19:18:09 +02:00
Rémi Verschelde
c45ce768b1
Merge pull request #47854 from mortarroad/3.x-lossless-webp
[3.x] Implement lossless WebP encoding
2021-06-11 19:35:47 +02:00
Morris Tabor
5de08ef1d6 Implement lossless WebP encoding 2021-06-11 18:48:04 +02:00
Chuck
17ee8ff0d9 Support multiple address resolution in DNS requests
Add two new functions to the IP class that returns all addresses/aliases associated with a given address.

This is a cherry-pick merge from 010a3433df which was merged in 2.1, and has been updated to build with the latest code.

This merge adds two new methods IP.resolve_hostname_addresses and IP.get_resolve_item_addresses that returns a List of all addresses returned from the DNS request.
2021-06-09 12:06:46 +07:00
Rémi Verschelde
32047ffd9c
FileAccess: Don't err in store_buffer with buffer of size 0
The error check was added for `FileAccessUnix` but it's not an error when both
`p_src` and `p_length` are zero.

Added correct error checks to all implementations to prevent the actual
erroneous case: `p_src` is nullptr but `p_length > 0` (risk of null pointer
indexing).

Fixes #33564.

(cherry picked from commit 01d5c463be)
2021-06-07 22:36:07 +02:00
Pedro J. Estébanez
612986ab0a
Fix crash when using ALSA MIDI with PulseAudio
(cherry picked from commit 958d79828b)
2021-06-03 12:24:57 +02:00
bruvzg
462e57f5e6
Fix Directory::get_space_left() result on macOS and Linux.
(cherry picked from commit 1d7a63fb8f)
2021-06-01 12:53:31 +02:00
Rémi Verschelde
b94b09cd19
Merge pull request #46860 from bruvzg/symlinks_and_macos_gdn_framework_export 2021-05-24 15:15:10 +02:00
bruvzg
53f05c9167
Add GDNative Framework loading and export support. 2021-05-24 12:50:18 +03:00
lawnjelly
17a51b3a9e Batching - fix item_batch_flags stale state
Fixes bdata.joined_item_batch_flags not being kept up to date during the rendering pass.
2021-05-23 12:39:15 +01:00
bruvzg
6aa8f7d85b
Add symlink API to the DirAccess (on macOS and Linux). 2021-05-22 17:36:16 +03:00
Rémi Verschelde
eb78f80f03
Fix typos with codespell
Using codespell 2.0.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
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
```
2021-05-20 12:56:56 +02:00
Rémi Verschelde
330ddc37b6
Merge pull request #48075 from lyuma/varying_fragment_to_light_3.4 2021-05-18 10:53:34 +02:00
Pedro J. Estébanez
817ffc01e1
Make all file access 64-bit (uint64_t)
This changes the types of a big number of variables.

General rules:
- Using `uint64_t` in general. We also considered `int64_t` but eventually
  settled on keeping it unsigned, which is also closer to what one would expect
  with `size_t`/`off_t`.
- We only keep `int64_t` for `seek_end` (takes a negative offset from the end)
  and for the `Variant` bindings, since `Variant::INT` is `int64_t`. This means
  we only need to guard against passing negative values in `core_bind.cpp`.
- Using `uint32_t` integers for concepts not needing such a huge range, like
  pages, blocks, etc.

In addition:
- Improve usage of integer types in some related places; namely, `DirAccess`,
  core binds.

Note:
- On Windows, `_ftelli64` reports invalid values when using 32-bit MinGW with
  version < 8.0. This was an upstream bug fixed in 8.0. It breaks support for
  big files on 32-bit Windows builds made with that toolchain. We might add a
  workaround.

Fixes #44363.
Fixes godotengine/godot-proposals#400.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2021-05-16 17:52:31 +02:00
Lyuma
fba6b62054 Backport dd0874e "Allow passing varying from fragment to light shader function" to 3.4 2021-05-14 11:28:48 -07:00
Lyuma
0c028ad96e Backport bc0e8e7 "Fix using post-init shader array constructors" to 3.4 2021-05-14 11:28:48 -07:00
Lyuma
25016bf715 Backport 6b99bda "Added support for arrays as shader struct members" to 3.4 2021-05-14 11:28:48 -07:00
Lyuma
fc6bee0750 Backport 6f16239 "Implementation of struct for shaders" to 3.4 2021-05-14 11:28:48 -07:00
R. Alex Hofer
5eff9569c6
Handle having no sinks in the PulseAudio driver.
Also make PulseAudio errors more verbose.

(cherry picked from commit 65a10f4db5)
2021-05-14 10:16:32 +02:00
lawnjelly
3c68a6d37f Batching - fallback for 2d skinning with unrigged polys.
In the legacy renderer unrigged polys would display with no transform applied, whereas the software skinning didn't deal with these at all (outputted them with position zero). This PR simply copies the source to destination verts and replicates the legacy behaviour.
2021-05-11 17:34:14 +01:00
paru
eed4655644 Fixed usage of proxy textures on GLES2 sky 2021-05-07 18:33:35 +02:00
paru
8b0d3657e5 Added CPU blendshapes for GLES2 2021-05-06 20:52:34 +02:00
Rémi Verschelde
140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Bastiaan Olij
8f8c9c2f57 Add VIEW_INDEX variable in shader so we know which eye/view we're rendering for 2021-05-05 16:22:03 +10:00
Rémi Verschelde
de3168ffa3
Merge pull request #48457 from briansemrau/fix-polygon-rotation-batched
Fix polygon rotation with batching
2021-05-04 18:12:03 +02:00
Brian Semrau
57e3f357dc Batching fix polygon basis polarity
Changes based on fix in #46898
2021-05-04 10:48:58 -04:00
Rémi Verschelde
b4af1eba0a
Style: Enforce use of bool literals instead of integers
Using clang-tidy's `modernize-use-bool-literals`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
2021-05-04 16:39:13 +02:00
Rémi Verschelde
a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde
b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde
64a63e0861
Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
3d15f04668
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine 2021-05-04 14:45:15 +02:00
Rémi Verschelde
6e600cb3f0
Style: Set clang-format Standard to c++14 2021-05-04 14:45:15 +02:00
lawnjelly
f33e22001f Fix 2d software skinning relative transforms
All my earlier test cases for software skinning had the polys parent transform to be identity. This works fine until you had cases where the user had moved the transform of the parent nodes of skinned polys.

This PR fixes this situation by taking into account the final (concatenated) transform of the polys RELATIVE to the skeleton base transform. It does this by applying the inverse skeleton base transform to the poly final transform.
2021-05-03 14:11:41 +01:00
Rémi Verschelde
e94161dada
SCons: Add explicit dependencies on thirdparty code in cloned env
Since we clone the environments to build thirdparty code, we don't get an
explicit dependency on the build objects produced by that environment.

So when we update thirdparty code, Godot code using it is not necessarily
rebuilt (I think it is for changed headers, but not for changed .c/.cpp files),
which can lead to an invalid compilation output (linking old Godot .o files
with a newer, potentially ABI breaking version of thirdparty code).

This was only seen as really problematic with bullet updates (leading to
crashes when rebuilding Godot after a bullet update without cleaning .o files),
but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.

(cherry picked from commit c7b53c03ae)
2021-04-29 16:57:00 +02:00
Rémi Verschelde
70ae90e0e8
Core: Drop custom copymem/zeromem defines
We've been using standard C library functions `memcpy`/`memset` for these since
2016 with 67f65f6639.

There was still the possibility for third-party platform ports to override the
definitions with a custom header, but this doesn't seem useful anymore.

Backport of #48239.
2021-04-29 12:34:11 +02:00
Fabio Alessandrelli
bfe182f221
[Net] Fix socket poll timeout on Windows.
Now correctly computes the timeout value in milliseconds.

(cherry picked from commit 46f7b0f74b)
2021-04-29 12:28:31 +02:00
Rémi Verschelde
25b170599b
Merge pull request #47129 from mortarroad/3.x-fix-directional-light-order
Fix draw order of transparent materials with multiple directional lights
2021-04-28 19:03:37 +02:00
Rémi Verschelde
135fd8ff8c
Merge pull request #34008 from ricmzn/fix-viewport-texture-flags
GLES3: Allow repeat flag in viewport textures
2021-04-28 17:04:47 +02:00
Rémi Verschelde
e9efc349ac
Merge pull request #47582 from clayjohn/GLES3-fix-multimesh-modulate
Fix multimesh being colored by other nodes GLES3
2021-04-28 17:02:00 +02:00
Rémi Verschelde
6cb61b67e6
Merge pull request #41471 from Calinou/giprobe-deprecate-compress-3.2 2021-04-28 12:01:55 +02:00