Skip to content

Commit

Permalink
Fix constant intensities
Browse files Browse the repository at this point in the history
  • Loading branch information
StollD committed Sep 4, 2017
1 parent f11f9da commit 31c0fd0
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions Kopernicus/Kopernicus/Configuration/LightShifterLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,14 @@ public ColorParser sunlightColor
[ParserTarget("sunlightIntensity")]
public NumericParser<Single> sunlightIntensity
{
get { return lsc.sunlightIntensity; }
set { lsc.sunlightIntensity = value; }
set
{
lsc.intensityCurve = new FloatCurve(new Keyframe[]
{
new Keyframe(0, value),
new Keyframe(1, value)
});
}
}

// sunlightShadowStrength
Expand All @@ -81,8 +87,14 @@ public ColorParser scaledSunlightColor
[ParserTarget("scaledSunlightIntensity")]
public NumericParser<Single> scaledSunlightIntensity
{
get { return lsc.scaledSunlightIntensity; }
set { lsc.scaledSunlightIntensity = value; }
set
{
lsc.scaledIntensityCurve = new FloatCurve(new Keyframe[]
{
new Keyframe(0, value),
new Keyframe(1, value)
});
}
}

// IVASunColor
Expand All @@ -97,8 +109,14 @@ public ColorParser IVASunColor
[ParserTarget("IVASunIntensity")]
public NumericParser<Single> IVASunIntensity
{
get { return lsc.IVASunIntensity; }
set { lsc.IVASunIntensity = value; }
set
{
lsc.ivaIntensityCurve = new FloatCurve(new Keyframe[]
{
new Keyframe(0, value),
new Keyframe(1, value)
});
}
}

// ambientLightColor
Expand Down

0 comments on commit 31c0fd0

Please sign in to comment.