Commit Graph

356 Commits

Author SHA1 Message Date
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
0d1d945727 2D: Fix various issues and minor performance optimisations 2024-10-30 08:36:45 +11:00
cfc05c5e0f Merge pull request #85338 from EMBYRDEV/shadow-caster-mask
Add `shadow_caster_mask` to Light3D.
2024-10-24 13:22:59 -05:00
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
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
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
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
7d56b09f23 Expose a function to create textures from a native handle in the compatibility renderer 2024-09-19 09:05:32 -05:00
606eedb0c9 Betsy: Add caching and BC1 compression support 2024-09-11 23:48:29 +02:00
a657ea42f1 2D: Add batching to RendererCanvasRenderRD 2024-09-12 05:26:06 +10:00
Hei
94e434b34e Expose the function 'RenderingServer.canvas_item_attach_skeleton' 2024-08-25 04:13:04 +03:00
4b8946102b Merge pull request #91535 from BlueCube3310/betsy-bc6h
Add Betsy to speed up BC6 compression
2024-08-21 06:38:03 +02:00
6a9ecdcf0c Merge pull request #91818 from rburing/fti_multimesh
Physics interpolation: `MultiMesh`
2024-08-20 10:01:46 +02:00
ef9bb1a207 Implement support for bicubic lightmap filtering
Co-authored-by: Calinou <hugo.locurcio@hugo.pro>
2024-08-19 09:52:09 +02:00
1728f80e7c Fixed Timestep Interpolation: MultiMesh
Adds fixed timestep interpolation to multimeshes.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-08-18 17:14:59 +02:00
394ea653aa Add Betsy to speed up BC6 compression 2024-08-18 11:14:05 +02:00
a54b71bbdf Add shadow_caster_mask to Light3D. 2024-08-12 00:17:11 +01:00
2f8ab4a654 Fixed Timestep Interpolation (3D)
Adds 3D fixed timestep interpolation to the rendering server.
This does not yet include support for multimeshes or particles.

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-07-07 22:15:23 +02:00
4e9e35b58a Fix AABB computation for position compression to not depend on vertex order
The previous computation was dependent on the vertex order in two ways:

- If the first vertex was on the AABB boundary, the AABB would be
  increased by the epsilon due to size clamping
- Every time the AABB would get expanded, we would recompute end from
  size and reconstruct size again, which resulted in slow floating point
  drift.

In isolation this may not seem like it matters, but it means that the
same mesh with a different vertex order may result in a slightly different
AABB. This can be a significant issue due to shadow meshes and their use in
depth prepass: shadow meshes reorder vertex data as part of the
deduplication process, as they append one unique position at a time and
as such remove the duplicate positions; this can result in a different
AABB which would result in a different reconstructed vertex position
during a depth pre-pass, causing mesh self-occlusion.
2024-07-03 23:53:24 -07:00
ea4be9afa6 Add more validation to UBO size and alignment in Compatibility renderer 2024-06-14 12:56:29 -07:00
ce10a660d1 Improve Mesh class description
- Bind MAX_MESH_SURFACES constant in RenderingServer::_bind_methods()
- Add MAX_MESH_SURFACES constant to RenderingServer class documentation
- Reference the constant RenderingServer.MAX_MESH_SURFACES in the description of Mesh class documentation
2024-05-26 21:52:39 -03:00
ed3d311687 Add antialias support for CanvasItem draw primitives
including
- rect, circle; both filled and unfilled.
- polyline, multiline
2024-05-13 19:03:31 +08:00
9042ddf19f Improvements to VRS/Foveated rendering 2024-05-03 17:20:30 +10:00
3ebef6ce7a Merge pull request #91372 from clayjohn/RS-blend-shape-tangent
Enable tangents in blend shape format when using normals
2024-05-01 09:55:24 +02:00
cbab7dc049 OpenXR: Change timing of xrWaitFrame and add thread safety features to OpenXR 2024-05-01 14:24:41 +10:00
e6f55a532a Enable tangents in blend shape format when using normals 2024-04-30 12:14:49 -07:00
65686dedf9 Use WorkerThreadPool for Server threads
* Servers now use WorkerThreadPool for background computation.
* This helps keep the number of threads used fixed at all times.
* It also ensures everything works on HTML5 with threads.
* And makes it easier to support disabling threads for also HTML5.

