Commit graph

328 commits

Author SHA1 Message Date
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
Rémi Verschelde
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
G-Shadow
cbc8ae660c Fix unlimited project option ranges that could cause crashes. 2023-12-22 09:14:45 +03:00
Wilson E. Alvarez
a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
Rémi Verschelde
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
Rémi Verschelde
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
ShirenY
27f71c4e78 Transform mesh's AABB to skeleton's space when calculate mesh's bounds. 2023-12-09 11:41:15 +08:00
clayjohn
528b4a3283 Implement render info counters for the 2D renderer
This provides information for the debug monitors
2023-12-06 14:39:33 -07:00
Aaron Franke
7d5b902838
Add a descriptive error message when creating a mesh surface from arrays 2023-12-02 00:44:59 -06:00
Yuri Sizov
98011e032d Avoid division by zero in the fix surface compatibility routine 2023-11-20 16:22:58 +01:00
clayjohn
031f221b9d Create tangent array if mesh created without tangents
This extends our previous change to ensure that compressed meshes have tangents

Now we ensure tangents are always used. This greatly simplifies our compression code at the cost of a small amount of bandwidth
2023-11-07 14:24:23 +01:00
Rémi Verschelde
44a54f4500
Merge pull request #84252 from clayjohn/ensure_tangents
Enhance checks and user experience around tangent arrays in meshes.
2023-11-02 09:11:32 +01:00
clayjohn
d1043a5f93 Enhance checks and user experience around tangents.
Ensure `ensure_tangents` option actually creates tangent array. Even if it is just a dummy array.

Allow mesh to generate its own tangents when using compression. This allows users to compress meshes without tangents.

Warn users if they are trying to read from tangents without providing tangents.
2023-11-01 22:40:42 +01:00
clayjohn
be386e1876 Overhaul the SurfaceUpgradeTool
This defers the update to a fresh restart of the editor (to ensure we aren't mid way through loading scenes anymore.

It also ensures that the popup can't be used by multiple threads at once

Co-authored-by: Yuri Sizov <yuris@humnom.net>
2023-11-01 15:32:54 +01:00
clayjohn
3f5c16dd9e Fix multiple issues with UV compression 2023-10-30 23:11:34 +01:00
Rémi Verschelde
bb54190253
Merge pull request #83840 from clayjohn/mesh-flat-bug
Ensure `r_aabb` is always used when creating surfaces through the RenderingServer
2023-10-26 16:00:32 +02:00
clayjohn
8f9cd4e1e3 Some more fixes for compressed meshes
This cleans up a few more cases of uint32_t->uint64_t

Importantly this fixes an edge case in the axis-angle compression by
using the pre-existing Basis methods instead
2023-10-24 09:38:12 +02:00
Rémi Verschelde
50d17f6b8c
Merge pull request #83613 from clayjohn/surface_upgrade_tool
Add an editor tool to automatically upgrade and re-save meshes
2023-10-24 00:10:37 +02:00
clayjohn
318ef8461f Implementation of tool to automatically upgrade and re-save meshes 2023-10-23 22:39:48 +02:00
clayjohn
3c17f556ad Ensure r_aabb is always used when creating surfaces through the RenderingServer 2023-10-23 20:36:20 +02:00
Hugo Locurcio
0012478ecb
Add property hint for 2D shadow size project setting
Previously, it was possible to use zero or negative values, which are
invalid.

This also prevents crashing the engine by setting a shadow size of
0 or lower from a script.
2023-10-22 00:28:19 +02:00
Lunarisnia
28f7a62ae4 Fix disabling depth prepass breaks opaque material 2023-10-15 12:18:13 +07:00
Rémi Verschelde
135fa1ef5d
Merge pull request #83179 from clayjohn/tangents-sanitize
Sanitize tangents when creating mesh surfaces to avoid triggering the compressed mesh path in the shader
2023-10-13 22:17:02 +02:00
clayjohn
e3d31837eb Sanitize tangents when creating mesh surfaces to avoid triggering the compressed mesh path in the shader 2023-10-13 08:54:49 -06:00
Clay
acb65377cd Cleanup instances of using uint32_t for mesh formats
And tidy up some leftovers from the attribute compression PR
2023-10-12 22:01:41 +02:00
Rémi Verschelde
55282ddc10
Merge pull request #79527 from QbieShay/qbe/particles-rework
Particle internal refactor and additions for more artistic control
2023-10-10 22:48:50 +02:00
QbieShay
c228fe1a0d Particle internal refactor and additions for more artistic control
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
Co-authored-by: Mew Pur Pur <85438892+MewPurPur@users.noreply.github.com>
Co-authored-by: Clay John <claynjohn@gmail.com>
2023-10-10 20:03:35 +02:00
A Thousand Ships
7b6621297b Fix incorrect check in _dict_to_surf 2023-10-09 18:28:59 +02:00
clayjohn
51ed3aef63 Vertex and attribute compression to reduce the size of the vertex format.
This allows Godot to automatically compress meshes to save a lot of bandwidth.

In general, this requires no interaction from the user and should result in
no noticable quality loss.

This scheme is not backwards compatible, so we have provided an upgrade
mechanism, and a mesh versioning mechanism.

Existing meshes can still be used as a result, but users can get a
performance boost by reimporting assets.
2023-10-05 12:02:23 -06:00
Hugo Locurcio
d6d640f158
Disable lightmapper_rd module in non-editor builds (and in Android editor)
This is consistent with `xatlas_unwrap`, which isn't enabled in non-editor
builds and the Android editor either. There is currently no way to
use the lightmapper in a non-editor build anyway, as it doesn't expose
any methods (and even if there was, there would be no way to perform
UV2 unwrapping in the exported project).

This reduces binary size of a stripped Linux x86_64 export template
build by ~164 KB.

This also moves the PrimitiveMesh texel size project setting
so that it's defined when the module is disabled,
and adds a property hint to it.
2023-09-29 11:30:15 +02:00
Dario
057367bf4f Add FidelityFX Super Resolution 2.2 (FSR 2.2.1) support.
Introduces support for FSR2 as a new upscaler option available from the project settings. Also introduces an specific render list for surfaces that require motion and the ability to derive motion vectors from depth buffer and camera motion.
2023-09-25 10:37:47 -03:00
clayjohn
57eb762bae Add option to enable HDR rendering in 2D
This is needed to allow 2D to fully make use of 3D effects (e.g. glow), and can be used to substantially improve quality of 2D rendering at the cost of performance

Additionally, the 2D rendering pipeline is done in linear space (we skip linear_to_srgb conversion in 3D tonemapping) so the entire Viewport can be kept linear.
This is necessary for proper HDR screen support in the future.
2023-08-07 11:24:03 +02:00
Yuri Sizov
79d3468246 Merge pull request #79696 from reduz/call-on-render-thread
Add ability to call code on rendering thread
2023-07-31 21:01:21 +02:00
Bastiaan Olij
63d6e9c557 Add custom texture create function 2023-07-26 20:46:34 +10:00
Juan Linietsky
c7fb6cea3d Add ability to call code on rendering thread
As more users use compute in Godot 4, the way they do is most likely incompatible when running
on separate threads and will start erroring soon as we improve the thread safety of the render thread.

To properly run code on the render thread, this function was added. Use like this:

```GDScript

func initialize_compute_code():
	....

func update_compute_code(custom_data):
	...

func _ready():
	RenderingServer.call_on_render_thread( initialize_compute_code )

func _process():
	RenderingServer.call_on_render_thread( update_compute_code.bind(with_data) )

```
2023-07-26 12:28:00 +02:00