Commit graph

2313 commits

Author SHA1 Message Date
clayjohn 8da3c739bf Add high quality glow mode 2020-08-31 23:16:41 -07:00
Rémi Verschelde 33b2070d2e Remove obsolete GLES2 backend code
This code currently isn't compiled (and cannot compile).

We plan to re-add OpenGL ES-based renderer(s) in Godot 4.0 alongside Vulkan
(probably ES 3.0, possibly also a low-end ES 2.0), but the code will be quite
different so it's not relevant to keep this old Godot 3.2 code.

The `drivers/gles2` code from the `3.2` branch can be used as a reference for
a potential new implementation.
2020-08-13 10:04:53 +02:00
bruvzg d6e3a8a137
[macOS] Fix crash on failed fork. 2020-08-11 17:45:09 +03:00
Rémi Verschelde 3b340985cc SCons: Support linking system Vulkan loader while using vendored VMA 2020-07-26 13:20:08 +02:00
Sergey Minakov fe60815d66 iOS SCons: static Vulkan binary usage
Add VMA to iphone platform Use linkflag for iphone building to enforce static linking. Works fine with dynamic '.framework' library
Updated xcode project to use '.a' static library
2020-07-25 21:55:25 +02:00
Rémi Verschelde dfdfee04df Vulkan: Fix struct init for VkClearAttachment
The changes from #38835 were not sufficient to fix #38829, as VkClearAttachment
still had uninitialized member structs in its VkClearColor member struct.

The struct rabbit hole goes deep and trying to do validation as done in #38829
doesn't appear realistic.
2020-07-22 16:31:22 +02:00
Rémi Verschelde f54fd5ac10
Merge pull request #38835 from madmiraal/fix-38829
Fix may be used unitialized warnings in _render_pass_create() and  _draw_list_insert_clear_region().
2020-07-22 16:12:54 +02:00
Rémi Verschelde a5fb445121
Merge pull request #40450 from asmaloney/spelling
Fix spelling & grammar in comments, docs, and messages
2020-07-21 22:14:04 +02:00
Andy Maloney 4dda62f591 Fix spelling & grammar in comments, docs, and messages 2020-07-21 15:17:23 -04:00
Andy Maloney 8b949918b1 Fix spelling of a var, a struct, and message output 2020-07-17 12:02:06 -04:00
bruvzg 996910b627
Add error messages if Vulkan init failed, prevent Vulkan context freeing uninitialized device and instance. 2020-07-13 19:24:21 +03:00
Rémi Verschelde dcd11faad3
Merge pull request #40253 from madmiraal/add-override-keywords
Add override keywords.
2020-07-10 21:04:23 +02:00
Yuri Roubinsky ecb5f7ea23 Added 'fma' function to shader language 2020-07-10 19:58:03 +03:00
Marcel Admiraal 26fcf2b04c Add override keywords. 2020-07-10 13:56:54 +01:00
Johan Rastén e7e632cbed Handle 16 bit PNG files in sRGB format 2020-07-09 21:01:06 +02:00
PouleyKetchoupp e19a3df98f Fixed mesh data access errors in GLES2
1. Removed errors in mesh_surface_get_array as it's supported now
2. More accurate errors in mesh_surface_get_blend_shapes
2020-07-09 13:41:57 +02:00
Nathan Franke 09aeb7706b
Fix Directory Open Check 2020-07-06 11:32:05 -05:00
Rémi Verschelde 9000e59650
Merge pull request #40016 from akien-mga/environment-code-cleanup
Environment: Refactor code for readability + more
2020-07-01 16:28:48 +02:00
Rémi Verschelde a8a2769bb6
Merge pull request #38713 from aaronfranke/string-64bit
Make all String integer conversion methods be 64-bit
2020-07-01 16:01:05 +02:00
Rémi Verschelde 372136fe75 Environment: Refactor code for readability + more
- Makes all boolean setters/getters consistent.
- Fixes bug where `glow_hdr_bleed_scale` was not used.
- Split CameraEffects to their own source file.
- Reorder all Environment method and properties declarations,
  definitions and bindings to be consistent with each other
  and with the order of property bindings.
