Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ ProcessLowDetail()

void Terraria.GameContent.RGB.MeteoriteShader.ProcessLowDetail ( RgbDevice device,
Fragment fragment,
EffectDetailLevel quality,
float time )
inlineprivate

Definition at line 16 of file MeteoriteShader.cs.

17 {
18 for (int i = 0; i < fragment.Count; i++)
19 {
20 Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(i);
21 Vector4 vector = Vector4.Lerp(_baseColor, _secondaryColor, (float)Math.Sin(time + canvasPositionOfIndex.X) * 0.5f + 0.5f);
22 fragment.SetColor(i, vector);
23 }
24 }
void SetColor(int index, Vector4 color)
Definition Fragment.cs:97
Vector2 GetCanvasPositionOfIndex(int index)
Definition Fragment.cs:75
static double Sin(double a)
static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount)
Definition Vector4.cs:277

References Terraria.GameContent.RGB.MeteoriteShader._baseColor, Terraria.GameContent.RGB.MeteoriteShader._secondaryColor, ReLogic.Peripherals.RGB.Fragment.Count, ReLogic.Peripherals.RGB.Fragment.GetCanvasPositionOfIndex(), Microsoft.Xna.Framework.Vector4.Lerp(), ReLogic.Peripherals.RGB.Fragment.SetColor(), System.Math.Sin(), and Microsoft.Xna.Framework.Vector2.X.