`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.
Most classes that make sense have been converted. Missing:
* Physics servers
* VideoStream
* Script* classes.
which will go in a separate PR due to the complexity involved.
* Its not and will not be used for streaming.
* Streaming will be implemented in 4.1 and it will work different.
* It makes more sense to be called CompressedTexture since it imports and compresses texture files.
The value is already clamped in the editor, but it wasn't being
clamped when the value was set via code. Values outside the [0.0; 1.0]
range can result in broken rendering.
This brings PhysicalSkyMaterial's Night Sky functionality to
ProceduralSkyMaterial, but in a more powerful and general fashion.
This can be used to display stars at night, or clouds at day and night.
For clouds, it won't be physically accurate, but it can look good still.
The Sky Cover Modulate property can be used to adjust the sky cover's
colors and opacity in real-time, which is useful for day/night or weather
transitions.
- Tweak colors to be less saturated and more balanced (in terms of hue).
The cool blue sky is balanced by a warm brown ground,
which makes reflections look closer to how they'd look like when using
an HDRI panorama texture.
- Make the ground color dark on both ProceduralSkyMaterial and
PhysicalSkyMaterial to reduce indoor light leaking, especially
when using GI.
- Tweak the PhysicalSkyMaterial colors to be as close as possible
to ProceduralSkyMaterial (with the default sun orientation).
- Tweak editor environment defaults to be identical to the default
ProceduralSkyMaterial colors. Previously, the default editor sky
color was different from the colors of a newly created
ProceduralSkyMaterial resource.
Both new skies were tested without GI, with SDFGI and with VoxelGI.
They were tuned to look best when using ACES tonemapping with a
whitepoint set to 6, but they still look good with other
tonemapping operators.