From 079a75e144f6d5822c949e7d953c0d86448eee5a Mon Sep 17 00:00:00 2001 From: clayjohn Date: Mon, 3 Jun 2024 09:37:57 +0200 Subject: [PATCH] Correct documentation for Omni and Spot light distance attenuation --- doc/classes/OmniLight3D.xml | 4 ++-- doc/classes/SpotLight3D.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/classes/OmniLight3D.xml b/doc/classes/OmniLight3D.xml index 64bf981a90e..b0965a26da0 100644 --- a/doc/classes/OmniLight3D.xml +++ b/doc/classes/OmniLight3D.xml @@ -15,8 +15,8 @@ Controls the distance attenuation function for omnilights. - A value of [code]0.0[/code] smoothly attenuates light at the edge of the range. A value of [code]1.0[/code] approaches a physical lighting model. A value of [code]0.5[/code] approximates linear attenuation. - [b]Note:[/b] Setting it to [code]1.0[/code] may result in distant objects receiving minimal light, even within range. For example, with a range of [code]4096[/code], an object at [code]100[/code] units receives less than [code]0.1[/code] energy. + A value of [code]0.0[/code] will maintain a constant brightness through most of the range, but smoothly attenuate the light at the edge of the range. Use a value of [code]2.0[/code] for physically accurate lights as it results in the proper inverse square attenutation. + [b]Note:[/b] Setting attenuation to [code]2.0[/code] or higher may result in distant objects receiving minimal light, even within range. For example, with a range of [code]4096[/code], an object at [code]100[/code] units is attenuated by a factor of [code]0.0001[/code]. With a default brightness of [code]1[/code], the light would not be visible at that distance. [b]Note:[/b] Using negative or values higher than [code]10.0[/code] may lead to unexpected results. diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml index 8d2177d3fd8..66908f5af13 100644 --- a/doc/classes/SpotLight3D.xml +++ b/doc/classes/SpotLight3D.xml @@ -25,8 +25,8 @@ Controls the distance attenuation function for spotlights. - A value of [code]0.0[/code] smoothly attenuates light at the edge of the range. A value of [code]1.0[/code] approaches a physical lighting model. A value of [code]0.5[/code] approximates linear attenuation. - [b]Note:[/b] Setting it to [code]1.0[/code] may result in distant objects receiving minimal light, even within range. For example, with a range of [code]4096[/code], an object at [code]100[/code] units receives less than [code]0.1[/code] energy. + A value of [code]0.0[/code] will maintain a constant brightness through most of the range, but smoothly attenuate the light at the edge of the range. Use a value of [code]2.0[/code] for physically accurate lights as it results in the proper inverse square attenutation. + [b]Note:[/b] Setting attenuation to [code]2.0[/code] or higher may result in distant objects receiving minimal light, even within range. For example, with a range of [code]4096[/code], an object at [code]100[/code] units is attenuated by a factor of [code]0.0001[/code]. With a default brightness of [code]1[/code], the light would not be visible at that distance. [b]Note:[/b] Using negative or values higher than [code]10.0[/code] may lead to unexpected results.