Skip to content

Commit

Permalink
remove unnecessary variable in CIE light
Browse files Browse the repository at this point in the history
  • Loading branch information
PearCoding committed Feb 10, 2025
1 parent 8c91140 commit 7282617
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/runtime/light/CIELight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ void CIELight::serialize(const SerializationInput& input) const
{
input.Tree.beginClosure(name());

input.Tree.addColor("scale", *mLight, Vector3f::Ones());
input.Tree.addColor("zenith", *mLight, Vector3f::Ones());
input.Tree.addColor("ground", *mLight, Vector3f::Ones());
input.Tree.addNumber("ground_brightness", *mLight, 0.2f);
input.Tree.addComputedMatrix3("_transform", mLight->property("transform").getTransform().linear().transpose().inverse());
input.Tree.addVector("direction", *mLight, mSunDirection);

if (mClassification == CIEType::Uniform || mClassification == CIEType::Cloudy) {
bool cloudy = mClassification == CIEType::Cloudy;
Expand All @@ -62,6 +60,9 @@ void CIELight::serialize(const SerializationInput& input) const
<< ", " << (mHasGround ? "true" : "false")
<< ", " << input.Tree.getInlineMatrix3("_transform") << ");" << std::endl;
} else {
input.Tree.addColor("scale", *mLight, Vector3f::Ones());
input.Tree.addVector("direction", *mLight, mSunDirection);

auto ea = LoaderUtils::getEA(*mLight);
if (ea.Elevation > 87 * Deg2Rad) {
IG_LOG(L_WARNING) << " Sun too close to zenith, reducing elevation to 87 degrees" << std::endl;
Expand Down

0 comments on commit 7282617

Please sign in to comment.