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
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.
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.
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.
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.
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.
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) )
```
* 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.
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.
- 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>
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
* 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.