Commit Graph

198 Commits

Author SHA1 Message Date
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
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
Haoyu Qiu d026b37abd Fix various typos in classref 2023-08-22 18:05:50 +08:00
Hugo Locurcio c751f190c9
Document `RenderingServer.get_video_adapter_name()` may report a fixed name
Firefox will always report the user's GPU as a GeForce GTX 980 in
an attempt to make fingerprinting more difficult.
This is not the case in Chromium-based browsers though.
2023-08-09 11:43:22 +02:00
Rémi Verschelde 1163dac9e3
Merge pull request #80215 from clayjohn/HDR-2D
Add option to enable HDR rendering in 2D
2023-08-08 16:57:33 +02: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
Haoyu Qiu 097c849395 Fix various typos in classref 2023-08-04 16:29:55 +08: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
Yuri Sizov 0fa808ba5e Merge pull request #77085 from BastiaanOlij/visualise_direction_shadowmap_frustum
Draw frustum splices ontop of direction shadow atlas for debug purposes
2023-07-12 21:02:25 +02:00
Rémi Verschelde 81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde 346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02: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
Ninni Pipping 9159208ed1 Ensure `RID`, `Callable`, and `Signal` are stored as strings
Prevents parser errors in `.tscn` and `.tres` files where the assignment
would otherwise be empty.
2023-06-22 17:01:08 +02:00
Rémi Verschelde 908610174d
Merge pull request #77536 from clayjohn/GLES3-render-info
Add RENDERING_INFO parameters to GL Compatibility renderer
2023-06-16 10:19:09 +02: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
Danil Alexeev eb391d3302
Display `BitField[Enum]` in docs to distinguish from `Enum` 2023-06-15 17:23:02 +03:00
Bastiaan Olij 6dd47e232b Expose RD::texture_native_handle 2023-06-14 09:58:08 +10:00
Bastiaan Olij d9eb9665da Draw frustum splices ontop of direction shadow atlas for debug purposes 2023-06-11 11:48:11 +10:00
Danil Alexeev b433020aa6
Documentation: Unify deprecations 2023-06-07 16:34:03 +03:00
RedworkDE 42ca35cfd7 Fix more issues with code tags in class reference 2023-05-29 15:46:34 +02:00
Ninni Pipping 17fb77223c Minor grammar fixes to documentation 2023-05-28 18:27:56 +02:00
Bastiaan Olij c328676d96 For GDExternal use, provides access to internal graphics handles for textures 2023-05-09 13:47:22 +10:00
Rémi Verschelde 3e6a731904
Merge pull request #76418 from reduz/method-bind-validated-call
Add ValidatedCall to MethodBind
2023-05-08 13:52:42 +02:00
Rémi Verschelde b226f7e587
CI: Make codespell checks blocking, but only check changed files 2023-05-08 11:50:55 +02:00
Hugo Locurcio 5056c427d3
Improve RenderingServer, RenderingDevice, ShaderGlobalsOverride documentation
This brings the overall class reference completion percentage from 87% to 92%.
2023-05-06 22:40:32 +02:00
Max Hilbrunner d481fca986
Merge pull request #75517 from BastiaanOlij/expose_render_target 2023-05-05 14:28:01 +02:00
Max Hilbrunner fa451ead91
Merge pull request #74883 from dalexeev/fix-thin-multiline-colors 2023-05-05 14:26:37 +02:00
Juan Linietsky 1c93606e47 Add ValidatedCall to MethodBind
* This should optimize GDScript function calling _enormously_.
* It also should simplify the GDScript VM considerably.

NOTE: GDExtension calling performance has most likely been affected until going via ptrcall is fixed.
2023-04-30 20:01:26 +02:00
Haoyu Qiu 766807506c Fix various typos in the classref 2023-04-18 19:53:47 +08:00
Hugo Locurcio e7852552d4
Fix `setrngth` typo in `particles_collision_set_attractor_strength()` 2023-04-13 03:09:26 +02:00
kobewi eac65fd0a8 Fill random docs 2023-04-03 16:02:29 +02:00
Bastiaan Olij ab60d3b65c Expose viewports render targer RID 2023-03-31 11:34:09 +11:00
Haoyu Qiu ff97c481d3 Fix typos and inconsistencies in classref
* Typo fixes.
* Navigation agent's `velocity_computed` signal is not emitted by
  `set_velocity`, but at the end of that frame if `set_velocity` is
  called.
* Simplify link in navigation agent's `avoidance_enabled` description.
* Unify `navigation_layers` description across `NavigationAgent{2,3}D`.
* Unify `is_normalized()` description across `Vector2`, `Vector3`, and
  `Vector4`
2023-03-27 22:26:56 +08:00
Danil Alexeev ba985ecf3f
Fix `draw_multiline_colors()` for `width < 0` 2023-03-14 09:43:56 +03:00
Rémi Verschelde 1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
clayjohn 13488b4260 Expose RenderingServer.canvas_light_blend_mode
This appears to have been missed in the refactor
2023-02-02 19:12:27 -08:00
Rémi Verschelde 394bb0ee2b
Fix various typos with codespell
Finally do the childs -> children rename too.
2023-02-01 08:45:41 +01:00
Rémi Verschelde 0c540210bd
Merge pull request #71991 from clayjohn/RS-docs
Fill out more sections in RenderingServer and RenderingDevice
2023-02-01 07:33:43 +01:00
Rémi Verschelde 3eb1ac9fd2
Merge pull request #72075 from Maran23/extents-to-size
Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal  and GPUParticles*3D
2023-02-01 07:30:09 +01:00
Marius Hanl a59819630d Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and GPUParticles*3D
- Extents are replaced by Size (Size is Extents * 2)
- The UI text displays 'Size'
- Snapping is adjusted to work with Size
- _set and _get handle extents for compatibility

Co-authored-by: ator-dev <dominic.codedeveloper@gmail.com>
2023-01-31 20:04:11 +01:00
clayjohn 9071809021 Remove viewport_set_disable_environment in favor of viewport_set_environment_mode
This allows us to set a default value inherited by child viewports and have child viewports set the value themselves which is needed for disabling the environment in the editor
2023-01-30 12:25:49 -08:00
clayjohn 35d91b2e54 Document some RenderingServer and RenderingDevice methods and constants
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-01-24 11:35:39 -08:00
Rémi Verschelde 9fc40123ab
Merge pull request #71679 from kleonc/draw_polyline_line_strip
`CanvasItem::draw_polyline` Support thin polylines drawn using line strip
2023-01-20 08:48:56 +01:00
kleonc 728c51e362 CanvasItem::draw_polyline Support thin polylines drawn using line strip 2023-01-19 21:08:25 +01:00
Rémi Verschelde 8b92316368
Merge pull request #71565 from RedworkDE/doc-arraymesh-add-surface
Fix LOD sort order; checks in add_surface; and document all parameters of `ArrayMesh::add_surface_from_arrays`
2023-01-19 19:32:37 +01:00
RedworkDE be4eb3bbdd Fix LOD sort order; checks in add_surface; and document all parameters of `ArrayMesh::add_surface_from_arrays`
Also clarify some related documentation and expose the misssing `ArrayFormat::ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`
2023-01-19 10:30:25 +01:00
clayjohn faea9f5c10 Remove SCREEN_TEXTURE, DEPTH_TEXTURE, and NORMAL_ROUGHNESS_TEXTURE
in favour of texture hints
2023-01-18 19:52:47 -08:00