summaryrefslogtreecommitdiffstats
path: root/src/render/lights/qspotlight.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-30 03:03:34 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-07-30 03:03:34 +0200
commit94353454aa20b3fb51b53276f94024981925e5d3 (patch)
tree230858edeac7bee7281b6f72d611ab640b7fec85 /src/render/lights/qspotlight.cpp
parent7e60b6d599db9d4b18db3fe050d9f53ccb3125c1 (diff)
parent309c3139f8111ea246dd3a1f996578d0b35bb151 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/render/lights/qspotlight.cpp')
-rw-r--r--src/render/lights/qspotlight.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/render/lights/qspotlight.cpp b/src/render/lights/qspotlight.cpp
index 81c18387b..c4deaf817 100644
--- a/src/render/lights/qspotlight.cpp
+++ b/src/render/lights/qspotlight.cpp
@@ -83,6 +83,18 @@ QSpotLightPrivate::QSpotLightPrivate()
\since 5.5
\brief Encapsulate a Spot Light object in a Qt 3D scene.
+ A spotlight is a light source that emits a cone of light in a particular direction.
+
+ A spotlight uses three attenuation factors to describe how the intensity of the light
+ decreases over distance. These factors are designed to be used together in calcuating total
+ attenuation. For the materials in Qt3D Extras the following formula is used, where distance
+ is the distance from the light to the surface being rendered:
+
+ \code
+ totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));
+ \endcode
+
+ Custom materials may choose to interpret these factors differently.
*/
/*!
@@ -93,6 +105,18 @@ QSpotLightPrivate::QSpotLightPrivate()
\since 5.5
\brief Encapsulate a Spot Light object in a Qt 3D scene.
+ A spotlight is a light source that emits a cone of light in a particular direction.
+
+ A spotlight uses three attenuation factors to describe how the intensity of the light
+ decreases over distance. These factors are designed to be used together in calcuating total
+ attenuation. For the materials in Qt3D Extras the following formula is used, where distance
+ is the distance from the light to the surface being rendered:
+
+ \code
+ totalAttenuation = 1.0 / (constantAttenuation + (linearAttenuation * distance) + (quadraticAttenuation * distance * distance));
+ \endcode
+
+ Custom materials may choose to interpret these factors differently.
*/
/*!