CommandQueueMT now syncs with the servers via the WorkerThreadPool
yielding mechanism, which makes its classic main sync semaphore
superfluous.

Also, some warnings about calls that kill performance when using
threaded rendering are removed because there's a mechanism that
warns about that in a more general fashion.

Co-authored-by: Pedro J. Estébanez <pedrojrulez@gmail.com>
2024-04-10 18:47:42 +02:00
0f2b804059 Add support for OpenXR composition layers
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2024-04-04 09:20:23 -05:00
2ed2ccc2d8 Fixed Timestep Interpolation (2D)
Adds fixed timestep interpolation to the rendering server (2D only).
Switchable on and off with a project setting (default is off).

Co-authored-by: lawnjelly <lawnjelly@gmail.com>
2024-03-23 12:28:36 +01:00
a62870956a Add new Parallax2D node 2024-03-03 15:46:40 -05:00
c1377920cd Merge pull request #86743 from Mickeon/autocompletion-optimise-object
Optimise comparisons for Object's `get_argument_options`
2024-03-01 14:56:06 +01:00
cd2032a90b Optimise Object's get_argument_options 2024-02-29 18:00:54 +01:00
8f98ed65f7 Merge pull request #88738 from clayjohn/mesh_compression-tangents
Multiple fixes for compressed meshes
2024-02-27 10:17:43 +01:00
f267b2aa87 Properly calculate binormal when creating SurfaceTool from arrays 2024-02-23 21:19:21 -08:00
781cd27fe4 Avoid singularity when generated tangents and validate that tangents are good enough when using compression 2024-02-23 16:25:26 -08:00
5a98845655 Implement hooks into renderer 2024-02-18 21:54:21 +11:00
08f4560e69 Add optional depth fog 2024-02-17 22:39:34 -03:00
7ac8365e11 Support custom AABB within MultiMesh resources
- Supporting custom AABB on the MultiMesh resource itself allows us to prevent costly runtime AABB recalculations.
- Should also help improve CPU Particle performance.
2024-02-15 22:37:07 -08:00
684752e75b Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
25f573ca63 Add a reflection mask to the reflection probes.
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2024-01-20 08:07:31 +01:00
63a08f2493 Deprecate RenderingServer's has_feature and Features enum 2024-01-10 12:26:04 +01:00
a50a6b9400 Merge pull request #86798 from Mickeon/autocompletion-rendering-server
Add autocompletion for RenderingServer's global shader methods & `has_os_feature`
2024-01-09 11:27:31 +01:00
cc4d39b0c1 Acyclic Command Graph for RenderingDevice.
Adds a new system to automatically reorder commands, perform layout transitions and insert synchronization barriers based on the commands issued to RenderingDevice.
2024-01-08 14:54:56 -03:00
472e3b3ad5 Add autocompletion for RenderingServer's global shader & has_os_feature 2024-01-08 12:20:31 +01:00
6c390b620d Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy
Add const references detected by clang-tidy
2024-01-04 14:25:33 +01:00
cbc8ae660c Fix unlimited project option ranges that could cause crashes. 2023-12-22 09:14:45 +03:00
a3cb1b096f Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
342531597b Merge pull request #85811 from clayjohn/2D-render-info
Implement render info counters for the 2D renderer
2023-12-12 10:41:06 +01:00
4943b6e6b3 Merge pull request #84451 from ShirenY/FixSkeletonMeshCulling
Transform mesh's AABB to skeleton's space when calculating mesh's bounds
2023-12-12 00:16:51 +01:00
27f71c4e78 Transform mesh's AABB to skeleton's space when calculate mesh's bounds. 2023-12-09 11:41:15 +08:00