Commit Graph

2512 Commits

Author SHA1 Message Date
Thaddeus Crews
c145e85011
Merge pull request #98226 from m-pranav-r/fix-volumetric-shadows
Fix incorrect depth comparison used to calculate volumetric fog shadowing
2024-10-21 16:39:11 -05:00
Thaddeus Crews
5e65747d90
Merge pull request #97925 from huwpascoe/lightmap_dynamic_bugfix
Fix updating dynamic objects in LightmapGI
2024-10-21 16:39:04 -05:00
Dario
8c3e46b13b Move transitions of textures initialized by transfer workers to the main graphics queue.
Also adds a new possible texture layout and API trait to support a particular behavior in D3D12 where only the COMMON layout is supported in copy queues. Fixes #98158.
2024-10-18 09:15:25 -03:00
Clay John
0ce4d8fcd3
Merge pull request #98086 from DarioSamo/transfer-queues-semaphores
Rewrite semaphore handling for transfer workers.
2024-10-17 16:54:43 -07:00
Clay John
a2117f5796
Merge pull request #98187 from EnlightenedOne/98102
Fix Mobile Renderer - Shadow Disabled and User Vertex Lighting flags
2024-10-17 16:37:09 -07:00
Dario
7a936e8bac Rewrite semaphore handling for transfer workers. 2024-10-17 14:07:08 -03:00
yesfish
274076c5be Lightmap Dynamic Bugfix 2024-10-17 16:27:30 +01:00
m-pranav-r
c12001a9dc Fix incorrect depth comparison used to calculate volumetric fog shadowing 2024-10-16 14:55:41 +05:30
kleonc
8d3e9aa7ae Revert incorrect rounding when 2D transform snapping 2024-10-15 10:43:42 +02:00
EnlightenedOne
cef515506b Move preprocessor to end of line for iterator, remove redeclaration incompatible with ubershader method definitions 2024-10-14 22:19:16 +01:00
Thaddeus Crews
af77100e39
Merge pull request #92441 from Chaosus/shader_custom_func_overloads
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
🔗 GHA / 🪲 Godot CPP (push) Has been cancelled
Implement custom function overloading in shading language
2024-10-14 14:09:59 -05:00
Thaddeus Crews
32cc2feba2
Merge pull request #93025 from kleonc/y-sort-physics-interpolation
Account for physics interpolation and transform snapping when Y-sorting
2024-10-14 14:09:30 -05:00
Thaddeus Crews
bb20444998
Merge pull request #97744 from Nazarwadim/use_local_vector_for_skeleton
Use `LocalVector` for skeleton
2024-10-10 18:13:19 -05:00
Yuri Rubinsky
1c86feee0a Implement custom function overloading in shading language 2024-10-08 15:54:00 +03:00
Clay John
842f982397
Merge pull request #96819 from clayjohn/GLES3-instance-uniforms
Some checks are pending
🔗 GHA / 📊 Static checks (push) Waiting to run
🔗 GHA / 🤖 Android (push) Blocked by required conditions
🔗 GHA / 🍏 iOS (push) Blocked by required conditions
🔗 GHA / 🐧 Linux (push) Blocked by required conditions
🔗 GHA / 🍎 macOS (push) Blocked by required conditions
🔗 GHA / 🏁 Windows (push) Blocked by required conditions
🔗 GHA / 🌐 Web (push) Blocked by required conditions
🔗 GHA / 🪲 Godot CPP (push) Blocked by required conditions
Implement instance uniforms in Compatibility renderer
2024-10-07 13:41:47 -06:00
DarioSamo
fa1aacb455 Configure MSAA properly in canvas renderer's pipelines. 2024-10-04 10:45:59 -03:00
clayjohn
65f3df5923 Properly utilize surface information when creating pipelines and vertex arrays in canvas renderer 2024-10-03 16:27:14 -07:00
Dario
e2c6daf7ef Implement asynchronous transfer queues, thread guards on RenderingDevice. Add ubershaders and rework pipeline caches for Forward+ and Mobile.
- Implements asynchronous transfer queues from PR #87590.
- Adds ubershaders that can run with specialization constants specified as push constants.
- Pipelines with specialization constants can compile in the background.
- Added monitoring for pipeline compilations.
- Materials and shaders can now be created asynchronously on background threads.
- Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
2024-10-02 15:11:58 -03:00
Nazarii
1ba168fcbc Use local vector for skeleton 2024-10-02 20:38:40 +03:00
Patrick Owen
d720eb80e1 Clamp UV-coordinates to centers of outermost texels when configured to do so
In addition, fix region_filter_clip_enabled documentation to be consistent with AtlasTexture.xml, since that is the option whose behavior was fixed
2024-09-29 05:57:19 -04:00
Rémi Verschelde
285ebed828
Merge pull request #83360 from ywmaa/vertex_shading
Implement vertex shading
2024-09-29 00:46:48 +02:00
ywmaa
0a9ad8f9de
Implement vertex shading
This adds support in all backends, but the Compatibility renderer works the best.
Mobile and Forward+ can only support one directional light shader (the first in the tree)
While the Compatibility renderer supports any number of shadows.

