public MyEnvironmentLightData InterpolateWith(ref MyEnvironmentLightData other, float interpolator) { var result = new MyEnvironmentLightData(); result.SunColorRaw = Vector3.Lerp(this.SunColorRaw, other.SunColorRaw, interpolator); result.BackLightColor1Raw = Vector3.Lerp(this.BackLightColor1Raw, other.BackLightColor1Raw, interpolator); result.BackLightColor2Raw = Vector3.Lerp(this.BackLightColor2Raw, other.BackLightColor2Raw, interpolator); result.SunDiffuseFactor = MathHelper.Lerp(this.SunDiffuseFactor, other.SunDiffuseFactor, interpolator); result.SunGlossFactor = MathHelper.Lerp(this.SunGlossFactor, other.SunGlossFactor, interpolator); result.BackLightGlossFactor = MathHelper.Lerp(this.BackLightGlossFactor, other.BackLightGlossFactor, interpolator); result.AmbientDiffuseFactor = MathHelper.Lerp(this.AmbientDiffuseFactor, other.AmbientDiffuseFactor, interpolator); result.AmbientSpecularFactor = MathHelper.Lerp(this.AmbientSpecularFactor, other.AmbientSpecularFactor, interpolator); result.AmbientForwardPass = MathHelper.Lerp(this.AmbientForwardPass, other.AmbientForwardPass, interpolator); result.AmbientGlobalMinimum = MathHelper.Lerp(this.AmbientGlobalMinimum, other.AmbientGlobalMinimum, interpolator); result.AmbientGlobalDensity = MathHelper.Lerp(this.AmbientGlobalDensity, other.AmbientGlobalDensity, interpolator); result.AmbientGlobalMultiplier = MathHelper.Lerp(this.AmbientGlobalMultiplier, other.AmbientGlobalMultiplier, interpolator); result.SunDiscColor = Vector3.Lerp(this.SunDiscColor, other.SunDiscColor, interpolator); result.SunDiscInnerDot = MathHelper.Lerp(this.SunDiscInnerDot, other.SunDiscInnerDot, interpolator); result.SunDiscOuterDot = MathHelper.Lerp(this.SunDiscOuterDot, other.SunDiscOuterDot, interpolator); result.AODirLight = MathHelper.Lerp(this.AODirLight, other.AODirLight, interpolator); result.AOIndirectLight = MathHelper.Lerp(this.AOIndirectLight, other.AOIndirectLight, interpolator); result.AOPointLight = MathHelper.Lerp(this.AOPointLight, other.AOPointLight, interpolator); result.AOSpotLight = MathHelper.Lerp(this.AOSpotLight, other.AOSpotLight, interpolator); result.SkyboxBrightness = MathHelper.Lerp(this.SkyboxBrightness, other.SkyboxBrightness, interpolator); result.EnvSkyboxBrightness = MathHelper.Lerp(this.EnvSkyboxBrightness, other.EnvSkyboxBrightness, interpolator); result.ShadowFadeoutMultiplier = MathHelper.Lerp(this.ShadowFadeoutMultiplier, other.ShadowFadeoutMultiplier, interpolator); result.EnvShadowFadeoutMultiplier = MathHelper.Lerp(this.EnvShadowFadeoutMultiplier, other.EnvShadowFadeoutMultiplier, interpolator); result.EnvAtmosphereBrightness = MathHelper.Lerp(this.EnvAtmosphereBrightness, other.EnvAtmosphereBrightness, interpolator); return(result); }
static MyEnvironmentLightData() { Default = new MyEnvironmentLightData() { SunColor = Defaults.SunColor, BackLightColor1 = Defaults.BackLightColor1, BackLightColor2 = Defaults.BackLightColor2, SunDiffuseFactor = Defaults.SunDiffuseFactor, SunGlossFactor = Defaults.SunGlossFactor, BackLightGlossFactor = Defaults.BackLightGlossFactor, AmbientDiffuseFactor = Defaults.AmbientDiffuseFactor, AmbientSpecularFactor = Defaults.AmbientSpecularFactor, AmbientForwardPass = Defaults.AmbientForwardPass, AmbientGlobalMinimum = Defaults.AmbientGlobalMinimum, AmbientGlobalDensity = Defaults.AmbientGlobalDensity, AmbientGlobalMultiplier = Defaults.AmbientGlobalMultiplier, SunDiscColor = Defaults.SunDiscColor, SunDiscInnerDot = Defaults.SunDiscInnerDot, SunDiscOuterDot = Defaults.SunDiscOuterDot, AODirLight = Defaults.AODirLight, AOIndirectLight = Defaults.AOIndirectLight, AOPointLight = Defaults.AOPointLight, AOSpotLight = Defaults.AOSpotLight, SkyboxBrightness = Defaults.SkyboxBrightness, EnvSkyboxBrightness = Defaults.EnvSkyboxBrightness, ShadowFadeoutMultiplier = Defaults.ShadowFadeoutMultiplier, EnvShadowFadeoutMultiplier = Defaults.EnvShadowFadeoutMultiplier, EnvAtmosphereBrightness = Defaults.EnvAtmosphereBrightness, }; }
public MyEnvironmentLightData InterpolateWith(ref MyEnvironmentLightData other, float interpolator) { var result = new MyEnvironmentLightData(); result.SunColorRaw = Vector3.Lerp(this.SunColorRaw, other.SunColorRaw, interpolator); result.BackLightColor1Raw = Vector3.Lerp(this.BackLightColor1Raw, other.BackLightColor1Raw, interpolator); result.BackLightColor2Raw = Vector3.Lerp(this.BackLightColor2Raw, other.BackLightColor2Raw, interpolator); result.SunDiffuseFactor = MathHelper.Lerp(this.SunDiffuseFactor, other.SunDiffuseFactor, interpolator); result.SunGlossFactor = MathHelper.Lerp(this.SunGlossFactor, other.SunGlossFactor, interpolator); result.BackLightGlossFactor = MathHelper.Lerp(this.BackLightGlossFactor, other.BackLightGlossFactor, interpolator); result.AmbientDiffuseFactor = MathHelper.Lerp(this.AmbientDiffuseFactor, other.AmbientDiffuseFactor, interpolator); result.AmbientSpecularFactor = MathHelper.Lerp(this.AmbientSpecularFactor, other.AmbientSpecularFactor, interpolator); result.AmbientForwardPass = MathHelper.Lerp(this.AmbientForwardPass, other.AmbientForwardPass, interpolator); result.AmbientGlobalMinimum = MathHelper.Lerp(this.AmbientGlobalMinimum, other.AmbientGlobalMinimum, interpolator); result.AmbientGlobalDensity = MathHelper.Lerp(this.AmbientGlobalDensity, other.AmbientGlobalDensity, interpolator); result.AmbientGlobalMultiplier = MathHelper.Lerp(this.AmbientGlobalMultiplier, other.AmbientGlobalMultiplier, interpolator); result.SunDiscColor = Vector3.Lerp(this.SunDiscColor, other.SunDiscColor, interpolator); result.SunDiscInnerDot = MathHelper.Lerp(this.SunDiscInnerDot, other.SunDiscInnerDot, interpolator); result.SunDiscOuterDot = MathHelper.Lerp(this.SunDiscOuterDot, other.SunDiscOuterDot, interpolator); result.AODirLight = MathHelper.Lerp(this.AODirLight, other.AODirLight, interpolator); result.AOIndirectLight = MathHelper.Lerp(this.AOIndirectLight, other.AOIndirectLight, interpolator); result.AOPointLight = MathHelper.Lerp(this.AOPointLight, other.AOPointLight, interpolator); result.AOSpotLight = MathHelper.Lerp(this.AOSpotLight, other.AOSpotLight, interpolator); result.SkyboxBrightness = MathHelper.Lerp(this.SkyboxBrightness, other.SkyboxBrightness, interpolator); result.EnvSkyboxBrightness = MathHelper.Lerp(this.EnvSkyboxBrightness, other.EnvSkyboxBrightness, interpolator); result.ShadowFadeoutMultiplier = MathHelper.Lerp(this.ShadowFadeoutMultiplier, other.ShadowFadeoutMultiplier, interpolator); result.EnvShadowFadeoutMultiplier = MathHelper.Lerp(this.EnvShadowFadeoutMultiplier, other.EnvShadowFadeoutMultiplier, interpolator); result.EnvAtmosphereBrightness = MathHelper.Lerp(this.EnvAtmosphereBrightness, other.EnvAtmosphereBrightness, interpolator); return result; }