After reparenting the LightmapGI node, the following `node` would be
initialized to null:
Node *node = get_node(light_data->get_user_path(i));
Which would then crash when de-referenced further down. This fix detects
which the node has been reparented and clears its users.
This doesn't affect the size of the exported project (which uses
a VRAM-compressed copy by default), but it reduces the size of the files
that are committed to version control or included within MRP ZIPs.
When you iterate on lightmaps frequently and commit new versions of them,
this can add up to saving dozens if not hundreds of megabytes over time.
This change is fully backwards-compatible and forwards-compatible
with existing projects that use PNG shadowmask textures, as the shadowmask
path is saved in LightmapGIData.
This provides increased lightmap quality with less noise, smoother
shadows and better small-scale shadow detail. The downside is that
this significantly increases bake times and memory usage while baking
lightmaps, so this option is disabled by default.
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
Co-authored-by: landervr <31851431+CpnWaffle@users.noreply.github.com>
We can now check whether RenderingDevice can be created (which is
not guaranteed when using the Compatibility rendering method),
so the warning can be displayed only when relevant.
This also disables the Bake Lightmaps button with a tooltip if baking
is not available.
The sky rotation now affects the baked environment lighting as it should,
making it match how real-time ambient light rendering works.
Co-authored-by: Per Melin <git@melin.net>
Port over the logic from Godot 3.5 for indirect lighting. This should fix many issues about indirect bounces causing more energy and improve the overall quality of the result.
This increases the speed to be near instant and removes the perceived lightmap bake speed regression
We need to investigate the speed and quality issues with BPTC and re-enable compression when we can
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".