Commit Graph

101 Commits

Author SHA1 Message Date
8fa94db248 Cache lightprobe generation for lightmap baking
Co-authored-by: Juan Linietsky <reduzio@gmail.com>
2025-10-29 14:07:23 +01:00
9fbf5808a0 Rename server "free" functions to "free_rid" to match exposed API 2025-09-30 16:52:25 -07:00
ae484828bb Merge pull request #107408 from Ivorforce/node-path-string-explicit
Make conversions from `NodePath` to `String` explicit.
2025-06-12 22:49:03 +02:00
8ba4656ea3 Compile out editor-only logic within validate_property in games 2025-06-12 12:54:19 +08:00
e2931a5c19 Make conversions from NodePath to String explicit. 2025-06-11 16:50:27 +02:00
8f9b7896f6 Make LightmapGIData::_set_user_data a proper setter instead of an additive operation 2025-06-05 19:21:57 -05:00
457299449d Introduce 'drivers/apple_embedded' abstract platform for code reuse 2025-05-19 15:37:13 -07:00
75566d1fac Properly report missing nodes in LightmapGI 2025-05-09 01:09:13 +04:00
94282d88f9 Core: Use Math namespace for constants 2025-04-10 16:29:30 -05:00
4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
80096e9e62 Fix a crash bug in LightmapGI::_assign_lightmaps triggered after reparenting
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.
2025-02-05 12:18:56 +01:00
2a3e0d47ea LightmapGI: Including modules_enabled.gen.h to properly check the configuration warning 2025-01-09 09:55:28 +01:00
054340bb6b Add a supersampling option to LightmapGI
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>
2025-01-07 18:44:59 +01:00
a1846b27ea Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
a3525bc015 Add transparency support for LightmapGI
Co-authored-by: Guerro323 <kaltobattle@gmail.com>
2024-12-18 19:36:16 +01:00
85e4d1b9d3 LightmapGI: Automatically compress new lightmaps 2024-12-12 17:43:47 +01:00
189c8eb671 Implement shadowmasks for LightmapGI
Co-authored-by: dearthdev <nathandearthdev@gmail.com>
2024-12-12 11:00:28 +01:00
5bca028e2b Add lightmap bake cancelling 2024-11-21 21:31:02 +02:00
1e5f0a86ca Allow more flexible adjustments of VisualInstance3D Lightmap Scale
Any floating-point value greater than 0.01 can now be used.
Prior to this change, only factors of 1×, 2× and 4× and 8× could be used.
2024-11-14 17:28:05 +01:00
b748c91e5b Merge pull request #98289 from BlueCube3310/lightmap-clenaup
LightmapGI: Clean up and improve lightmap atlas storage
2024-10-29 19:25:58 -05:00
184395401b LightmapGI: Clean up and improve lightmap atlas storage 2024-10-18 10:20:37 +02:00
de128812f3 Fix unreachable code in lightmap_gi.cpp 2024-10-15 13:17:15 +02:00
0807d60d68 Check RenderingDevice availability to display LightmapGI configuration warnings
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.
2024-09-28 23:56:47 +02:00
49b725ddcc Merge pull request #93353 from AThousandShips/config_warning_fix
Fix super call in various `get_configuration_warnings` methods
2024-09-08 23:21:09 +02:00
a89f4fa5a9 LightmapGI: Pack L1 SH coefficients for directional lightmaps 2024-09-05 22:46:58 +02:00
9dc231366d Fix super call in various get_configuration_warnings methods 2024-09-05 16:08:35 +02:00
cba8e3bf3d Merge pull request #95000 from Calinou/lightmapgi-environment-fix-custom-rotation-bake
Fix LightmapGI not taking environment sky rotation into account when baking
2024-08-16 10:35:13 +02:00
a3266e28be Merge pull request #83497 from grenappels/probe_distance_fix
Fix generated light probes placing too close to manual light probes
2024-08-16 10:33:12 +02:00
661cf1f351 Fix LightmapGI not taking environment sky rotation into account when baking
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>
2024-08-05 17:54:11 +02:00
a8526e68a7 Fix newly baked lightmap can't override previously baked at same path 2024-07-23 12:38:20 +08:00
60a255a0d0 Lightmapper: Prevent infinite loop when blitting lightmaps into an atlas 2024-07-13 13:10:04 +02:00
e7bd1b0673 Add denoiser range property for LightmapGI 2024-05-15 08:26:04 +02:00
a990e42207 LightmapGI: Reduce warnings and increase probe accuracy 2024-04-15 18:57:53 +02:00
21f0529aa9 Revert "Update Node::get_configuration_warnings signature"
This reverts commit d3852deaa4.
2024-02-17 19:03:21 +01:00
d3852deaa4 Update Node::get_configuration_warnings signature 2024-02-08 23:05:20 +01:00
efb1cbaad4 Add GLES3 infrastructure for lightmap baking in the compatibility backend 2024-01-24 17:13:30 -08:00
eea2ad4019 Add texel_scale property to LightmapGI 2024-01-04 16:24:19 +01:00
749f60ee36 OpenGL: Implement rendering of lightmaps 2023-12-04 18:34:06 -06:00
bf46ee144d Merge pull request #77788 from gongpha/stop-posting-about-(re)importing-assets-whatever-dot-exr
Avoid reimporting lightmap textures every getter call
2023-10-26 15:57:46 +02:00
e4d846378b Fix LightmapGI taking editor-only and sky-only lights into account
These lights are not visible when running the project (or at all),
so they shouldn't affect the lightmap baking process.
2023-10-23 22:56:17 +02:00
c165f0cf2e Avoid reimporting lightmap textures every getter call 2023-10-22 16:32:08 +07:00
97205ea5b8 fix to ensure generated light probes do not get placed too close to manual light probes 2023-10-17 08:56:35 -04:00
a9a197d2dc Rewrite the GPU Lightmapper's indirect lighting logic to match Godot 3.5's CPU Lightmapper.
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.
2023-10-13 14:33:55 -03:00
aa82cccc41 Merge pull request #81659 from DarioSamo/nlm-denoiser
Replace OIDN denoiser in Lightmapper with a JNLM denoiser compute shader.
2023-09-27 19:08:01 +02:00
538928b273 Merge pull request #81545 from bitsawer/fix_lightmap_gridmap_bake
Fix LightmapGI baking with GridMap
2023-09-26 08:20:29 +02:00
1b2b726502 Replace OIDN denoiser with a JNLM denoiser compute shader implementation. 2023-09-25 14:53:45 -03:00
8c26da5460 Fix LightmapGI baking with GridMap 2023-09-11 15:15:40 +03:00
7dfb854556 Propagate error correctly when max texture size for lightmaps is too small.
Add error handling for BAKE_ERROR_LIGHTMAP_TOO_SMALL, which was previously ignored. Fixes #81453.
2023-09-11 09:14:39 -03:00
faaf27f284 Fix various typos with codespell
Also includes typo fixes from #79993, #80068, #80276, and #80303.

Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-08-07 13:09:47 +02:00