private void SetupSky(ConfigAtmosphereCommon commonConfig, ConfigBackground config) { if (commonConfig.Tex != null) { this._skyMPB.SetTexture("_MainTex", commonConfig.Tex); this._skyMPB.SetColor("_TexRColor", config.RColor); this._skyMPB.SetColor("_TexGColor", config.GColor); this._skyMPB.SetColor("_TexBColor", config.BColor); this._skyMPB.SetFloat("_TexXLocation", config.XLocation); this._skyMPB.SetFloat("_TexYLocation", config.YLocation); this._skyMPB.SetFloat("_TexHigh", config.High); } if (commonConfig.SecondTex != null) { this._skyMPB.SetTexture("_SecTexture", commonConfig.SecondTex); this._skyMPB.SetFloat("_SecTexXLocation", config.SecTexXLocation); this._skyMPB.SetFloat("_SecTexYLocation", config.SecTexYLocation); this._skyMPB.SetFloat("_SecTexHigh", config.SecTexHigh); this._skyMPB.SetFloat("_SecTexEmission", config.SecTexEmission); } this._skyMPB.SetColor("_GradBottomColor", config.GradBottomColor); this._skyMPB.SetColor("_GradTopColor", config.GradTopColor); this._skyMPB.SetFloat("_GradLocation", config.GradLocation); this._skyMPB.SetFloat("_GradHigh", config.GradHigh); this._skyMPB.SetFloat("_BloomFactor", config.BloomFactor); this._skyRenderer.SetPropertyBlock(this._skyMPB); }
public void SetupAtmosphere(ConfigAtmosphereCommon commonConfig, ConfigAtmosphere config) { if (this._skyMPB == null) { this.Init(); } this.SetupSky(commonConfig, config.Background); this._cloudEmitter.SetupCloudConfig(commonConfig, config.CloudStyle); this.SetupIndoor(config.Indoor); }