Commit Graph

4323 Commits

Author SHA1 Message Date
bitsawer 4f04d3191e Fix LightmapGI shading sometimes being unlit or black
(cherry picked from commit dda8846dea)
2023-10-24 17:05:02 +02:00
Matias N. Goldberg b7498aeb5d Fix massive validation errors when enabling TAA + MSAA
TAA + MSAA would make Godot request unnecessary flags for an MSAA
velocity texture. flags that were not even actually needed.

This was causing:
 1. Unsupported GPUs to fail completely (e.g. Intel Arc 770)
 2. Wrong codepaths to be followed (causing validation errors, possibly
crashes or glitches)
 3. Unnecessary performance impact in all GPUs.

See
https://github.com/godotengine/godot/issues/71929#issuecomment-1722274359

(cherry picked from commit 4de0ed4adf)
2023-10-24 16:52:59 +02:00
A Thousand Ships b0c59de143 Fix missing clear for some `set_exclude*` query parameter methods
(cherry picked from commit 95eafcba4c)
2023-10-24 16:52:59 +02:00
Pedro J. Estébanez d3d5531658 Fixup special case of cluster render
(cherry picked from commit e9b4d25f20)
2023-10-24 16:06:28 +02:00
Bastiaan Olij 82846a7e6d Fix missing decal mask in mobile renderer
(cherry picked from commit 8449331f13)
2023-10-24 16:05:00 +02:00
Chia-Hsiang Cheng 1588eae8fa Ensure POINT_SIZE takes effect
(cherry picked from commit 0cf57e1927)
2023-10-19 21:49:01 +02:00
Bastiaan Olij ed94e3eb79 Fix issue with four subpasses always been requested in mobile renderer
(cherry picked from commit 414df467cd)
2023-10-19 21:45:12 +02:00
Matias N. Goldberg 1f4a5c2c15 Fix validation error when enabling SSIL alone
(cherry picked from commit 666e91b9ff)
2023-10-19 21:45:11 +02:00
LRFLEW 3df5907c87 Mobile: Uncomment code required for fog rendering on clear color
(cherry picked from commit db17415df8)
2023-10-19 21:17:46 +02:00
Rémi Verschelde aae20e5b10
Fix various typos with codespell
Also includes typo fixes from #79993, #80068, #80276, and #80303.

Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>

(cherry picked from commit faaf27f284)
2023-10-03 20:45:35 +02:00
Dario fc130b26f8 Fix motion vectors being corrupted when using precision=double and resulting in the TAA pass being completely broken.
See Issue #69528. When building with precision=double, the TAA pass would break due to the motion vectors being corrupted. It was apparent the origin of the camera itself was corrupted in the UBO for the previous frame because the camera origin was only being split correctly for the current block but not for the previous block (to effectively support the double precision float on the shader).

(cherry picked from commit 77776f5313)
2023-09-21 15:28:23 +02:00
Dario 1bcb77fb15 Add motion vector support for GPU 3D Particles.
Add the capability of resizing the transforms buffer for particles to be double its size and alternate where the current output is written to. Only works for particles that use index as their draw order.

(cherry picked from commit 293302ccd8)
2023-09-21 14:20:04 +02:00
Dario 1f18125652 Fix incorrect error checking and notifications introduced in PR #80414.
There was an error in the other branch of the refactored function where the size of the array was not properly multiplied by the size of the float to check against the buffer size. This was only an error in the error-checking itself and not the functionality. There was also an error where the proper notification was not emitted whenever the buffer for the multimesh is recreated to invalidate the previous references the renderer might've created to it. This fixes CPU Particles getting corrupted when they're created without emission being enabled.

(cherry picked from commit 420f3890b0)
2023-09-21 14:20:04 +02:00
Dario b447e1baaf Improve handling of motion vectors for multimesh instances.
Fixes #67287. There was a subtle error where due to how enabling motion vectors for multi-meshes was handled, only the first instance would have a valid transforms buffer and the rest would point to an invalid buffer. This change moves over the responsibility of enabling motion vectors only when changes happen to the individual 3D transforms or the entire buffer itself. It also fixes an unnecessary download of the existing buffer that'd get overwritten by the current cache if it exists. Another fix is handling the case where the buffer was not set, and enabling motion vectors would not cause the buffer to be recreated correctly.

(cherry picked from commit 5155870d64)
2023-09-21 14:20:04 +02:00
Matias N. Goldberg efbe9237cc Fix integer underflow when rounding up in VoxelGI
The code wanted to divide and round up:
 - 0 / 64 = 0
 - 63 / 64 = 1
 - 64 / 64 = 1
 - 65 / 64 = 2

However when the dividend was exactly 0 it would underflow and produce
67108864 instead.

This caused TDRs on empty scenes or extremely slow performance

Fix #80286

(cherry picked from commit e783e32108)
2023-09-21 14:09:19 +02:00
bitsawer bc95b36fbf Clear SDFGI textures when created
(cherry picked from commit 09c887ce82)
2023-09-21 14:09:19 +02:00
bitsawer 3c5f715053 Fix Vulkan crash with many Omni/SpotLights, Decals or ReflectionProbes
(cherry picked from commit d6f45e4f14)
2023-09-20 22:44:04 +02:00
Fabian Keller 76f61b3960 bugfix for audio stream generators getting killed accidentally by audio server
(cherry picked from commit 4eac548202)
2023-09-20 22:44:03 +02:00
A Thousand Ships d5c246bbd3 Ensure OpenXR classes are declared properly
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
(cherry picked from commit c23bd8b143)
2023-09-20 22:44:03 +02:00
univeous 7627337d63 Fix crash when calling get_video_adapter_* in a thread
co-authored-by: Clay John <claynjohn@gmail.com>
(cherry picked from commit 0a64abe891)
2023-08-31 20:19:30 +02:00
Hayden Leete a9a27c7ea5 Add autocomplete for filter/repeat hints on uniform arrays
(cherry picked from commit fc7063b2e2)
2023-08-31 19:48:16 +02:00
kobewi 271e08e543 Allow more hint types for uniform arrays
(cherry picked from commit 8ae2e6681e)
2023-08-31 19:48:16 +02:00
clayjohn d6d8f6a637 Unify error condition for particles trail lifetime
(cherry picked from commit 78ecdb17f9)
2023-07-10 18:09:57 +02:00
Arman Elgudzhyan 361c0d53f3 Clear specular buffer if bg mode is canvas and ss effects are used
Explicitly clear the separate specular buffer when the background mode is canvas and screen space effects (and thus a separate specular buffer) are used.

