Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
SandstormShader.cs
Go to the documentation of this file.
3
5
7{
8 private readonly Vector4 _backColor = new Vector4(0.2f, 0f, 0f, 1f);
9
10 private readonly Vector4 _frontColor = new Vector4(1f, 0.5f, 0f, 1f);
11
12 [RgbProcessor(/*Could not decode attribute arguments.*/)]
13 private void ProcessHighDetail(RgbDevice device, Fragment fragment, EffectDetailLevel quality, float time)
14 {
15 //IL_0000: Unknown result type (might be due to invalid IL or missing references)
16 if ((int)quality == 0)
17 {
18 time *= 0.25f;
19 }
20 for (int i = 0; i < fragment.Count; i++)
21 {
22 float staticNoise = NoiseHelper.GetStaticNoise(fragment.GetCanvasPositionOfIndex(i) * 0.3f + new Vector2(time, 0f - time) * 0.5f);
23 Vector4 vector = Vector4.Lerp(_backColor, _frontColor, staticNoise);
24 fragment.SetColor(i, vector);
25 }
26 }
27}
void SetColor(int index, Vector4 color)
Definition Fragment.cs:97
Vector2 GetCanvasPositionOfIndex(int index)
Definition Fragment.cs:75
static float GetStaticNoise(int index)
void ProcessHighDetail(RgbDevice device, Fragment fragment, EffectDetailLevel quality, float time)
static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount)
Definition Vector4.cs:277