summaryrefslogtreecommitdiffstats
path: root/src/render/lights/qspotlight.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2019-08-07 07:47:31 +0200
committerPaul Lemire <paul.lemire@kdab.com>2019-08-07 08:33:30 +0200
commitfd64e870fad0e619704e79689f20645760dbdc0e (patch)
treee5ef1654a217bf82f0bb3549d1c8f1762f1a9f25 /src/render/lights/qspotlight.cpp
parent44470868450c440ca874ba585e2b71dfc8e89f1d (diff)
parent8af94d9a048f7d26a8137c3c51dcf47605fcf4b6 (diff)
Merge "Merge remote-tracking branch 'qt-gerrit/dev' into wip/refactor"
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.
*/
/*!