Commit Graph

288 Commits

Author SHA1 Message Date
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
nklbdev
c022f52f11 Fix wrong type casting for octahedral tangents 2023-07-01 15:15:48 +05:00
Alex Drozd
d9cc22af8f Binding LIGHT_PARAM_INTENSITY in RenderingServer 2023-06-22 23:29:47 +02:00
Aaron Franke
1e6f30e6bd
Set both texture format overrides to false by default 2023-06-12 11:52:02 -05:00
Aaron Franke
944fbce347
Enable S3TC_BPTC but not ETC2_ASTC by default 2023-06-09 11:38:29 -05:00
Rémi Verschelde
564d1b34e0
Merge pull request #74711 from BastiaanOlij/add_texture_native_handle
Provide access to internal graphics handles for textures
2023-05-09 19:28:26 +02:00
Rémi Verschelde
de14109862
Merge pull request #73588 from smosages/resolve-display-shader-settings-in-settings-editor
Define shader language project settings before creation of `TextShaderEditor` object.
2023-05-09 19:28:17 +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
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
Hugo Locurcio
e7852552d4
Fix setrngth typo in particles_collision_set_attractor_strength() 2023-04-13 03:09:26 +02:00
Hugo Locurcio
e4d5cecd4c
Fix get_test_texture() returning an almost fully white texture
The texture's appearance is now similar to the texture that was displayed
on the TestCube node in Godot 2.x.
2023-04-04 02:30:05 +02:00
Bastiaan Olij
ab60d3b65c Expose viewports render targer RID 2023-03-31 11:34:09 +11:00
Danil Alexeev
ba985ecf3f
Fix draw_multiline_colors() for width < 0 2023-03-14 09:43:56 +03:00
Bastiaan Olij
70dca9ff55 Merge duplicate rd_texture functions 2023-03-10 21:37:01 +11:00
smosages
786ad514df Move ShaderWarning definitions into rendering_server 2023-02-25 12:14:25 +01:00
bruvzg
041f559da1
Exclude platform dependent rendering/textures/vram_compression/import_* default values from documentation. 2023-02-16 15:48:09 +02:00
Rémi Verschelde
5b6c9c66a4
Android: Default Min SDK to 24 for Vulkan mobile
Users can still go down to 21 when using GL Compatibility.
This makes the default behavior match the default renderer, and thus avoids
a warning in the out of the box experience.

Also mark texture compression settings as basic, since out of the box users
who want to export to Android will need to enable ETC2/ASTC manually.
2023-02-15 14:32:54 +01:00
myaaaaaaaaa
6f88392d02 Move some worker_thread_pool.h includes out of header files 2023-02-13 14:02:01 -05: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
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
Rémi Verschelde
628967e6ba
Merge pull request #72343 from clayjohn/editor-canvas-bg
Remove viewport_set_disable_environment in favor of viewport_set_environment_mode
2023-01-31 10:53:05 +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
Juan Linietsky
28f51ba547 Refactor high quality texture import
* Only two texture import modes for low/high quality now:
  * S3TC/BPTC
  * ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.

This solves the following problems:

* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
2023-01-30 15:53:23 +01:00
clayjohn
0b28c1f8ed Remove cap on number of items drawn in frame in 2D gl_compatibility render
Also clean up some names to make the overall organization more clear

Also remove cap on items per batch
2023-01-28 20:36:17 -08:00
kobewi
615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
clayjohn
a804556ab9 Add mutex when adding geometry instances to the dirty list in the Forward Clustered renderer 2023-01-20 10:34:19 -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
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
Danil Alexeev
a8cbb6245b
Fix scaling issue in draw_line and similar methods 2023-01-16 12:49:58 +03:00
Pedro J. Estébanez
d0e37cd04c Add framework for avoidance of color flash in new windows 2023-01-12 21:42:51 +01:00
Juan Linietsky
47592927b3 Use BitField<> hint for ArrayFormat
This was missing in the conversion of bitflags to BitField<>.
2023-01-08 18:47:48 +01:00
Rémi Verschelde
163f6f5fe8
Merge pull request #68429 from KoBeWi/PropertySettings
Add PropertyInfo overload for GLOBAL_DEF
2023-01-06 22:59:29 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Rémi Verschelde
1cab6c91e9
Merge pull request #69998 from BastiaanOlij/sorting-pivot-4
Added options for sorting transparent objects (port of PR #63040)
2022-12-23 09:47:24 +01:00
Bastiaan Olij
6f4f38db07 Added options for sorting transparent objects (port of PR 63040) 2022-12-23 19:30:33 +11:00
bruvzg
20d9457f9d
Scale MSDF font outline with the font size and MSDF source size to match dynamic font behavior. 2022-12-17 22:47:54 +02:00