<?xml version="1.0" encoding="UTF-8" ?>
<class name="VoxelGIData" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
	<brief_description>
		Contains baked voxel global illumination data for use in a [VoxelGI] node.
	</brief_description>
	<description>
		[VoxelGIData] contains baked voxel global illumination for use in a [VoxelGI] node. [VoxelGIData] also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the [VoxelGI] node again.
		[b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the Inspector then choosing [b]Save As...[/b].
	</description>
	<tutorials>
		<link title="Third Person Shooter (TPS) Demo">https://godotengine.org/asset-library/asset/2710</link>
	</tutorials>
	<methods>
		<method name="allocate">
			<return type="void" />
			<param index="0" name="to_cell_xform" type="Transform3D" />
			<param index="1" name="aabb" type="AABB" />
			<param index="2" name="octree_size" type="Vector3" />
			<param index="3" name="octree_cells" type="PackedByteArray" />
			<param index="4" name="data_cells" type="PackedByteArray" />
			<param index="5" name="distance_field" type="PackedByteArray" />
			<param index="6" name="level_counts" type="PackedInt32Array" />
			<description>
				Initializes this [VoxelGIData] with the specified data. [param octree_cells] must be a multiple of 32. [param octree_cells] must be double the size of [param data_cells]. The allocated data can be retrieved later using the various getter methods.
			</description>
		</method>
		<method name="get_bounds" qualifiers="const">
			<return type="AABB" />
			<description>
				Returns the bounds of the baked voxel data as an [AABB], which should match [member VoxelGI.size] after being baked (which only contains the size as a [Vector3]).
				[b]Note:[/b] If the size was modified without baking the VoxelGI data, then the value of [method get_bounds] and [member VoxelGI.size] will not match.
			</description>
		</method>
		<method name="get_data_cells" qualifiers="const">
			<return type="PackedByteArray" />
			<description>
				Returns the baked cell data for this [VoxelGIData].
			</description>
		</method>
		<method name="get_level_counts" qualifiers="const">
			<return type="PackedInt32Array" />
			<description>
				Returns the baked level counts for this [VoxelGIData].
			</description>
		</method>
		<method name="get_octree_cells" qualifiers="const">
			<return type="PackedByteArray" />
			<description>
				Returns the baked octree cell data for this [VoxelGIData].
			</description>
		</method>
		<method name="get_octree_size" qualifiers="const">
			<return type="Vector3" />
			<description>
				Returns the baked octree size for this [VoxelGIData], which corresponds to the number of subdivisions per axis. This can be viewed in the editor by hovering the [b]Bake VoxelGI[/b] button at the top of the 3D editor viewport when a [VoxelGI] node is selected and looking at the [b]Subdivisions[/b] field in the tooltip.
			</description>
		</method>
		<method name="get_to_cell_xform" qualifiers="const">
			<return type="Transform3D" />
			<description>
				Returns the baked cell transform for this [VoxelGIData].
			</description>
		</method>
	</methods>
	<members>
		<member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5">
			The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code].
		</member>
		<member name="dynamic_range" type="float" setter="set_dynamic_range" getter="get_dynamic_range" default="2.0">
			The dynamic range to use ([code]1.0[/code] represents a low dynamic range scene brightness). Higher values can be used to provide brighter indirect lighting, at the cost of more visible color banding in dark areas (both in indirect lighting and reflections). To avoid color banding, it's recommended to use the lowest value that does not result in visible light clipping.
		</member>
		<member name="energy" type="float" setter="set_energy" getter="get_energy" default="1.0">
			The energy of the indirect lighting and reflections produced by the [VoxelGI] node. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
		</member>
		<member name="interior" type="bool" setter="set_interior" getter="is_interior" default="false">
			If [code]true[/code], [Environment] lighting is ignored by the [VoxelGI] node. If [code]false[/code], [Environment] lighting is taken into account by the [VoxelGI] node. [Environment] lighting updates in real-time, which means it can be changed without having to bake the [VoxelGI] node again.
		</member>
		<member name="normal_bias" type="float" setter="set_normal_bias" getter="get_normal_bias" default="0.0">
			The normal bias to use for indirect lighting and reflections. Higher values reduce self-reflections visible in non-rough materials, at the cost of more visible light leaking and flatter-looking indirect lighting. See also [member bias]. To prioritize hiding self-reflections over lighting quality, set [member bias] to [code]0.0[/code] and [member normal_bias] to a value between [code]1.0[/code] and [code]2.0[/code].
		</member>
		<member name="propagation" type="float" setter="set_propagation" getter="get_propagation" default="0.5">
			The multiplier to use when light bounces off a surface. Higher values result in brighter indirect lighting. If indirect lighting looks too flat, try decreasing [member propagation] while increasing [member energy] at the same time. See also [member use_two_bounces] which influences the indirect lighting's effective brightness.
		</member>
		<member name="use_two_bounces" type="bool" setter="set_use_two_bounces" getter="is_using_two_bounces" default="true">
			If [code]true[/code], performs two bounces of indirect lighting instead of one. This makes indirect lighting look more natural and brighter at a small performance cost. The second bounce is also visible in reflections. If the scene appears too bright after enabling [member use_two_bounces], adjust [member propagation] and [member energy].
		</member>
	</members>
</class>
