Commit Graph

2584 Commits

Author SHA1 Message Date
Thaddeus Crews
7f6b272b28
Merge pull request #99163 from clayjohn/Mobile-normal-interp
Normalize normal, tangent, and binormal before interpolating in the mobile renderer to avoid precision errors on heavily scaled meshes
2024-11-14 14:52:02 -06:00
clayjohn
2c158c386b Normalize normal tangent and binormal before interpolating in the mobile renderer to avoid precision errors on heavily scaled meshes 2024-11-13 12:24:28 -08:00
Thaddeus Crews
76fa7b2914
Merge pull request #99066 from DarioSamo/rd-transfer-worker-deadlock-fix
Give the barrier pool its own mutex to avoid a deadlock with transfer workers.
2024-11-13 08:34:36 -06:00
Thaddeus Crews
e71a52dff7
Merge pull request #99073 from DarioSamo/rd-graph-dependency-fix
Improve graph's detection of intersection between draw lists.
2024-11-13 08:33:52 -06:00
Thaddeus Crews
74645109c4
Merge pull request #98767 from jadeharley2/master
Fix inability to set TextureLayeredRD as `TEXTURE_TYPE_CUBE` or `TEXTURE_TYPE_CUBE_ARRAY`
2024-11-11 14:18:29 -06:00
Thaddeus Crews
e5b77b184f
Merge pull request #98755 from Chaosus/shader_compiler_fix_struct_member_names
Add prefix to struct member names in shader compiler
2024-11-11 14:18:23 -06:00
Dario
a8269820b9 Improve graph's detection of intersection between draw lists. 2024-11-11 11:59:47 -03:00
Dario
bf8ecd3a9d Give the barrier pool its own mutex to avoid a deadlock with transfer workers. 2024-11-11 10:31:12 -03:00
jadeharley2
a4d1d36c85 Fix inability to set TextureLayeredRD as TEXTURE_TYPE_CUBE or TEXTURE_TYPE_CUBE_ARRAY 2024-11-11 15:31:43 +03:00
Thaddeus Crews
9dfb36ca0c
Merge pull request #98549 from Chaosus/shader_renderer_states
Add renderer state defines to shader preprocessor
2024-11-10 12:13:04 -06:00
Thaddeus Crews
3cff32a92d
Merge pull request #98910 from darksylinc/matias-id_arm32
Force `RDD::id` to be always `uint64_t`
2024-11-10 12:12:53 -06:00
Thaddeus Crews
2b02143d35
Merge pull request #98307 from clayjohn/Light2D-shadow-projection
Precompute projection matrices when rendering 2D shadows
2024-11-10 12:12:14 -06:00
Matias N. Goldberg
e69a0c7d60 Force RID::id to be always uint64_t
On Vulkan, some handles are meant to always be u64, even on 32-bit
architectures such as arm32.

Fixes #98654
2024-11-06 20:03:56 -03:00
Thaddeus Crews
88d9903f6d
Merge pull request #86138 from EnlightenedOne/master
Fix Frustum Sky projection translation logic shearing
2024-11-04 21:52:07 -06:00
Thaddeus Crews
2450dee1bc
Merge pull request #93401 from Repiteo/style/clang-tidy-fixes
Style: Apply `clang-tidy` fixes
2024-11-04 21:52:05 -06:00
Thaddeus Crews
2b49543478
Merge pull request #98709 from darksylinc/matias-upsidedown-splash
Fix splash screen upside down on Android
2024-11-04 21:52:01 -06:00
Thaddeus Crews
edc60c63f1
Merge pull request #98701 from DarioSamo/rd-graph-improvements
Add dependency detection improvements to the render graph.
2024-11-04 21:51:58 -06:00
Thaddeus Crews
c68ec6c369
Merge pull request #98825 from DarioSamo/mobile-scs
Add multiple specialization constants to Forward+ and Mobile.
2024-11-04 21:51:55 -06:00
Thaddeus Crews
11b90086b7
Merge pull request #96705 from elmajime/camera_from_external_feed
Add support for external camera feed from external plugin on Android
2024-11-04 21:51:50 -06:00
Thaddeus Crews
bb5f390fb9
Style: Apply clang-tidy fixes (superficial)
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06:00
Thaddeus Crews
89a311205f
Style: Apply clang-tidy fixes
• `modernize-use-default-member-init` and `readability-redundant-member-init`
• Minor adjustments to `.clang-tidy` to improve syntax & remove redundancies
2024-11-04 12:11:06 -06:00
Dario
53099c56f0 Add multiple specialization constants to Forward+ and Mobile. 2024-11-04 14:35:40 -03:00
EnlightenedOne
1d141ab32a Fix Frustum Sky projection translation logic, all pipelines, fixes 63863 2024-11-02 21:34:55 +00:00
Chaosus
5efe8ccdea Add prefix to struct member names in shader compiler 2024-11-02 12:13:23 +03:00
Dario
5216ef5f9c Add dependency detection improvements to the render graph.
- Buffers changing their usage are no longer treated as write usage unless the API requires it.
- Draw lists are not treated as being dependent on each other if their regions do not intersect despite both being write commands.
- Particles were tweaked to use different unused buffers to reduce dependencies.
2024-11-01 09:46:52 -03:00
Matias N. Goldberg
b9a2f108fc Fix splash screen upside down on Android
Fixes an issue introduced in #96439 (see
https://github.com/godotengine/godot/pull/96439#issuecomment-2447288702)

Godot was relying on Java's
activity.getWindowManager().getDefaultDisplay().getRotation(); to apply
pre-rotation but this is wrong.

