<?xml version="1.0" encoding="UTF-8" ?>
<class name="LightmapGIData" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
	<brief_description>
		Contains baked lightmap and dynamic object probe data for [LightmapGI].
	</brief_description>
	<description>
		[LightmapGIData] contains baked lightmap and dynamic object probe data for [LightmapGI]. It is replaced every time lightmaps are baked in [LightmapGI].
	</description>
	<tutorials>
	</tutorials>
	<methods>
		<method name="add_user">
			<return type="void" />
			<param index="0" name="path" type="NodePath" />
			<param index="1" name="uv_scale" type="Rect2" />
			<param index="2" name="slice_index" type="int" />
			<param index="3" name="sub_instance" type="int" />
			<description>
				Adds an object that is considered baked within this [LightmapGIData].
			</description>
		</method>
		<method name="clear_users">
			<return type="void" />
			<description>
				Clear all objects that are considered baked within this [LightmapGIData].
			</description>
		</method>
		<method name="get_user_count" qualifiers="const">
			<return type="int" />
			<description>
				Returns the number of objects that are considered baked within this [LightmapGIData].
			</description>
		</method>
		<method name="get_user_path" qualifiers="const">
			<return type="NodePath" />
			<param index="0" name="user_idx" type="int" />
			<description>
				Returns the [NodePath] of the baked object at index [param user_idx].
			</description>
		</method>
		<method name="is_using_spherical_harmonics" qualifiers="const">
			<return type="bool" />
			<description>
				If [code]true[/code], lightmaps were baked with directional information. See also [member LightmapGI.directional].
			</description>
		</method>
		<method name="set_uses_spherical_harmonics">
			<return type="void" />
			<param index="0" name="uses_spherical_harmonics" type="bool" />
			<description>
				If [param uses_spherical_harmonics] is [code]true[/code], tells the engine to treat the lightmap data as if it was baked with directional information.
				[b]Note:[/b] Changing this value on already baked lightmaps will not cause them to be baked again. This means the material appearance will look incorrect until lightmaps are baked again, in which case the value set here is discarded as the entire [LightmapGIData] resource is replaced by the lightmapper.
			</description>
		</method>
	</methods>
	<members>
		<member name="light_texture" type="TextureLayered" setter="set_light_texture" getter="get_light_texture" deprecated="The lightmap atlas can now contain multiple textures. See [member lightmap_textures].">
			The lightmap atlas texture generated by the lightmapper.
		</member>
		<member name="lightmap_textures" type="TextureLayered[]" setter="set_lightmap_textures" getter="get_lightmap_textures" default="[]">
			The lightmap atlas textures generated by the lightmapper.
		</member>
		<member name="shadowmask_textures" type="TextureLayered[]" setter="set_shadowmask_textures" getter="get_shadowmask_textures" default="[]">
			The shadowmask atlas textures generated by the lightmapper.
		</member>
	</members>
	<constants>
		<constant name="SHADOWMASK_MODE_NONE" value="0" enum="ShadowmaskMode">
			Shadowmasking is disabled. No shadowmask texture will be created when baking lightmaps. Existing shadowmask textures will be removed during baking.
		</constant>
		<constant name="SHADOWMASK_MODE_REPLACE" value="1" enum="ShadowmaskMode">
			Shadowmasking is enabled. Directional shadows that are outside the [member DirectionalLight3D.directional_shadow_max_distance] will be rendered using the shadowmask texture. Shadows that are inside the range will be rendered using real-time shadows exclusively. This mode allows for more precise real-time shadows up close, without the potential "smearing" effect that can occur when using lightmaps with a high texel size. The downside is that when the camera moves fast, the transition between the real-time light and shadowmask can be obvious. Also, objects that only have shadows baked in the shadowmask (and no real-time shadows) won't display any shadows up close.
		</constant>
		<constant name="SHADOWMASK_MODE_OVERLAY" value="2" enum="ShadowmaskMode">
			Shadowmasking is enabled. Directional shadows will be rendered with real-time shadows overlaid on top of the shadowmask texture. This mode makes for smoother shadow transitions when the camera moves fast, at the cost of a potential smearing effect for directional shadows that are up close (due to the real-time shadow being mixed with a low-resolution shadowmask). Objects that only have shadows baked in the shadowmask (and no real-time shadows) will keep their shadows up close.
		</constant>
	</constants>
</class>
