Commit graph

261 commits

Author SHA1 Message Date
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
clayjohn
5b5cd2b98b Remove high quality glow as it is not any higher quality than regular glow 2022-12-13 10:15:45 -08:00
kobewi
7c6b659bd7 Add PropertyInfo overload for GLOBAL_DEF 2022-12-11 21:36:48 +01:00
ueshita
454116716e Fix some switching decisions for index format. 2022-11-22 00:09:48 +09:00
dzil123
9ce9c959ab RenderingServer::create_local_rendering_device null check and docs
Co-authored-by: Clay John <claynjohn@gmail.com>
2022-11-19 16:31:05 -08:00
Rémi Verschelde
4935493f72
Merge pull request #67948 from DeeJayLSP/split_webp
Overhaul WebP packer and split compression options
2022-11-15 16:25:40 +01:00
DeeJayLSP
da132f3266 Overhaul WebP packer and split compression options 2022-11-15 11:52:22 -03:00
Rémi Verschelde
e10f8cbf40
Merge pull request #68186 from pkdawson/expose-texture-rd
Expose texture_get_rd_texture for scripts
2022-11-11 10:43:57 +01:00
kobewi
d9f066d5fa Remove duplicate project settings definitions 2022-11-08 01:29:39 +01:00
Patrick Dawson
71d8de2763 Expose texture_get_rd_texture 2022-11-03 05:27:24 +01:00
BimDav
fcb9be66a2 Viewport canvas cull mask feature
Co-authored-by: Valentin Zagura <puthre@gmail.com>
2022-10-31 14:09:49 +01:00
clayjohn
b6f44859d7 Implement multiple clip_children modes for CanvasItems 2022-10-14 08:02:28 -07:00
Juan Linietsky
71d2e38cb5 Optimize Convex Collision
Implements the Gauss Mapping optimization to SAT convex collision test.

* Described [here](https://ubm-twvideo01.s3.amazonaws.com/o1/vault/gdc2013/slides/822403Gregorius_Dirk_TheSeparatingAxisTest.pdf) by Dirk Gregorius.
* Requires adding of face information to edges in MeshData
* Took the chance to convert MeshData to LocalVector for performance.
2022-10-13 19:07:53 +02:00
Rémi Verschelde
3306ffefd1 Merge pull request #67000 from RandomShaper/split_render_further
Polish rendering driver refactor further
2022-10-11 09:23:32 +02:00
Pedro J. Estébanez
24ff292999 Polish rendering driver refactor further
Mainly:
- Make `max_descriptors_per_pool` project setting Vulkan-specific.
- Use a common, render driver agnostic magic FourCC for shader binary data.
- Downgrade spirv_reflect to Vulkan-only dependency.
- Add a `RENDER_DRIVER_*` macro to GLSL shader code for per-driver customizations.
2022-10-06 21:08:54 +02:00
clayjohn
154b9c1c91 Use a giant UBO to optimize performance in 2D
This removes the countless small UBO writes we had before
and replaces them with a single large write per render pass.

This results in much faster rendering on low-end devices
but improves speed on all devices.
2022-10-06 11:24:45 -07:00
Haoyu Qiu
909c905d28 Fix crash when executing RenderingServer.mesh_surface_get_format_offset 2022-10-05 13:07:10 +08:00
Rémi Verschelde
d1a155e3cd Fix various -Wmaybe-uninitialized warnings from GCC 12.2.1
Not sure why I didn't get those before, it may be due to upstream
changes (12.2.1 is a moving target, it's basically 12.3-dev), or simply
rebuilding Godot from scratch with different options.
2022-09-22 11:29:48 +02:00
clayjohn
4a1c7de57c Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer). 2022-09-19 10:26:10 -07:00
clayjohn
ef4f968232 Decode octahedral compression when retreiving meshes 2022-09-14 15:48:03 -07:00
Rémi Verschelde
3a62c294c7 Merge pull request #65170 from KoBeWi/your_argument_is_TypedArray 2022-09-02 13:57:02 +02:00
Rémi Verschelde
c82bbc38a5 Merge pull request #64952 from Chaosus/vs_rename_uniform_to_param 2022-09-02 13:49:53 +02:00
Rémi Verschelde
d63c6fc463 Merge pull request #60185 from Calinou/environment-fog-and-sky-affect 2022-09-01 23:52:34 +02:00
Hugo Locurcio
699e9f7966
Add Environment properties to control fog rendering on background sky
Values lower than 1.0 can be used to make the fog rendering not fully
obstruct the sky. This can be desired when using fog as a purely
atmospheric effect, without intending to use fog for open world fog
fading.

When set to 0.0, fog rendering behavior will be similar to Godot 3.x
where sky rendering was never affected by fog.
2022-09-01 19:07:39 +02:00
kobewi
7adc8376ed Change Array arguments to TypedArray 2022-09-01 13:13:19 +02:00
Yuri Rubinsky
8191b3c110 Rename uniform to parameter across the engine 2022-09-01 11:42:57 +03:00
clayjohn
385ee5c70b Implement Physical Light Units as an optional setting.
This allows light sources to be specified in physical light units in addition to the regular energy multiplier. In order to avoid loss of precision at high values, brightness values are premultiplied by an exposure normalization value.

In support of Physical Light Units this PR also renames CameraEffects to CameraAttributes.
2022-08-31 12:14:46 -07:00
Hugo Locurcio
09bedcead4
Add a per-light volumetric fog energy property
Per-light energy gives more control to the user on the final result of
volumetric fog. Specific lights can be fully excluded from volumetric fog
by setting their volumetric fog energy to 0, which improves performance
slightly. This can also be used to prevent short-lived dynamic effects
from poorly interacting with volumetric fog, as it's updated over several
frames by default unless temporal reprojection is disabled.

Volumetric fog shadows now obey Light3D's Shadow Opacity property as well.

The shadow fog fade property was removed as it had little visible impact
on the final scene's rendering.
2022-08-30 20:03:38 +02:00