summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml12
-rw-r--r--.gitattributes1
-rw-r--r--core/register_core_types.cpp4
-rw-r--r--doc/classes/BakedLightmap.xml81
-rw-r--r--doc/classes/BakedLightmapData.xml65
-rw-r--r--doc/classes/Cubemap.xml2
-rw-r--r--doc/classes/CubemapArray.xml2
-rw-r--r--doc/classes/GIProbe.xml2
-rw-r--r--doc/classes/GeometryInstance3D.xml48
-rw-r--r--doc/classes/LightmapProbe.xml13
-rw-r--r--doc/classes/LightmapperRD.xml13
-rw-r--r--doc/classes/Mesh.xml2
-rw-r--r--doc/classes/ProjectSettings.xml29
-rw-r--r--doc/classes/RenderingServer.xml128
-rw-r--r--doc/classes/ResourceFormatLoader.xml2
-rw-r--r--doc/classes/StreamCubemap.xml13
-rw-r--r--doc/classes/StreamCubemapArray.xml13
-rw-r--r--doc/classes/StreamTexture2D.xml (renamed from doc/classes/StreamTexture.xml)2
-rw-r--r--doc/classes/StreamTexture2DArray.xml13
-rw-r--r--doc/classes/StreamTextureLayered.xml25
-rw-r--r--doc/classes/Texture2DArray.xml2
-rw-r--r--doc/classes/TextureLayered.xml28
-rw-r--r--doc/classes/TileMap.xml8
-rw-r--r--editor/icons/README.md15
-rw-r--r--editor/import/resource_importer_scene.cpp4
-rw-r--r--main/main.cpp2
-rw-r--r--scene/2d/tile_map.cpp24
-rw-r--r--scene/2d/tile_map.h8
-rw-r--r--scene/3d/baked_lightmap.cpp10
-rw-r--r--scene/3d/baked_lightmap.h12
-rw-r--r--scene/resources/texture.cpp2
-rw-r--r--servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp4
32 files changed, 364 insertions, 225 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index e2105be6c0..6e124cb265 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -41,9 +41,13 @@ build_script:
- scons platform=%GD_PLATFORM% target=%TARGET% tools=%TOOLS% %OPTIONS% %EXTRA_ARGS%
after_build:
- - 7z a godot_build.zip bin\*.exe
+ - git rev-parse --short=9 HEAD > VERSION_HASH.txt
+ - set /P VERSION_HASH= < VERSION_HASH.txt
+ - cd bin
+ - mv godot.windows.opt.tools.64.exe godot_%APPVEYOR_REPO_BRANCH%-%VERSION_HASH%_win64.exe
+ - 7z a -mx9 godot_%APPVEYOR_REPO_BRANCH%-%VERSION_HASH%_win64.zip *.exe
artifacts:
- - path: godot_build.zip
- name: Build
- type: zip
+ - path: bin/godot_${APPVEYOR_REPO_BRANCH}-${VERSION_HASH}_win64.zip
+ name: Win64 release_debug editor build
+ type: zip \ No newline at end of file
diff --git a/.gitattributes b/.gitattributes
index 40a5e6183f..88c00855d8 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -13,3 +13,4 @@ thirdparty/* linguist-vendored
*.jar binary
*.png binary
*.ttf binary
+*.tza binary
diff --git a/core/register_core_types.cpp b/core/register_core_types.cpp
index 23f549be1a..4cf7e45205 100644
--- a/core/register_core_types.cpp
+++ b/core/register_core_types.cpp
@@ -233,8 +233,8 @@ void register_core_settings() {
GLOBAL_DEF_RST("network/limits/packet_peer_stream/max_buffer_po2", (16));
ProjectSettings::get_singleton()->set_custom_property_info("network/limits/packet_peer_stream/max_buffer_po2", PropertyInfo(Variant::INT, "network/limits/packet_peer_stream/max_buffer_po2", PROPERTY_HINT_RANGE, "0,64,1,or_greater"));
- GLOBAL_DEF("network/ssl/certificates", "");
- ProjectSettings::get_singleton()->set_custom_property_info("network/ssl/certificates", PropertyInfo(Variant::STRING, "network/ssl/certificates", PROPERTY_HINT_FILE, "*.crt"));
+ GLOBAL_DEF("network/ssl/certificate_bundle_override", "");
+ ProjectSettings::get_singleton()->set_custom_property_info("network/ssl/certificate_bundle_override", PropertyInfo(Variant::STRING, "network/ssl/certificate_bundle_override", PROPERTY_HINT_FILE, "*.crt"));
}
void register_core_singletons() {
diff --git a/doc/classes/BakedLightmap.xml b/doc/classes/BakedLightmap.xml
new file mode 100644
index 0000000000..6fd08fc4e4
--- /dev/null
+++ b/doc/classes/BakedLightmap.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BakedLightmap" inherits="VisualInstance3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <members>
+ <member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0005">
+ </member>
+ <member name="bounces" type="int" setter="set_bounces" getter="get_bounces" default="1">
+ </member>
+ <member name="directional" type="bool" setter="set_directional" getter="is_directional" default="false">
+ </member>
+ <member name="environment_custom_color" type="Color" setter="set_environment_custom_color" getter="get_environment_custom_color">
+ </member>
+ <member name="environment_custom_energy" type="float" setter="set_environment_custom_energy" getter="get_environment_custom_energy">
+ </member>
+ <member name="environment_custom_sky" type="Sky" setter="set_environment_custom_sky" getter="get_environment_custom_sky">
+ </member>
+ <member name="environment_mode" type="int" setter="set_environment_mode" getter="get_environment_mode" enum="BakedLightmap.EnvironmentMode" default="0">
+ </member>
+ <member name="generate_probes_subdiv" type="int" setter="set_generate_probes" getter="get_generate_probes" enum="BakedLightmap.GenerateProbes" default="0">
+ </member>
+ <member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
+ </member>
+ <member name="light_data" type="BakedLightmapData" setter="set_light_data" getter="get_light_data">
+ </member>
+ <member name="max_texture_size" type="int" setter="set_max_texture_size" getter="get_max_texture_size" default="16384">
+ </member>
+ <member name="quality" type="int" setter="set_bake_quality" getter="get_bake_quality" enum="BakedLightmap.BakeQuality" default="1">
+ </member>
+ <member name="use_denoiser" type="bool" setter="set_use_denoiser" getter="is_using_denoiser" default="true">
+ </member>
+ </members>
+ <constants>
+ <constant name="BAKE_QUALITY_LOW" value="0" enum="BakeQuality">
+ </constant>
+ <constant name="BAKE_QUALITY_MEDIUM" value="1" enum="BakeQuality">
+ </constant>
+ <constant name="BAKE_QUALITY_HIGH" value="2" enum="BakeQuality">
+ </constant>
+ <constant name="BAKE_QUALITY_ULTRA" value="3" enum="BakeQuality">
+ </constant>
+ <constant name="GENERATE_PROBES_DISABLED" value="0" enum="GenerateProbes">
+ </constant>
+ <constant name="GENERATE_PROBES_SUBDIV_4" value="1" enum="GenerateProbes">
+ </constant>
+ <constant name="GENERATE_PROBES_SUBDIV_8" value="2" enum="GenerateProbes">
+ </constant>
+ <constant name="GENERATE_PROBES_SUBDIV_16" value="3" enum="GenerateProbes">
+ </constant>
+ <constant name="GENERATE_PROBES_SUBDIV_32" value="4" enum="GenerateProbes">
+ </constant>
+ <constant name="BAKE_ERROR_OK" value="0" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_NO_LIGHTMAPPER" value="1" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_NO_SAVE_PATH" value="2" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_NO_MESHES" value="3" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_MESHES_INVALID" value="4" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_CANT_CREATE_IMAGE" value="5" enum="BakeError">
+ </constant>
+ <constant name="BAKE_ERROR_USER_ABORTED" value="6" enum="BakeError">
+ </constant>
+ <constant name="ENVIRONMENT_MODE_DISABLED" value="0" enum="EnvironmentMode">
+ </constant>
+ <constant name="ENVIRONMENT_MODE_SCENE" value="1" enum="EnvironmentMode">
+ </constant>
+ <constant name="ENVIRONMENT_MODE_CUSTOM_SKY" value="2" enum="EnvironmentMode">
+ </constant>
+ <constant name="ENVIRONMENT_MODE_CUSTOM_COLOR" value="3" enum="EnvironmentMode">
+ </constant>
+ </constants>
+</class>
diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml
new file mode 100644
index 0000000000..026477782a
--- /dev/null
+++ b/doc/classes/BakedLightmapData.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="BakedLightmapData" inherits="Resource" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_user">
+ <return type="void">
+ </return>
+ <argument index="0" name="path" type="NodePath">
+ </argument>
+ <argument index="1" name="lightmap" type="Rect2">
+ </argument>
+ <argument index="2" name="offset" type="int">
+ </argument>
+ <argument index="3" name="arg3" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="clear_users">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_user_count" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="get_user_path" qualifiers="const">
+ <return type="NodePath">
+ </return>
+ <argument index="0" name="user_idx" type="int">
+ </argument>
+ <description>
+ </description>
+ </method>
+ <method name="is_using_spherical_harmonics" qualifiers="const">
+ <return type="bool">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="set_uses_spherical_harmonics">
+ <return type="void">
+ </return>
+ <argument index="0" name="uses_spherical_harmonics" type="bool">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="light_texture" type="TextureLayered" setter="set_light_texture" getter="get_light_texture">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Cubemap.xml b/doc/classes/Cubemap.xml
index 16431c65c9..61cb1d43f0 100644
--- a/doc/classes/Cubemap.xml
+++ b/doc/classes/Cubemap.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Cubemap" inherits="TextureLayered" version="4.0">
+<class name="Cubemap" inherits="ImageTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/CubemapArray.xml b/doc/classes/CubemapArray.xml
index 03cfd75acf..627baf79e0 100644
--- a/doc/classes/CubemapArray.xml
+++ b/doc/classes/CubemapArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="CubemapArray" inherits="TextureLayered" version="4.0">
+<class name="CubemapArray" inherits="ImageTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml
index df50244c77..23dd562653 100644
--- a/doc/classes/GIProbe.xml
+++ b/doc/classes/GIProbe.xml
@@ -19,7 +19,7 @@
<argument index="1" name="create_visual_debug" type="bool" default="false">
</argument>
<description>
- Bakes the effect from all [GeometryInstance3D]s marked with [member GeometryInstance3D.use_in_baked_light] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring.
+ Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_INDIRECT] or [constant Light3D.BAKE_ALL]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [GIProbe]'s data and debug any issues that may be occurring.
</description>
</method>
<method name="debug_bake">
diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml
index 518a172973..cc85ce295b 100644
--- a/doc/classes/GeometryInstance3D.xml
+++ b/doc/classes/GeometryInstance3D.xml
@@ -9,15 +9,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_flag" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="flag" type="int" enum="GeometryInstance3D.Flags">
- </argument>
- <description>
- Returns the [enum GeometryInstance3D.Flags] that have been set for this object.
- </description>
- </method>
<method name="get_shader_instance_uniform" qualifiers="const">
<return type="Variant">
</return>
@@ -35,17 +26,6 @@
Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero.
</description>
</method>
- <method name="set_flag">
- <return type="void">
- </return>
- <argument index="0" name="flag" type="int" enum="GeometryInstance3D.Flags">
- </argument>
- <argument index="1" name="value" type="bool">
- </argument>
- <description>
- Sets the [enum GeometryInstance3D.Flags] specified. See [enum GeometryInstance3D.Flags] for options.
- </description>
- </method>
<method name="set_shader_instance_uniform">
<return type="void">
</return>
@@ -64,6 +44,10 @@
<member name="extra_cull_margin" type="float" setter="set_extra_cull_margin" getter="get_extra_cull_margin" default="0.0">
The extra distance added to the GeometryInstance3D's bounding box ([AABB]) to increase its cull box.
</member>
+ <member name="gi_lightmap_scale" type="int" setter="set_lightmap_scale" getter="get_lightmap_scale" enum="GeometryInstance3D.LightmapScale" default="0">
+ </member>
+ <member name="gi_mode" type="int" setter="set_gi_mode" getter="get_gi_mode" enum="GeometryInstance3D.GIMode" default="0">
+ </member>
<member name="lod_max_distance" type="float" setter="set_lod_max_distance" getter="get_lod_max_distance" default="0.0">
The GeometryInstance3D's max LOD distance.
[b]Note:[/b] This property currently has no effect.
@@ -84,11 +68,6 @@
The material override for the whole geometry.
If a material is assigned to this property, it will be used instead of any material set in any material slot of the mesh.
</member>
- <member name="use_dynamic_gi" type="bool" setter="set_flag" getter="get_flag" default="false">
- </member>
- <member name="use_in_baked_light" type="bool" setter="set_flag" getter="get_flag" default="false">
- If [code]true[/code], this GeometryInstance3D will be used when baking lights using a [GIProbe].
- </member>
</members>
<constants>
<constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting">
@@ -106,16 +85,21 @@
Will only show the shadows casted from this object.
In other words, the actual mesh will not be visible, only the shadows casted from the mesh will be.
</constant>
- <constant name="FLAG_USE_BAKED_LIGHT" value="0" enum="Flags">
- Will allow the GeometryInstance3D to be used when baking lights using a [GIProbe].
+ <constant name="GI_MODE_DISABLED" value="0" enum="GIMode">
+ </constant>
+ <constant name="GI_MODE_BAKED" value="1" enum="GIMode">
+ </constant>
+ <constant name="GI_MODE_DYNAMIC" value="2" enum="GIMode">
+ </constant>
+ <constant name="LIGHTMAP_SCALE_1X" value="0" enum="LightmapScale">
+ </constant>
+ <constant name="LIGHTMAP_SCALE_2X" value="1" enum="LightmapScale">
</constant>
- <constant name="FLAG_USE_DYNAMIC_GI" value="1" enum="Flags">
+ <constant name="LIGHTMAP_SCALE_4X" value="2" enum="LightmapScale">
</constant>
- <constant name="FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="2" enum="Flags">
- Unused in this class, exposed for consistency with [enum RenderingServer.InstanceFlags].
+ <constant name="LIGHTMAP_SCALE_8X" value="3" enum="LightmapScale">
</constant>
- <constant name="FLAG_MAX" value="3" enum="Flags">
- Represents the size of the [enum Flags] enum.
+ <constant name="LIGHTMAP_SCALE_MAX" value="4" enum="LightmapScale">
</constant>
</constants>
</class>
diff --git a/doc/classes/LightmapProbe.xml b/doc/classes/LightmapProbe.xml
new file mode 100644
index 0000000000..3af71f3774
--- /dev/null
+++ b/doc/classes/LightmapProbe.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LightmapProbe" inherits="Node3D" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/LightmapperRD.xml b/doc/classes/LightmapperRD.xml
new file mode 100644
index 0000000000..0993b28f19
--- /dev/null
+++ b/doc/classes/LightmapperRD.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="LightmapperRD" inherits="Lightmapper" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml
index 6958c815a6..367099e455 100644
--- a/doc/classes/Mesh.xml
+++ b/doc/classes/Mesh.xml
@@ -102,7 +102,7 @@
</method>
</methods>
<members>
- <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2( 0, 0 )">
+ <member name="lightmap_size_hint" type="Vector2i" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint" default="Vector2i( 0, 0 )">
Sets a hint to be used for lightmap resolution.
</member>
</members>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index dc07dd8837..92f116c7ec 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -874,8 +874,9 @@
<member name="network/remote_fs/page_size" type="int" setter="" getter="" default="65536">
Page size used by remote filesystem (in bytes).
</member>
- <member name="network/ssl/certificates" type="String" setter="" getter="" default="&quot;&quot;">
- CA certificates bundle to use for SSL connections. If not defined, Godot's internal CA certificates are used.
+ <member name="network/ssl/certificate_bundle_override" type="String" setter="" getter="" default="&quot;&quot;">
+ The CA certificates bundle to use for SSL connections. If this is set to a non-empty value, this will [i]override[/i] Godot's default [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]Mozilla certificate bundle[/url]. If left empty, the default certificate bundle will be used.
+ If in doubt, leave this setting empty.
</member>
<member name="node/name_casing" type="int" setter="" getter="" default="0">
When creating node names automatically, set the type of casing in this project. This is mostly an editor setting.
@@ -977,8 +978,32 @@
<member name="rendering/environment/default_environment" type="String" setter="" getter="" default="&quot;&quot;">
[Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here.
</member>
+ <member name="rendering/gpu_lightmapper/performance/max_rays_per_pass" type="int" setter="" getter="" default="32">
+ </member>
+ <member name="rendering/gpu_lightmapper/performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64">
+ </member>
+ <member name="rendering/gpu_lightmapper/performance/region_size" type="int" setter="" getter="" default="512">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/high_quality_ray_count" type="int" setter="" getter="" default="256">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/low_quality_ray_count" type="int" setter="" getter="" default="16">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/medium_quality_ray_count" type="int" setter="" getter="" default="64">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048">
+ </member>
+ <member name="rendering/gpu_lightmapper/quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024">
+ </member>
<member name="rendering/high_end/global_shader_variables_buffer_size" type="int" setter="" getter="" default="65536">
</member>
+ <member name="rendering/lightmapper/probe_capture_update_speed" type="float" setter="" getter="" default="15">
+ </member>
<member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="128000">
Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves.
</member>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index 648f4d0107..d8be6d4bd7 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -1282,7 +1282,7 @@
<argument index="1" name="base" type="RID">
</argument>
<description>
- Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario.
+ Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario.
</description>
</method>
<method name="instance_set_blend_shape_weight">
@@ -1377,19 +1377,6 @@
Sets the world space transform of the instance. Equivalent to [member Node3D.transform].
</description>
</method>
- <method name="instance_set_use_lightmap">
- <return type="void">
- </return>
- <argument index="0" name="instance" type="RID">
- </argument>
- <argument index="1" name="lightmap_instance" type="RID">
- </argument>
- <argument index="2" name="lightmap" type="RID">
- </argument>
- <description>
- Sets the lightmap to use with this instance.
- </description>
- </method>
<method name="instance_set_visible">
<return type="void">
</return>
@@ -1584,115 +1571,6 @@
Sets whether GI probes capture light information from this light.
</description>
</method>
- <method name="lightmap_capture_create">
- <return type="RID">
- </return>
- <description>
- Creates a lightmap capture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] RenderingServer functions.
- Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method.
- To place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID.
- </description>
- </method>
- <method name="lightmap_capture_get_bounds" qualifiers="const">
- <return type="AABB">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- Returns the size of the lightmap capture area.
- </description>
- </method>
- <method name="lightmap_capture_get_energy" qualifiers="const">
- <return type="float">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- Returns the energy multiplier used by the lightmap capture.
- </description>
- </method>
- <method name="lightmap_capture_get_octree" qualifiers="const">
- <return type="PackedByteArray">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- Returns the octree used by the lightmap capture.
- </description>
- </method>
- <method name="lightmap_capture_get_octree_cell_subdiv" qualifiers="const">
- <return type="int">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- Returns the cell subdivision amount used by this lightmap capture's octree.
- </description>
- </method>
- <method name="lightmap_capture_get_octree_cell_transform" qualifiers="const">
- <return type="Transform">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <description>
- Returns the cell transform for this lightmap capture's octree.
- </description>
- </method>
- <method name="lightmap_capture_set_bounds">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="bounds" type="AABB">
- </argument>
- <description>
- Sets the size of the area covered by the lightmap capture.
- </description>
- </method>
- <method name="lightmap_capture_set_energy">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="energy" type="float">
- </argument>
- <description>
- Sets the energy multiplier for this lightmap capture.
- </description>
- </method>
- <method name="lightmap_capture_set_octree">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="octree" type="PackedByteArray">
- </argument>
- <description>
- Sets the octree to be used by this lightmap capture.
- </description>
- </method>
- <method name="lightmap_capture_set_octree_cell_subdiv">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="subdiv" type="int">
- </argument>
- <description>
- Sets the subdivision level of this lightmap capture's octree.
- </description>
- </method>
- <method name="lightmap_capture_set_octree_cell_transform">
- <return type="void">
- </return>
- <argument index="0" name="capture" type="RID">
- </argument>
- <argument index="1" name="xform" type="Transform">
- </argument>
- <description>
- Sets the octree cell transform for this lightmap capture's octree.
- </description>
- </method>
<method name="make_sphere_mesh">
<return type="RID">
</return>
@@ -3725,8 +3603,8 @@
<constant name="INSTANCE_GI_PROBE" value="8" enum="InstanceType">
The instance is a GI probe.
</constant>
- <constant name="INSTANCE_LIGHTMAP_CAPTURE" value="9" enum="InstanceType">
- The instance is a lightmap capture.
+ <constant name="INSTANCE_LIGHTMAP" value="9" enum="InstanceType">
+ The instance is a lightmap.
</constant>
<constant name="INSTANCE_MAX" value="10" enum="InstanceType">
Represents the size of the [enum InstanceType] enum.
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index 713f2c1726..ad0c438f98 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -6,7 +6,7 @@
<description>
Godot loads resources in the editor or in exported games using ResourceFormatLoaders. They are queried automatically via the [ResourceLoader] singleton, or when a resource with internal dependencies is loaded. Each file type may load as a different resource type, so multiple ResourceFormatLoaders are registered in the engine.
Extending this class allows you to define your own loader. Be sure to respect the documented return types and values. You should give it a global class name with [code]class_name[/code] for it to be registered. Like built-in ResourceFormatLoaders, it will be called automatically when loading resources of its handled type(s). You may also implement a [ResourceFormatSaver].
- [b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture]) first, so they can be loaded with better efficiency on the graphics card.
+ [b]Note:[/b] You can also extend [EditorImportPlugin] if the resource type you need exists but Godot is unable to load its format. Choosing one way over another depends if the format is suitable or not for the final exported game. For example, it's better to import [code].png[/code] textures as [code].stex[/code] ([StreamTexture2D]) first, so they can be loaded with better efficiency on the graphics card.
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/StreamCubemap.xml b/doc/classes/StreamCubemap.xml
new file mode 100644
index 0000000000..16648266eb
--- /dev/null
+++ b/doc/classes/StreamCubemap.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamCubemap" inherits="StreamTextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StreamCubemapArray.xml b/doc/classes/StreamCubemapArray.xml
new file mode 100644
index 0000000000..b84973fd14
--- /dev/null
+++ b/doc/classes/StreamCubemapArray.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamCubemapArray" inherits="StreamTextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StreamTexture.xml b/doc/classes/StreamTexture2D.xml
index 03afcb5b0d..214298475c 100644
--- a/doc/classes/StreamTexture.xml
+++ b/doc/classes/StreamTexture2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamTexture" inherits="Texture2D" version="4.0">
+<class name="StreamTexture2D" inherits="Texture2D" version="4.0">
<brief_description>
A [code].stex[/code] texture.
</brief_description>
diff --git a/doc/classes/StreamTexture2DArray.xml b/doc/classes/StreamTexture2DArray.xml
new file mode 100644
index 0000000000..ec545b24d0
--- /dev/null
+++ b/doc/classes/StreamTexture2DArray.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamTexture2DArray" inherits="StreamTextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ </methods>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/StreamTextureLayered.xml b/doc/classes/StreamTextureLayered.xml
new file mode 100644
index 0000000000..10a7aae976
--- /dev/null
+++ b/doc/classes/StreamTextureLayered.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="StreamTextureLayered" inherits="TextureLayered" version="4.0">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="load">
+ <return type="int" enum="Error">
+ </return>
+ <argument index="0" name="path" type="String">
+ </argument>
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="load_path" type="String" setter="load" getter="get_load_path" default="&quot;&quot;">
+ </member>
+ </members>
+ <constants>
+ </constants>
+</class>
diff --git a/doc/classes/Texture2DArray.xml b/doc/classes/Texture2DArray.xml
index 657506120e..bb9283803d 100644
--- a/doc/classes/Texture2DArray.xml
+++ b/doc/classes/Texture2DArray.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="Texture2DArray" inherits="TextureLayered" version="4.0">
+<class name="Texture2DArray" inherits="ImageTextureLayered" version="4.0">
<brief_description>
</brief_description>
<description>
diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml
index 66e5b69ab4..d81c3c7c5a 100644
--- a/doc/classes/TextureLayered.xml
+++ b/doc/classes/TextureLayered.xml
@@ -9,14 +9,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="create_from_images">
- <return type="int" enum="Error">
- </return>
- <argument index="0" name="images" type="Array">
- </argument>
- <description>
- </description>
- </method>
<method name="get_format" qualifiers="const">
<return type="int" enum="Image.Format">
</return>
@@ -40,6 +32,12 @@
Returns an [Image] resource with the data from specified [code]layer[/code].
</description>
</method>
+ <method name="get_layered_type" qualifiers="const">
+ <return type="int" enum="TextureLayered.LayeredType">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_layers" qualifiers="const">
<return type="int">
</return>
@@ -53,17 +51,19 @@
Returns the width of the texture. Width is typically represented by the X-axis.
</description>
</method>
- <method name="update_layer">
- <return type="void">
+ <method name="has_mipmaps" qualifiers="const">
+ <return type="bool">
</return>
- <argument index="0" name="image" type="Image">
- </argument>
- <argument index="1" name="layer" type="int">
- </argument>
<description>
</description>
</method>
</methods>
<constants>
+ <constant name="LAYERED_TYPE_2D_ARRAY" value="0" enum="LayeredType">
+ </constant>
+ <constant name="LAYERED_TYPE_CUBEMAP" value="1" enum="LayeredType">
+ </constant>
+ <constant name="LAYERED_TYPE_CUBEMAP_ARRAY" value="2" enum="LayeredType">
+ </constant>
</constants>
</class>
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml
index bfe6983f06..9df2b656f4 100644
--- a/doc/classes/TileMap.xml
+++ b/doc/classes/TileMap.xml
@@ -80,13 +80,13 @@
Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]).
</description>
</method>
- <method name="get_used_cells_by_id" qualifiers="const">
+ <method name="get_used_cells_by_index" qualifiers="const">
<return type="Vector2i[]">
</return>
- <argument index="0" name="id" type="int">
+ <argument index="0" name="index" type="int">
</argument>
<description>
- Returns an array of all cells with the given tile [code]id[/code].
+ Returns an array of all cells with the given tile [code]index[/code].
</description>
</method>
<method name="get_used_rect">
@@ -273,7 +273,7 @@
<member name="cell_tile_origin" type="int" setter="set_tile_origin" getter="get_tile_origin" enum="TileMap.TileOrigin" default="0">
Position for tile origin. See [enum TileOrigin] for possible values.
</member>
- <member name="cell_y_sort" type="bool" setter="set_y_sort_mode" getter="is_y_sort_mode_enabled" default="false">
+ <member name="cell_y_sort" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false">
If [code]true[/code], the TileMap's children will be drawn in order of their Y coordinate.
</member>
<member name="centered_textures" type="bool" setter="set_centered_textures" getter="is_centered_textures_enabled" default="false">
diff --git a/editor/icons/README.md b/editor/icons/README.md
index 5f652e47ab..3159565180 100644
--- a/editor/icons/README.md
+++ b/editor/icons/README.md
@@ -1,12 +1,7 @@
-The icons here are optimized SVGs, because the editor renders the svgs at runtime, they need
-to be small in size, so they can be efficiently parsed.
+# Editor icons
-The original icons can be found at:
-https://github.com/godotengine/godot-design/tree/master/engine/icons
+This folder contains all the icons used by Godot editor (except for platform
+icons which are located in their respective platform folder).
-There you can find the optimizer script.
-
-If you add a new icon, please make a pull request to this repo:
-https://github.com/godotengine/godot-design/
-
-and store the optimized SVG version here.
+See [Editor icons](https://docs.godotengine.org/en/latest/development/editor/creating_icons.html)
+in the documentation for details on creating icons for the Godot editor.
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index b9341b1fb6..37941109a1 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -1582,7 +1582,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
post_import_script->init(base_path, p_source_file);
scene = post_import_script->post_import(scene);
if (!scene) {
- EditorNode::add_io_error(TTR("Error running post-import script:") + " " + post_import_script_path);
+ EditorNode::add_io_error(
+ TTR("Error running post-import script:") + " " + post_import_script_path + "\n" +
+ TTR("Did you return a Node-derived object in the `post_import()` method?"));
return err;
}
}
diff --git a/main/main.cpp b/main/main.cpp
index 65c6fdd397..83c3e190a8 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -2011,7 +2011,7 @@ bool Main::start() {
if (!project_manager && !editor) { // game
// Load SSL Certificates from Project Settings (or builtin).
- Crypto::load_default_certificates(GLOBAL_DEF("network/ssl/certificates", ""));
+ Crypto::load_default_certificates(GLOBAL_DEF("network/ssl/certificate_bundle_override", ""));
if (game_path != "") {
Node *scene = nullptr;
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp
index ac8136a79f..869f290f97 100644
--- a/scene/2d/tile_map.cpp
+++ b/scene/2d/tile_map.cpp
@@ -40,7 +40,7 @@
int TileMap::_get_quadrant_size() const {
- if (y_sort_mode)
+ if (use_y_sort)
return 1;
else
return quadrant_size;
@@ -1649,18 +1649,18 @@ Vector2 TileMap::world_to_map(const Vector2 &p_pos) const {
return ret.floor();
}
-void TileMap::set_y_sort_mode(bool p_enable) {
+void TileMap::set_y_sort_enabled(bool p_enable) {
_clear_quadrants();
- y_sort_mode = p_enable;
- RS::get_singleton()->canvas_item_set_sort_children_by_y(get_canvas_item(), y_sort_mode);
+ use_y_sort = p_enable;
+ RS::get_singleton()->canvas_item_set_sort_children_by_y(get_canvas_item(), use_y_sort);
_recreate_quadrants();
emit_signal("settings_changed");
}
-bool TileMap::is_y_sort_mode_enabled() const {
+bool TileMap::is_y_sort_enabled() const {
- return y_sort_mode;
+ return use_y_sort;
}
void TileMap::set_compatibility_mode(bool p_enable) {
@@ -1703,7 +1703,7 @@ TypedArray<Vector2i> TileMap::get_used_cells() const {
return a;
}
-TypedArray<Vector2i> TileMap::get_used_cells_by_id(int p_id) const {
+TypedArray<Vector2i> TileMap::get_used_cells_by_index(int p_id) const {
TypedArray<Vector2i> a;
for (Map<PosKey, Cell>::Element *E = tile_map.front(); E; E = E->next()) {
@@ -1823,8 +1823,8 @@ void TileMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_clip_uv", "enable"), &TileMap::set_clip_uv);
ClassDB::bind_method(D_METHOD("get_clip_uv"), &TileMap::get_clip_uv);
- ClassDB::bind_method(D_METHOD("set_y_sort_mode", "enable"), &TileMap::set_y_sort_mode);
- ClassDB::bind_method(D_METHOD("is_y_sort_mode_enabled"), &TileMap::is_y_sort_mode_enabled);
+ ClassDB::bind_method(D_METHOD("set_y_sort_enabled", "enable"), &TileMap::set_y_sort_enabled);
+ ClassDB::bind_method(D_METHOD("is_y_sort_enabled"), &TileMap::is_y_sort_enabled);
ClassDB::bind_method(D_METHOD("set_compatibility_mode", "enable"), &TileMap::set_compatibility_mode);
ClassDB::bind_method(D_METHOD("is_compatibility_mode_enabled"), &TileMap::is_compatibility_mode_enabled);
@@ -1874,7 +1874,7 @@ void TileMap::_bind_methods() {
ClassDB::bind_method(D_METHOD("clear"), &TileMap::clear);
ClassDB::bind_method(D_METHOD("get_used_cells"), &TileMap::get_used_cells);
- ClassDB::bind_method(D_METHOD("get_used_cells_by_id", "id"), &TileMap::get_used_cells_by_id);
+ ClassDB::bind_method(D_METHOD("get_used_cells_by_index", "index"), &TileMap::get_used_cells_by_index);
ClassDB::bind_method(D_METHOD("get_used_rect"), &TileMap::get_used_rect);
ClassDB::bind_method(D_METHOD("map_to_world", "map_position", "ignore_half_ofs"), &TileMap::map_to_world, DEFVAL(false));
@@ -1898,7 +1898,7 @@ void TileMap::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::TRANSFORM2D, "cell_custom_transform"), "set_custom_transform", "get_custom_transform");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_half_offset", PROPERTY_HINT_ENUM, "Offset X,Offset Y,Disabled,Offset Negative X,Offset Negative Y"), "set_half_offset", "get_half_offset");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cell_tile_origin", PROPERTY_HINT_ENUM, "Top Left,Center,Bottom Left"), "set_tile_origin", "get_tile_origin");
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_y_sort"), "set_y_sort_mode", "is_y_sort_mode_enabled");
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_y_sort"), "set_y_sort_enabled", "is_y_sort_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "compatibility_mode"), "set_compatibility_mode", "is_compatibility_mode_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "centered_textures"), "set_centered_textures", "is_centered_textures_enabled");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "cell_clip_uv"), "set_clip_uv", "get_clip_uv");
@@ -1960,7 +1960,7 @@ TileMap::TileMap() {
collision_parent = nullptr;
use_kinematic = false;
navigation = nullptr;
- y_sort_mode = false;
+ use_y_sort = false;
compatibility_mode = false;
centered_textures = false;
occluder_light_mask = 1;
diff --git a/scene/2d/tile_map.h b/scene/2d/tile_map.h
index cc1537f583..16784571bf 100644
--- a/scene/2d/tile_map.h
+++ b/scene/2d/tile_map.h
@@ -187,7 +187,7 @@ private:
Rect2 used_size_cache;
bool used_size_cache_dirty;
bool quadrant_order_dirty;
- bool y_sort_mode;
+ bool use_y_sort;
bool compatibility_mode;
bool centered_textures;
bool clip_uv;
@@ -319,8 +319,8 @@ public:
Vector2 map_to_world(const Vector2 &p_pos, bool p_ignore_ofs = false) const;
Vector2 world_to_map(const Vector2 &p_pos) const;
- void set_y_sort_mode(bool p_enable);
- bool is_y_sort_mode_enabled() const;
+ void set_y_sort_enabled(bool p_enable);
+ bool is_y_sort_enabled() const;
void set_compatibility_mode(bool p_enable);
bool is_compatibility_mode_enabled() const;
@@ -329,7 +329,7 @@ public:
bool is_centered_textures_enabled() const;
TypedArray<Vector2i> get_used_cells() const;
- TypedArray<Vector2i> get_used_cells_by_id(int p_id) const;
+ TypedArray<Vector2i> get_used_cells_by_index(int p_index) const;
Rect2 get_used_rect(); // Not const because of cache
void set_occluder_light_mask(int p_mask);
diff --git a/scene/3d/baked_lightmap.cpp b/scene/3d/baked_lightmap.cpp
index 6efe7f60b2..82a9a1e589 100644
--- a/scene/3d/baked_lightmap.cpp
+++ b/scene/3d/baked_lightmap.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "baked_lightmap.h"
+
#include "core/io/config_file.h"
#include "core/io/resource_saver.h"
#include "core/math/camera_matrix.h"
@@ -1477,10 +1478,19 @@ void BakedLightmap::_bind_methods() {
BIND_ENUM_CONSTANT(BAKE_QUALITY_LOW);
BIND_ENUM_CONSTANT(BAKE_QUALITY_MEDIUM);
BIND_ENUM_CONSTANT(BAKE_QUALITY_HIGH);
+ BIND_ENUM_CONSTANT(BAKE_QUALITY_ULTRA);
+
+ BIND_ENUM_CONSTANT(GENERATE_PROBES_DISABLED);
+ BIND_ENUM_CONSTANT(GENERATE_PROBES_SUBDIV_4);
+ BIND_ENUM_CONSTANT(GENERATE_PROBES_SUBDIV_8);
+ BIND_ENUM_CONSTANT(GENERATE_PROBES_SUBDIV_16);
+ BIND_ENUM_CONSTANT(GENERATE_PROBES_SUBDIV_32);
BIND_ENUM_CONSTANT(BAKE_ERROR_OK);
+ BIND_ENUM_CONSTANT(BAKE_ERROR_NO_LIGHTMAPPER);
BIND_ENUM_CONSTANT(BAKE_ERROR_NO_SAVE_PATH);
BIND_ENUM_CONSTANT(BAKE_ERROR_NO_MESHES);
+ BIND_ENUM_CONSTANT(BAKE_ERROR_MESHES_INVALID);
BIND_ENUM_CONSTANT(BAKE_ERROR_CANT_CREATE_IMAGE);
BIND_ENUM_CONSTANT(BAKE_ERROR_USER_ABORTED);
diff --git a/scene/3d/baked_lightmap.h b/scene/3d/baked_lightmap.h
index 020d5fe1e0..748fdf913f 100644
--- a/scene/3d/baked_lightmap.h
+++ b/scene/3d/baked_lightmap.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef BAKED_INDIRECT_LIGHT_H
-#define BAKED_INDIRECT_LIGHT_H
+#ifndef BAKED_LIGHTMAP_H
+#define BAKED_LIGHTMAP_H
#include "core/local_vector.h"
#include "scene/3d/light_3d.h"
@@ -110,6 +110,7 @@ public:
BAKE_QUALITY_HIGH,
BAKE_QUALITY_ULTRA,
};
+
enum GenerateProbes {
GENERATE_PROBES_DISABLED,
GENERATE_PROBES_SUBDIV_4,
@@ -125,8 +126,7 @@ public:
BAKE_ERROR_NO_MESHES,
BAKE_ERROR_MESHES_INVALID,
BAKE_ERROR_CANT_CREATE_IMAGE,
- BAKE_ERROR_USER_ABORTED
-
+ BAKE_ERROR_USER_ABORTED,
};
enum EnvironmentMode {
@@ -276,9 +276,9 @@ public:
BakedLightmap();
};
-VARIANT_ENUM_CAST(BakedLightmap::GenerateProbes);
VARIANT_ENUM_CAST(BakedLightmap::BakeQuality);
+VARIANT_ENUM_CAST(BakedLightmap::GenerateProbes);
VARIANT_ENUM_CAST(BakedLightmap::BakeError);
VARIANT_ENUM_CAST(BakedLightmap::EnvironmentMode);
-#endif // BAKED_INDIRECT_LIGHT_H
+#endif // BAKED_LIGHTMAP_H
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 6e155ddf91..b212bba826 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -1938,7 +1938,7 @@ void TextureLayered::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_height"), &TextureLayered::get_height);
ClassDB::bind_method(D_METHOD("get_layers"), &TextureLayered::get_layers);
ClassDB::bind_method(D_METHOD("has_mipmaps"), &TextureLayered::has_mipmaps);
- ClassDB::bind_method(D_METHOD("get_layer_data"), &TextureLayered::get_layer_data);
+ ClassDB::bind_method(D_METHOD("get_layer_data", "layer"), &TextureLayered::get_layer_data);
BIND_ENUM_CONSTANT(LAYERED_TYPE_2D_ARRAY);
BIND_ENUM_CONSTANT(LAYERED_TYPE_CUBEMAP);
diff --git a/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp b/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
index 3f0062b2ae..b639b4200a 100644
--- a/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
+++ b/servers/rendering/rasterizer_rd/rasterizer_scene_high_end_rd.cpp
@@ -3404,12 +3404,16 @@ RasterizerSceneHighEndRD::~RasterizerSceneHighEndRD() {
RD::get_singleton()->free(scene_state.gi_probe_buffer);
RD::get_singleton()->free(scene_state.directional_light_buffer);
RD::get_singleton()->free(scene_state.light_buffer);
+ RD::get_singleton()->free(scene_state.lightmap_buffer);
+ RD::get_singleton()->free(scene_state.lightmap_capture_buffer);
RD::get_singleton()->free(scene_state.reflection_buffer);
RD::get_singleton()->free(scene_state.decal_buffer);
memdelete_arr(scene_state.instances);
memdelete_arr(scene_state.gi_probes);
memdelete_arr(scene_state.directional_lights);
memdelete_arr(scene_state.lights);
+ memdelete_arr(scene_state.lightmaps);
+ memdelete_arr(scene_state.lightmap_captures);
memdelete_arr(scene_state.reflections);
memdelete_arr(scene_state.decals);
}