(cherry picked from commit af9d1743f3)
2023-07-10 17:46:09 +02:00
lewiji a084f0568f Return shader parse error when using 'hint_normal_roughness_texture' and not using the Forward+ backend
(cherry picked from commit 2a93681334)
2023-07-10 17:46:07 +02:00
bitsawer 0dec3d6485 Fix shader language float literal precision truncation
(cherry picked from commit 356297f909)
2023-07-10 17:26:14 +02:00
nklbdev 92040e85e2 Fix wrong type casting for octahedral tangents
(cherry picked from commit c022f52f11)
2023-07-10 17:26:13 +02:00
Yuri Roubinski 6255a64e03 Fix using uint suffix at the hex number declaration in shaders
(cherry picked from commit 1994c25701)
2023-07-10 17:11:22 +02:00
clayjohn bc9bc236c0 Initialize particles instance buffer in case it is used before being updated
(cherry picked from commit 35ed7c770b)
2023-07-10 17:11:22 +02:00
smix8 8bd14e5ca3 Add missing default Callables for new NavigationServer geometry parse and bake functions
Adds missing default Callables for new NavigationServer geometry parse and bake functions.
2023-06-25 19:08:50 +02:00
K. S. Ernest (iFire) Lee 39dfa8436e Varying mismatch causing shaders to fail. 2023-06-23 21:36:38 -07:00
Rémi Verschelde dbcbba5575
Merge pull request #78575 from brno32/bind-light-param-intensity
Binding LIGHT_PARAM_INTENSITY in RenderingServer
2023-06-23 08:48:20 +02:00
Alex Drozd d9cc22af8f Binding LIGHT_PARAM_INTENSITY in RenderingServer 2023-06-22 23:29:47 +02:00
bitsawer ef00de99b4 Fix error spam when a mesh with bone weights has an invalid skeleton 2023-06-22 15:58:52 +03:00
Bastiaan Olij 952b4b3f38 Apply reprojection in multiview for our cluster lookup 2023-06-21 11:17:01 +10:00
Rémi Verschelde dca1e0bef7
Merge pull request #78436 from BastiaanOlij/fix_stereo_fog
Fix volumetric fog in stereo by projection vertex in combined space
2023-06-20 09:21:39 +02:00
Bastiaan Olij 66272ea26e Fix volumetric fog in stereo by projection vertex in combined space 2023-06-20 14:36:14 +10:00
Wilson E. Alvarez d19c376d2e
Fix AudioEffectRecord circular reference 2023-06-19 18:13:01 -04:00
Rémi Verschelde 7ff0a3086d
Merge pull request #76138 from rburing/ccd_against_moving
Improve rigid body CCD against moving bodies
2023-06-19 22:34:16 +02:00
bitsawer dab0871d41 Fix invalid RID errors when freeing a mesh with blend shapes 2023-06-19 11:07:15 +03:00
smix8 ae9dd47d0c Add agent pause mode to NavigationServer
Adds agent pause mode to NavigationServer.
2023-06-18 12:37:03 +02:00
Rémi Verschelde 014b395ef3
Merge pull request #78262 from bruvzg/ds_window_focus
[DisplayServer] Add method to check if native window is focused.
2023-06-16 10:19:33 +02:00
bruvzg 28db3c7158 [DisplayServer] Add method to check if native window is focused. 2023-06-16 10:27:52 +03:00
clayjohn 36a005fafc
Add RENDERING_INFO parameters to GL Compatibility renderer
This also fixes RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME for the RD renderers as it was incorrectly reporting vertex/index count at times

This also adds memory tracking to textures and buffers to catch memory leaks.

This also cleans up some memory leaks that the new system caught.
2023-06-16 09:10:00 +02:00
Rémi Verschelde 6fb391bc23
Fix various typos with codespell
And ignore some false positives introduced by recent versions of codespell.
2023-06-16 08:45:35 +02:00
Rémi Verschelde 0da20d019e
Merge pull request #77412 from smix8/fix_threaded_navmesh_baking_4.x
Fix for threaded NavigationMesh baking under new thread guards
2023-06-15 10:49:58 +02:00
Rémi Verschelde 754a52a4ab
Merge pull request #78201 from smix8/navmesh_cell_height_4.x
Fix `cell_height` for navigation meshes
2023-06-14 09:27:33 +02:00
Rémi Verschelde 16c2fede71
Merge pull request #78200 from prominentdetail/patch-3
Properly handle wireframe mode in RendererRD pipeline cache
2023-06-14 09:27:10 +02:00
Rémi Verschelde e0651ed4b5
Merge pull request #78199 from clayjohn/detect_3d
Ensure that "detect 3D" is only called when using 3D shaders
2023-06-14 09:26:47 +02:00
Rémi Verschelde 41776634b6
Merge pull request #78161 from BastiaanOlij/expose_texture_native_handle
Expose `RD::texture_get_native_handle`
2023-06-14 09:25:59 +02:00