diff options
author | Jackson Levitt <[email protected]> | 2025-06-05 02:41:30 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2025-06-05 09:41:30 +0200 |
commit | 8621d5243070eb85ad7411634b5463731fdac7ed (patch) | |
tree | dcfbe1e26ef4ce4870b437a641c8950fa159473b /code/AssetLib | |
parent | 5d39661751def8b36ebdfbb97a41d9581a3021eb (diff) |
Updated Inner Cone formula for Spot Lights in GLTF (#6078)HEADupstream/master
Updated the Inner Cone formula such that exponent values of 0 result in no inner cone and large exponent values result in a inner cone being most of the cone angle-wise.
Co-authored-by: Kim Kulling <[email protected]>
Diffstat (limited to 'code/AssetLib')
-rw-r--r-- | code/AssetLib/glTF/glTFImporter.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/code/AssetLib/glTF/glTFImporter.cpp b/code/AssetLib/glTF/glTFImporter.cpp index b68881021..901914da1 100644 --- a/code/AssetLib/glTF/glTFImporter.cpp +++ b/code/AssetLib/glTF/glTFImporter.cpp @@ -515,7 +515,7 @@ void glTFImporter::ImportLights(Asset &r) { CopyValue(l.color, ail->mColorSpecular); ail->mAngleOuterCone = l.falloffAngle; - ail->mAngleInnerCone = l.falloffExponent; // TODO fix this, it does not look right at all + ail->mAngleInnerCone = l.falloffAngle * (1.0f - 1.0f / (1.0f + l.falloffExponent)); ail->mAttenuationConstant = l.constantAttenuation; ail->mAttenuationLinear = l.linearAttenuation; |