diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-10-06 11:49:09 +0000 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-10-06 16:58:43 +0200 |
commit | 07840524085bd1785b8f9142b03d942f678c5c51 (patch) | |
tree | 499c1674fdd1b3e0c07688d8e4e56748dfea2ca3 /src/Runtime/res/effectlib/funccalculatePointLightAttenuation.glsllib |
Initial import
Diffstat (limited to 'src/Runtime/res/effectlib/funccalculatePointLightAttenuation.glsllib')
-rw-r--r-- | src/Runtime/res/effectlib/funccalculatePointLightAttenuation.glsllib | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Runtime/res/effectlib/funccalculatePointLightAttenuation.glsllib b/src/Runtime/res/effectlib/funccalculatePointLightAttenuation.glsllib new file mode 100644 index 00000000..5f421622 --- /dev/null +++ b/src/Runtime/res/effectlib/funccalculatePointLightAttenuation.glsllib @@ -0,0 +1,4 @@ +float calculatePointLightAttenuation(vec3 attenuationConstants, float lightDistance ) { + return 1.0 / (attenuationConstants.x + attenuationConstants.y * lightDistance + + attenuationConstants.z * lightDistance * lightDistance); +} |