|
1 | | -// COPYRIGHT 2009, 2010, 2011, 2012, 2013 by the Open Rails project. |
2 | | -// |
| 1 | +// COPYRIGHT 2009 - 2023 by the Open Rails project. |
| 2 | +// |
3 | 3 | // This file is part of Open Rails. |
4 | | -// |
| 4 | +// |
5 | 5 | // Open Rails is free software: you can redistribute it and/or modify |
6 | 6 | // it under the terms of the GNU General Public License as published by |
7 | 7 | // the Free Software Foundation, either version 3 of the License, or |
8 | 8 | // (at your option) any later version. |
9 | | -// |
| 9 | +// |
10 | 10 | // Open Rails is distributed in the hope that it will be useful, |
11 | 11 | // but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | 12 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | 13 | // GNU General Public License for more details. |
14 | | -// |
| 14 | +// |
15 | 15 | // You should have received a copy of the GNU General Public License |
16 | 16 | // along with Open Rails. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 |
|
18 | | -// This file is the responsibility of the 3D & Environment Team. |
| 18 | +// This file is the responsibility of the 3D & Environment Team. |
19 | 19 |
|
20 | 20 | using System; |
21 | 21 | using System.IO; |
22 | 22 | using Microsoft.Xna.Framework; |
23 | 23 | using Microsoft.Xna.Framework.Content.Pipeline; |
24 | 24 | using Microsoft.Xna.Framework.Graphics; |
25 | | -using Orts.Viewer3D.Processes; |
26 | 25 | using ORTS.Common; |
| 26 | +using Orts.Viewer3D.Processes; |
27 | 27 |
|
28 | 28 | namespace Orts.Viewer3D |
29 | 29 | { |
@@ -308,7 +308,7 @@ public class SkyShader : Shader |
308 | 308 | readonly EffectParameter lightVector; |
309 | 309 | readonly EffectParameter time; |
310 | 310 | readonly EffectParameter overcast; |
311 | | - readonly EffectParameter windDisplacement; |
| 311 | + readonly EffectParameter cloudScalePosition; |
312 | 312 | readonly EffectParameter skyColor; |
313 | 313 | readonly EffectParameter fogColor; |
314 | 314 | readonly EffectParameter fog; |
@@ -382,16 +382,7 @@ public float Overcast |
382 | 382 | } |
383 | 383 | } |
384 | 384 |
|
385 | | - public float WindSpeed { get; set; } |
386 | | - |
387 | | - public float WindDirection |
388 | | - { |
389 | | - set |
390 | | - { |
391 | | - var totalWindDisplacement = 50 * WindSpeed * _time; // This exaggerates the wind speed, but it is necessary to get a visible effect |
392 | | - windDisplacement.SetValue(new Vector2(-(float)Math.Sin(value) * totalWindDisplacement, (float)Math.Cos(value) * totalWindDisplacement)); |
393 | | - } |
394 | | - } |
| 385 | + public Vector4 CloudScalePosition { set => cloudScalePosition.SetValue(value); } |
395 | 386 |
|
396 | 387 | public float MoonScale { get; set; } |
397 | 388 |
|
@@ -427,7 +418,7 @@ public SkyShader(GraphicsDevice graphicsDevice) |
427 | 418 | lightVector = Parameters["LightVector"]; |
428 | 419 | time = Parameters["Time"]; |
429 | 420 | overcast = Parameters["Overcast"]; |
430 | | - windDisplacement = Parameters["WindDisplacement"]; |
| 421 | + cloudScalePosition = Parameters["CloudScalePosition"]; |
431 | 422 | skyColor = Parameters["SkyColor"]; |
432 | 423 | fogColor = Parameters["FogColor"]; |
433 | 424 | fog = Parameters["Fog"]; |
|
0 commit comments