Commit graph

252 commits

Author SHA1 Message Date
reduz 7008e3c6ea Shader optimizations to reduce VGPR usage and increase occupancy 2021-01-19 23:31:02 +01:00
Rémi Verschelde 0b409d89d0
Merge pull request #45136 from akien-mga/clang-format-11
CI: Update to clang-format 11 and apply ternary operator changes
2021-01-13 16:10:44 +01:00
Rémi Verschelde af878716f2
CI: Update to clang-format 11 and apply ternary operator changes 2021-01-12 19:32:53 +01:00
Yuri Roubinsky ef941a6500 Renamed emit_particle to emit_subparticle shader function 2021-01-12 09:41:08 +03:00
Yuri Roubinsky fcc5d67b03 Fix shader uniform instances compilation 2021-01-11 17:46:33 +03:00
Rémi Verschelde a33dc4274c
Merge pull request #45066 from Chaosus/shader_fix_uniform_crash
Prevent editor crash due to modify the order of non-instance shader uniforms by instance uniforms
2021-01-11 14:58:55 +01:00
Yuri Roubinsky 289cc89a39 Prevent crash due to assigning incorrect order of instance uniform 2021-01-10 10:52:30 +03:00
Yuri Roubinsky fdfddbdc3c Fix LIGHT compilation for canvas shader 2021-01-09 23:22:59 +03:00
reduz cdb216f4e4 Added ability to visualize native shaders 2021-01-06 09:40:09 -03:00
reduz 446618cf94 Change the light attenuation formulas.
-Much better looking, physically based.
-Almost negligible extra cost.
2021-01-05 14:44:05 -03:00
reduz 77bc3e9ac3 Threaded optimizations to cull and render
-Reorganize thread work pool for rendering
-Fixes to make secondary command buffers to work (disabled because they need more testing)
2021-01-05 08:50:18 -03:00
reduz 5d2a1d7892 Rewrite render code to be more cache and thread friendly. 2021-01-05 08:50:18 -03:00
reduz 9a2f18f8e7 Reorganize renderer code.
So it can hopefully be made more cache efficient afterwards.
2021-01-05 08:50:18 -03:00
Rémi Verschelde 00f5ea2ed2
Merge pull request #44842 from clayjohn/VULKAN-SSAO-2
SSAO renames and move push constant binding
2021-01-04 23:03:54 +01:00
Hendrik Brucker ec6fc059b7 fix inconsistent normal map shader variable naming 2021-01-04 14:08:01 +01:00
Rémi Verschelde a408622c06
Merge pull request #44530 from clayjohn/VULKAN-framebuffer-error
Use basic uniform set for depth prepass
2021-01-04 09:34:27 +01:00
clayjohn 0015260c4b SSAO cleanup and fixes 2021-01-03 21:32:22 -08:00
Muller-Castro 31dd07ba30 Typo correction
simple typo correction
2021-01-02 02:27:12 -03:00
Rémi Verschelde b5334d14f7
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 🎆
2021-01-01 20:19:21 +01:00
Marcel Admiraal b4a190e0bc Consistently use normal_map 2020-12-29 08:04:19 +00:00
Rémi Verschelde 6cebb8c117
Merge pull request #44586 from madmiraal/rename-stepify
Rename Math::stepify to snapped
2020-12-28 21:46:43 +01:00
Rémi Verschelde 058f3fe069
Merge pull request #44149 from madmiraal/rename-tangent-orthogonal
Rename Vector2.tangent() to Vector2.orthogonal()
2020-12-28 16:00:12 +01:00
Marcel Admiraal b743a2ef3c Rename Math::stepify to snapped 2020-12-28 13:01:30 +00:00
Marcel Admiraal 5b937d493f Rename empty() to is_empty() 2020-12-28 10:39:56 +00:00
Rémi Verschelde 1f7d6ba736
Merge pull request #44715 from clayjohn/VULKAN-SSAO-cleanup
Cleanup leftover functions from adding SSAO
2020-12-27 10:53:23 +01:00
Yuri Roubinsky ef4e625918
Merge pull request #44705 from Chaosus/shader_fix_array_postinit
Fix using post-init shader array constructors
2020-12-27 08:26:31 +03:00
clayjohn 34cfe1cc40 Cleanup leftover functions from adding SSAO 2020-12-26 16:33:07 -08:00
reduz 548524152e Rewrite culling to be more cache/thread friendly.
-Uses a single array with all data
-Massive performance improvement
-Does not support threads yet, but code is now thread friendly
2020-12-26 19:11:33 -03:00
Yuri Roubinsky bc0e8e7a21 Fix using post-init shader array constructors 2020-12-27 01:07:24 +03:00
Yuri Roubinsky fb16b1e39b
Merge pull request #44436 from Chaosus/shader_const_switch
Added support for constants in shader `case` and array size declaration
2020-12-27 00:55:45 +03:00
Juan Linietsky 545c894614
Merge pull request #44656 from reduz/cull-fixes-and-optimizations
Cull fixes and optimizations
2020-12-24 14:01:19 -03:00
Rémi Verschelde ecda989c85
Merge pull request #44649 from lyuma/bone_aabb_blendshapes
Fix blendshapes and calculation of bone_aabbs
2020-12-24 17:20:07 +01:00
reduz 1bebb2ba05 Cull fixes and optimizations 2020-12-24 12:18:28 -03:00
lawnjelly 6d687de9b8 Fix BVH to world_aabb, and call update
The calls to the BVH need to use the world space AABB, rather than local space for it to work. Also, update was not being called which is required to update the AABB as objects move.
2020-12-24 11:19:50 +00:00
Rémi Verschelde 6063af6788
Merge pull request #44641 from reduz/get-frame-setup-time
Add API to get frame setup time on CPU
2020-12-24 10:07:54 +01:00
Lyuma d976003b16 Fix blendshapes and calculation of bone_aabbs
Blendshapes without a skeleton already worked.
However, due to a faulty ERR_FAIL_COND, it was impossible to create a mesh with both bones and blendshapes.
This also fixes an assumption that all surfaces reference the same number of bones as surface 0.
2020-12-24 00:01:07 -08:00
clayjohn 3a8c99a10b Use basic uniform set for depth prepass 2020-12-23 20:23:51 -08:00
reduz 7219f37cb5 Add API to get frame setup time on CPU
Needed for benchmarks
2020-12-24 00:13:52 -03:00
reduz 83058597cf Replace Octree by DynamicBVH in cull code
-Much greater pairing/unpairing performance
-For now, using it for culling too, but this will change in a couple of days.
-Added a paged allocator, to efficiently alloc/free some types of objects.
2020-12-23 19:31:30 -03:00
Marcel Admiraal 4b8b803931 Rename Control margin to offset 2020-12-23 06:25:56 +00:00
Rémi Verschelde 6e43c68e40
Merge pull request #44182 from clayjohn/ASSAO
Replace SAO with ASSAO as Godot's new SSAO
2020-12-22 11:27:25 +01:00
clayjohn 44f8922305 Port ASSAO to Godot to replace SAO 2020-12-21 23:08:59 -08:00
Marcel Admiraal efea408d23 Ensure default value in _render_shadow is the same as parent
Use double instead of int for the p_lod_distance_multiplier default value in
RendererSceneRenderForward::_render_shadow to match parent default value in
RendererSceneRenderRD::_render_shadow
2020-12-21 09:36:20 +00:00
Rémi Verschelde e9d12f9e4e
Merge pull request #44521 from madmiraal/rename-rect2-clip
Rename Rect2 and Rect2i clip() to intersection()
2020-12-19 21:32:14 +01:00
Rémi Verschelde 2797c2a74c
Merge pull request #33207 from Calinou/increase-camera-default-zfar
Increase the default Camera Zfar to 4000
2020-12-19 15:32:32 +01:00
Hugo Locurcio 7ae487d2bb
Increase the default Camera Zfar to 4000
This makes it possible to view far away objects without
having to tweak any settings. This results in a more usable
editor when working on large-scale levels.

This change should have no impact on performance, but note that
Z-fighting will be visible at a distance. This can be made less
visible by increasing the Znear value (however, doing so will cause
nearby surfaces to disappear).

This change was also applied to the editor, but it will only
apply to newly created scenes.

This also changes the default camera settings in the glTF importer
to match the Camera node's defaults.
2020-12-19 14:52:44 +01:00
reduz 666d5f3431 Fix error spam on wrong attachment
-For now, disable reading from depth this was always broken, needs to be fixed later
-Give better error showing binding and set when this happens.
2020-12-19 10:18:08 -03:00
Marcel Admiraal 2df9a8ccad Rename Rect2 and Rect2i clip() to intersection() 2020-12-19 12:59:08 +00:00
reduz 7bf90c7888 Improved shadow rendering efficiency
-Do not bind attributes that are not needed
-Improve a bit more how meshoptimizer interacts with Godot
2020-12-18 19:47:32 -03:00
reduz d2302f53d6 Implement automatic LOD (Level of Detail)
-Happens on import by default for all models
-Just works (tm)
-Biasing can be later adjusted per node or per viewport (as well as globally)
-Disabled AABB.get_support test because its broken
2020-12-18 15:48:03 +01:00