First, getRotation() may temporarily return a different value from the
correct one; which is what was causing the splash screen to be upside
down. It would return -90 instead of 90 for the first rendered frame.

But unfortunately, the splash screen is just one frame rendered for a
very long time, so the error lingered for a long time for everyone to
see.

Second, to determine what rotation to use, we should be looking at what
Vulkan told us, which is the value we pass to
VkSurfaceTransformFlagBitsKHR::preTransform.

This commit removes the now-unnecessary
screen_get_internal_current_rotation() function (which was introduced by
#96439) and now saves the preTransform value in the swapchain.
2024-10-31 16:52:26 -03:00
maxime.chambefort
6f846eb5c5 Added external camera feed from external plugin on Android 2024-10-30 18:30:28 +01:00
Thaddeus Crews
6d09a20c82
Merge pull request #97247 from thimenesup/draw_indirect_rd
Add draw indirect to Rendering Device
2024-10-29 19:25:57 -05:00
Thaddeus Crews
a8931f1aa9
Merge pull request #98652 from stuartcarnie/2d_texture_state_fixes
2D: Fix various issues and minor performance optimisations
2024-10-29 19:25:54 -05:00
Thaddeus Crews
7a661eaa7c
Merge pull request #98612 from DarioSamo/alignment-transfer-fix
Fix transfer alignment on initial texture transfer.
2024-10-29 19:25:46 -05:00
Thaddeus Crews
b7a0971ad2
Merge pull request #97934 from adamscott/give-AThousandShips-a-break
[Codestyle] Set clang-format `RemoveSemicolon` rule to `true`
2024-10-29 19:25:36 -05:00
Thaddeus Crews
64b68192cc
Merge pull request #98562 from Rudolph-B/Issue-98561
Fix Occlusion Culling not working for an orthogonal camera.
2024-10-29 19:25:34 -05:00
Stuart Carnie
0d1d945727
2D: Fix various issues and minor performance optimisations 2024-10-30 08:36:45 +11:00
Clay John
748f4079e3
Merge pull request #96439 from darksylinc/matias-TheForge-pr03-rebased
Add Swappy & Pre-Transformed Swapchain
2024-10-29 12:34:40 -07:00
thimenesup
d36a872432 Add draw indirect to Rendering Device 2024-10-29 17:40:28 +01:00
Matias N. Goldberg
aaa0e2fddf Add Swappy & Pre-Transformed Swapchain
- Adds Swappy for Android for stable frame pacing
- Implements pre-transformed Swapchain so that Godot's compositor is in
charge of rotating the screen instead of Android's compositor
(performance optimization for phones that don't have HW rotator)

============================

The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.

Changes from original PR:

- Removed "display/window/frame_pacing/android/target_frame_rate" option
to use Engine::get_max_fps instead.
- Target framerate can be changed at runtime using Engine::set_max_fps.
- Swappy is enabled by default.
- Added documentation.
- enable_auto_swap setting is replaced with swappy_mode.
2024-10-28 18:55:37 -03:00
Dario
427ba09efc Fix soft shadows by increasing the bit count for specialization constants. 2024-10-28 10:26:50 -03:00
Dario
03f56fc15d Fix transfer alignment on initial texture transfer.
Fixes the regression caused by transfer workers with textures with non-standard dimensions such as the ones provided in #98601.
2024-10-28 09:56:02 -03:00
Rudolph Bester
76c20383d1 Fix Occlusion Culling not working for an orthogonal camera. 2024-10-26 20:07:34 +02:00
Chaosus
e021076b4c Add renderer state defines to shader preprocessor 2024-10-26 13:49:55 +03:00
Thaddeus Crews
edad871a2d
Merge pull request #98425 from darksylinc/matias-breadcrumbs-race-fix
Fix race conditions in breadcrumbs
2024-10-25 13:04:12 -05:00
Adam Scott
0d350e7108
Set clang-format RemoveSemicolon rule to true
- Set clang-format `Standard` rule to `c++20`
2024-10-25 13:49:43 -04:00
Yuri Rubinsky
6732a0fd86
Merge pull request #98448 from Chaosus/shader_global_builtins
Make `OUTPUT_IS_SRGB/CLIP_SPACE_FAR` shader built-ins global
2024-10-25 13:55:14 +03:00
Clay John
78a4e634f0
Merge pull request #98257 from Rudolph-B/94210-B
Fix to occlusion culling where all math is based on Euclidean distance.
2024-10-24 21:06:56 -07:00
Thaddeus Crews
cfc05c5e0f
Merge pull request #85338 from EMBYRDEV/shadow-caster-mask
Add `shadow_caster_mask` to Light3D.
2024-10-24 13:22:59 -05:00
Thaddeus Crews
ba4e67e55e
Merge pull request #98266 from m-pranav-r/fix-light-visual-instance
Fix light culling mask behavior in Mobile and Compat renderers
2024-10-24 13:22:58 -05:00
Thaddeus Crews
9f908a3a5b
Merge pull request #86103 from ecmjohnson/fix-inside-volfog
Fix volumetric fog artifacts when inside the fog
2024-10-24 13:22:57 -05:00
Thaddeus Crews
52bbbd4338
Merge pull request #98247 from TCROC/fix-headless-graphics-driver-and-shader-crash
Don't create rendering device or parse glsl shader in headless mode
2024-10-24 13:22:53 -05:00
Chaosus
463e81413e Make OUTPUT_IS_SRGB/CLIP_SPACE_FAR shader built-ins global 2024-10-24 12:32:05 +03:00
Yuri Rubinsky
ff9fb0abea
Merge pull request #93590 from Chaosus/shader_custom_func_discard
Allow usage of `discard` inside custom shader functions
2024-10-24 09:38:10 +03:00