Co-authored-by: Clay John <claynjohn@gmail.com>
2024-09-29 00:36:09 +02:00
clayjohn
4d635b7a3a Combine texture and instance data into one uniform set in the 2D renderer
Co-authored-by: Stuart Carnie <stuart.carnie@gmail.com>
2024-09-27 11:05:46 -07:00
Rémi Verschelde
a4c1804cab
Merge pull request #97483 from akien-mga/clang-format-19.1.0
CI: Update `clang-format` pre-commit hook to 19.1.0
2024-09-26 12:46:04 +02:00
Rémi Verschelde
b64b464ba7
Merge pull request #97481 from Chaosus/shader_fix_void_return
Fix shader crash when return a void function call
2024-09-26 12:46:01 +02:00
Rémi Verschelde
bfe74eca3b
Merge pull request #97428 from clayjohn/shadow-filter-jitter-rebase
Jitter shadow map dithering pattern across frames when TAA is enabled
2024-09-26 12:45:50 +02:00
Rémi Verschelde
991e6c92ab
Merge pull request #96923 from Repiteo/style/warning-admonition
Style: Add `WARNING:` as new comment admonition
2024-09-26 12:45:38 +02:00
Rémi Verschelde
c92a6c7e27
CI: Update clang-format pre-commit hook to 19.1.0 2024-09-26 11:46:12 +02:00
Chaosus
3828d45e31 Fix shader crash when return a void function call 2024-09-26 11:20:39 +03:00
Thaddeus Crews
32c83a228d
Style: Add WARNING: as new comment admonition 2024-09-25 09:44:42 -05:00
Thaddeus Crews
9f9ee0c813
SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
Rémi Verschelde
73bf121ceb
Merge pull request #93786 from alvinhochun/viewport-pixel-snap-fix
Apply "snap 2D transforms to pixel" to viewport
2024-09-25 12:39:10 +02:00
Rie
5efa6ba489
Fix incorrect Reinhard tonemap operator 2024-09-25 12:34:23 +02:00
Hugo Locurcio
0eb06da057 Jitter shadow map dithering pattern across frames when TAA is enabled
This improves shadow quality by reducing the visibility of the noisy
pattern caused by dithering.

This jittering also applies when FSR2 is enabled, as it provides its own
form of temporal antialiasing.

Co-authored-by: Clay John <claynjohn@gmail.com>
2024-09-24 15:52:07 -07:00
Alvin Wong
1bd66af54c Apply snap 2D transforms to pixel to viewport
We shall not leave the viewport transform to be rounded by the code for
rounding canvas items. Since the viewport transform is inverse to the
camera transform, we get incorrect rounding at the halfway point that
misaligns the viewport and the canvas item which the camera is
following.

Instead, reintroduce viewport rounding, but do it in a way that matches
the rounding of canvas items. Also take into account the half-pixel
offset of the centre point when viewport dimension is not divisible by
two.  For `CanvasLayer`s that follows viewport, take into account the
scale when rounding. Overall this should work better compared to the
rounding in Godot 4.2 (and earlier).
2024-09-23 20:34:11 +08:00
Jiang Yiheng
864d4fb32a Fix hash calculation for NTSliceKey
A bug was introduced from 057367bf by adding FSR 2.2.1 support.
Which increases hash collision and hurts performance.
2024-09-22 21:08:18 +08:00
Rémi Verschelde
5f5c690481
Merge pull request #97260 from clayjohn/pixel_snap
Calculate pixel snap in canvas space instead of world space
2024-09-21 11:50:52 +02:00
clayjohn
e75900e1ad Calculate pixel snap in canvas space instead of world space
This ensures that you are actually snapping to pixels in the viewport and not an arbitrary amount
2024-09-20 17:43:33 -07:00
David Snopek
1a6f8512bc Add external texture support (GLES3)
Co-authored-by: Fredia Huya-Kouadio <fhuyakou@gmail.com>
Co-authored-by: Mauricio Narvaez <nvz@meta.com>
2024-09-20 10:48:32 -05:00
Rémi Verschelde
34dd5e0c37
Merge pull request #97217 from stuartcarnie/97185_subpixel_rendering
Metal: Fix subpixel blending; fix inconsistent blend state
2024-09-20 16:07:03 +02:00
Thaddeus Crews
b37fc1014a
Style: Apply new clang-format changes 2024-09-20 08:09:48 -05:00
Stuart Carnie
e826ab9ba9
[2D,Metal]: Fix subpixel blending; fix inconsistent blend state in Metal 2024-09-20 15:16:31 +10:00
Rémi Verschelde
b1b4c5da4b
Merge pull request #96928 from dsnopek/rename-and-expose-texture-create-external
Expose a function to create textures from a native handle in the compatibility renderer
2024-09-19 17:13:27 +02:00
David Snopek
7d56b09f23 Expose a function to create textures from a native handle in the compatibility renderer 2024-09-19 09:05:32 -05:00
Stuart Carnie
5b5dc00c52
2D: Remove redundant assignment 2024-09-17 06:32:49 +10:00
Rémi Verschelde
8c6210a3eb
Merge pull request #92290 from clayjohn/LOD-fixes
Use distance to AABB surface to calculate Mesh LOD instead of using supports
2024-09-16 13:34:04 +02:00
Stuart Carnie
c113e5b143
2D: Fix use-after-free in batch rendering
Closes #96960
Fixes regression of #95574 using fix from #95666
2024-09-14 07:50:39 +10:00
Chaosus
4a16a0d60c Fix broken sky shader 2024-09-13 08:53:26 +03:00
Rémi Verschelde
573badf150
Merge pull request #96875 from stuartcarnie/sgc/small_optimisations
[Editor, Servers] Minor optimizations
2024-09-12 09:25:53 +02:00
Rémi Verschelde
8d9a446397
Merge pull request #95473 from Chaosus/shader_fix_switch_bugs
Fix shader incorrectly expects `int` on `uint` and vice-versa in cases
2024-09-12 09:17:43 +02:00