protected override void DrawPrepare() {
base.DrawPrepare();
_effect.FxAmbientDown.Set(AmbientLower);
_effect.FxAmbientRange.Set(AmbientUpper - AmbientLower);
if (Sun != null) {
_effect.FxDirectionalLightDirection.Set(Sun.Direction);
_effect.FxLightColor.Set(AmbientLight(Sun.Color));
} else {
_effect.FxDirectionalLightDirection.Set(Vector3.Zero);
_effect.FxLightColor.Set(Vector3.Zero);
}
}