- Bind missing enum values added with SDFGI.
- Remove unused SDFGI enhance_ssr boolean.
- Sync doc changes after SDFGI merge and other misc changes.
2020-07-01 14:44:45 +02:00
Yuri Roubinsky c554d9e556 Added const qualifier support for function arguments in shaders 2020-07-01 12:55:00 +03:00
Fabio Alessandrelli eb2121d513 Fix RasterizerDummy after SDF GI changes.
Re-enable JavaScript CI.
2020-06-30 21:05:49 +02:00
Juan Linietsky 201d606b3d Addition of SDFGI for open world global illumination
Move GI to a deferred pass
2020-06-26 11:06:48 -03:00
Rémi Verschelde 4b5b60de85
Merge pull request #39189 from touilleMan/issue-38925
Unify OS.get_system_time_* and OS.get_unix_time
2020-06-15 23:57:16 +02:00
Yuri Roubinsky 1a7e101324 Fix shader's length() function parsing in expressions 2020-06-03 19:39:48 +03:00
Rémi Verschelde 5e62a2ee75 Vulkan: Initialize struct members on declaration
Supersedes and closes #38945.
2020-06-03 13:18:22 +02:00
Aaron Franke bb8aa107fd
Remove 32-bit String to_int method 2020-06-03 00:03:34 -04:00
Emmanuel Leblond c6de3872f9
Remove OS.get_system_time_secs/get_system_time_msecs and change OS.get_unix_time return type to double 2020-05-31 14:19:31 +02:00
Nathan Franke e48fb01d59
fix(Directory): remove erasing print
Fixes #39106
2020-05-28 05:46:01 -05:00
CJ DiMaggio 66a294d459 Delete DummyMesh when RasterizerStorageDummy is freed 2020-05-20 21:23:37 -04:00
Marcel Admiraal 19d3e17f01 Fix may be used unitialized warnings in _render_pass_create()
and  _draw_list_insert_clear_region()
2020-05-19 04:14:57 +01:00
Fabio Alessandrelli 90c7102b51 Move mix_rate, ouput_latency to AudioDriverManager
Each driver used to define the (same) project settings values
`audio/mix_rate` and `audio/output_latency`, but the setting names are
not driver specific.
Overriding is still possible via platform tags.
2020-05-18 13:02:06 +02:00
Rémi Verschelde 4f23215395
Merge pull request #38750 from madmiraal/fix-vulkan-uninitialized-warning
Silence mulitple may be used uninitialized warnings in RenderingDeviceVulkan::uniform_set_create()
2020-05-15 18:02:56 +02:00
Marcel Admiraal 8f0b3392c3 Silence mulitple may be used uninitialized warnings in
RenderingDeviceVulkan::uniform_set_create()
2020-05-15 11:48:06 +01:00
Rémi Verschelde 0ee0fa42e6 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
2020-05-14 21:57:34 +02:00
Rémi Verschelde 07bc4e2f96 Style: Enforce separation line between function definitions
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
  -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
  -o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```

This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.

This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde 0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
Rémi Verschelde dcd1151d77 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
2020-05-14 13:45:01 +02:00
Rémi Verschelde 1f6f364a56 Port member initialization from constructor to declaration (C++11)
Using `clang-tidy`'s `modernize-use-default-member-init` check and
manual review of the changes, and some extra manual changes that
`clang-tidy` failed to do.

Also went manually through all of `core` to find occurrences that
`clang-tidy` couldn't handle, especially all initializations done
in a constructor without using initializer lists.
2020-05-14 10:01:56 +02:00
Fabio Alessandrelli 2dbd227c9a Fix DummyRenderer after new lightmapper merge. 2020-05-11 18:26:06 +02:00
Rémi Verschelde 32133a11b5
Merge pull request #38386 from reduz/new-lightmapper
New GPU lightmapper
2020-05-11 13:45:48 +02:00
Juan Linietsky 1bea8e1eac New lightmapper
-Added LocalVector (needed it)
-Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too)
-Fixes and changes all around the place
-Added library for 128 bits fixed point (required for Delaunay3D)
2020-05-10 15:59:09 -03:00
Fabio Alessandrelli 11a81341fa Restore RasterizerDummy. 2020-05-10 18:19:23 +02:00
Rémi Verschelde 69de7ce38c Style: clang-format: Disable AllowShortCaseLabelsOnASingleLine
Part of #33027.
2020-05-10 13:13:54 +02:00
Rémi Verschelde e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Pedro J. Estébanez f7706659b5 Improve shader time roll over
- Resurrect it for GL ES 2
- Add it to the Vulkan rasterizer
- Expose the setting from the `RenderingServer`, since it does not belong in any specific rasterizer
2020-04-30 11:42:11 +02:00
Rémi Verschelde 0bf6a86db4
Merge pull request #37795 from Chaosus/shader_fix_const_order2
Fix shader constant sorting
2020-04-29 09:41:34 +02:00
bruvzg b5caa2e8b0
[Vulkan] Use VK_LAYER_KHRONOS_validation instead of deprecated VK_LAYER_LUNARG_standard_validation. 2020-04-26 16:47:25 +03:00
Rémi Verschelde 2074b43c6f
Merge pull request #36083 from Calinou/dummy-loader-add-extensions
Add more extensions to the dummy texture loader
2020-04-23 12:05:38 +02:00
Juan Linietsky f8ef38efed Add proper type to most public API uses of Array 2020-04-21 12:16:45 -03:00