Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Link to 3D lights and shadows tutorial in AreaLight3D class documentation

Hugo Locurcio99cde155242f
diff --git a/doc/classes/AreaLight3D.xml b/doc/classes/AreaLight3D.xml
index c28b0b819bf..bc8d5790079 100644
--- a/doc/classes/AreaLight3D.xml
+++ b/doc/classes/AreaLight3D.xml
@@ -8,9 +8,11 @@
Light is emitted in the -Z direction of the node's global basis. For an unrotated light, this means that the light is emitted forwards, illuminating the front side of a 3D model (see [constant Vector3.FORWARD] and [constant Vector3.MODEL_FRONT]).
Area lights can cast soft shadows using PCSS, which you can control by tweaking the size parameter. The shadow map is drawn from the center of the light.
[b]Note:[/b] Area lights have limited support in the Mobile and Compatibility renderers. In the Mobile renderer, the size of the penumbra doesn't vary as it should with PCSS. In Compatibility, area lights cannot cast shadows.
+ [b]Warning:[/b] Shadows cast by an area light may look incorrect if the object casting shadows doesn't have enough subdivisions and it's very close to the area light. This is the same limitation as the Dual Paraboloid shadow mode on an [OmniLight3D].
[b]Performance:[/b] Area lights are more demanding on the GPU compared to omni and spot lights. In Forward+, there is an additional GPU cost on [i]all[/i] rendered objects as soon as one area light is present in the view frustum (due to the nature of clustered lighting). Consider using them only for cinematics or when targeting high-end devices.
</description>
<tutorials>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html#area-light</link>
</tutorials>
<members>
<member name="area_attenuation" type="float" setter="set_param" getter="get_param" default="1.0">
diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml
index a08ac19538c..4d568b88170 100644
--- a/doc/classes/DirectionalLight3D.xml
+++ b/doc/classes/DirectionalLight3D.xml
@@ -8,7 +8,7 @@
Light is emitted in the -Z direction of the node's global basis. For an unrotated light, this means that the light is emitted forwards, illuminating the front side of a 3D model (see [constant Vector3.FORWARD] and [constant Vector3.MODEL_FRONT]). The position of the node is ignored; only the basis is used to determine light direction.
</description>
<tutorials>
- <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html#directional-light</link>
<link title="Faking global illumination">$DOCS_URL/tutorials/3d/global_illumination/faking_global_illumination.html</link>
</tutorials>
<members>
diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml
index d3e42232bcb..8ca32913a45 100644
--- a/doc/classes/OmniLight3D.xml
+++ b/doc/classes/OmniLight3D.xml
@@ -9,7 +9,7 @@
[b]Note:[/b] When using the Mobile or Compatibility rendering methods, omni lights will only correctly affect meshes whose visibility AABB intersects with the light's AABB. If using a shader to deform the mesh in a way that makes it go outside its AABB, [member GeometryInstance3D.extra_cull_margin] must be increased on the mesh. Otherwise, the light may not be visible on the mesh.
</description>
<tutorials>
- <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html#omni-light</link>
<link title="Faking global illumination">$DOCS_URL/tutorials/3d/global_illumination/faking_global_illumination.html</link>
</tutorials>
<members>
diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml
index 81d47e37f0c..e78cd632343 100644
--- a/doc/classes/SpotLight3D.xml
+++ b/doc/classes/SpotLight3D.xml
@@ -10,7 +10,7 @@
[b]Note:[/b] When using the Mobile or Compatibility rendering methods, spot lights will only correctly affect meshes whose visibility AABB intersects with the light's AABB. If using a shader to deform the mesh in a way that makes it go outside its AABB, [member GeometryInstance3D.extra_cull_margin] must be increased on the mesh. Otherwise, the light may not be visible on the mesh.
</description>
<tutorials>
- <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html</link>
+ <link title="3D lights and shadows">$DOCS_URL/tutorials/3d/lights_and_shadows.html#spot-light</link>
<link title="Faking global illumination">$DOCS_URL/tutorials/3d/global_illumination/faking_global_illumination.html</link>
<link title="Third Person Shooter (TPS) Demo">https://godotengine.org/asset-library/asset/2710</link>
</tutorials>