Commit Graph

362 Commits

Author SHA1 Message Date
David House
6e9d31f602 Implemented multimesh_get_buffer_rd_rid function into RenderingServer.
Fixed style error.

Updated dummy mesh_storage to move from cpp to h the return of a blank Rid on _multimesh_get_buffer_rd_rid.
2024-11-14 15:52:08 -06:00
Thaddeus Crews
4b447ec4e5
Merge pull request #85430 from Calinou/os-expose-rendering-driver-method
Expose RenderingServer methods to get rendering driver and method name
2024-11-11 14:18:10 -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
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
maxime.chambefort
6f846eb5c5 Added external camera feed from external plugin on Android 2024-10-30 18:30:28 +01:00
Stuart Carnie
0d1d945727
2D: Fix various issues and minor performance optimisations 2024-10-30 08:36:45 +11: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
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
Hugo Locurcio
4a70ac2948
Expose RenderingServer methods to get rendering driver and method name
This is useful for troubleshooting purposes and debug menus.
2024-10-02 16:07:45 +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
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
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
BlueCube3310
606eedb0c9 Betsy: Add caching and BC1 compression support 2024-09-11 23:48:29 +02:00
Stuart Carnie
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
Rémi Verschelde
4b8946102b
Merge pull request #91535 from BlueCube3310/betsy-bc6h
Add Betsy to speed up BC6 compression
2024-08-21 06:38:03 +02:00
Rémi Verschelde
6a9ecdcf0c
Merge pull request #91818 from rburing/fti_multimesh
Physics interpolation: `MultiMesh`
2024-08-20 10:01:46 +02:00
BlueCube3310
ef9bb1a207 Implement support for bicubic lightmap filtering
Co-authored-by: Calinou <hugo.locurcio@hugo.pro>
2024-08-19 09:52:09 +02:00
Ricardo Buring
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
BlueCube3310
394ea653aa Add Betsy to speed up BC6 compression 2024-08-18 11:14:05 +02:00
Hannah Crawford
a54b71bbdf Add shadow_caster_mask to Light3D. 2024-08-12 00:17:11 +01:00
Ricardo Buring
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
Arseny Kapoulkine
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
clayjohn
ea4be9afa6 Add more validation to UBO size and alignment in Compatibility renderer 2024-06-14 12:56:29 -07:00
Mateus Elias
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
Yaohua Xiong
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
Bastiaan Olij
9042ddf19f Improvements to VRS/Foveated rendering 2024-05-03 17:20:30 +10:00
Rémi Verschelde
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
Bastiaan Olij
cbab7dc049 OpenXR: Change timing of xrWaitFrame and add thread safety features to OpenXR 2024-05-01 14:24:41 +10:00
clayjohn
e6f55a532a Enable tangents in blend shape format when using normals 2024-04-30 12:14:49 -07:00
Juan Linietsky
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
David Snopek
0f2b804059 Add support for OpenXR composition layers
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2024-04-04 09:20:23 -05:00
Ricardo Buring
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
markdibarry
a62870956a Add new Parallax2D node 2024-03-03 15:46:40 -05:00
Rémi Verschelde
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
Micky
cd2032a90b Optimise Object's get_argument_options 2024-02-29 18:00:54 +01:00
Rémi Verschelde
8f98ed65f7
Merge pull request #88738 from clayjohn/mesh_compression-tangents
Multiple fixes for compressed meshes
2024-02-27 10:17:43 +01:00
clayjohn
f267b2aa87 Properly calculate binormal when creating SurfaceTool from arrays 2024-02-23 21:19:21 -08:00
clayjohn
781cd27fe4 Avoid singularity when generated tangents and validate that tangents are good enough when using compression 2024-02-23 16:25:26 -08:00
Bastiaan Olij
5a98845655 Implement hooks into renderer 2024-02-18 21:54:21 +11:00
Eidolon
08f4560e69 Add optional depth fog 2024-02-17 22:39:34 -03:00
Arman Elgudzhyan
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
A Thousand Ships
684752e75b
Replace error checks against size with is_empty 2024-02-09 12:50:15 +01:00
Marcel Offermans
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
Micky
63a08f2493 Deprecate RenderingServer's has_feature and Features enum 2024-01-10 12:26:04 +01:00
Rémi Verschelde
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
Dario
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
Micky
472e3b3ad5 Add autocompletion for RenderingServer's global shader & has_os_feature 2024-01-08 12:20:31 +01:00