示例#1
0
 /// <summary>
 /// Populate the fogging effect parameters.
 /// </summary>
 public void PopulateFogging(Fog fog)
 {
     this.FogEnabled = fog.Enabled;
     if (!fog.Enabled) return; // OPTIMIZATION
     this.FogStart = fog.Start;
     this.FogEnd = fog.End;
     this.FogColor = fog.Color;
 }
示例#2
0
 /// <summary>
 /// Populate the fogging parameters of a BasicEffect.
 /// </summary>
 public static void PopulateFogging(this BasicEffect basicEffect, Fog fog)
 {
     basicEffect.FogEnabled = fog.Enabled;
     if (!fog.Enabled) return; // OPTIMIZATION
     basicEffect.FogStart = fog.Start;
     basicEffect.FogEnd = fog.End;
     basicEffect.FogColor = fog.Color.ToVector3();
 }