Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ProcessLowDetail()

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

Definition at line 23 of file GolemShader.cs.

24 {
25 Vector4 value = Vector4.Lerp(_backgroundColor, _coreColor, Math.Max(0f, (float)Math.Sin(time * 0.5f)));
26 for (int i = 0; i < fragment.Count; i++)
27 {
28 Vector2 canvasPositionOfIndex = fragment.GetCanvasPositionOfIndex(i);
29 Vector4 vector = Vector4.Lerp(value, _glowColor, Math.Max(0f, (float)Math.Sin(canvasPositionOfIndex.X * 2f + time + 101f)));
30 fragment.SetColor(i, vector);
31 }
32 }
void SetColor(int index, Vector4 color)
Definition Fragment.cs:97
Vector2 GetCanvasPositionOfIndex(int index)
Definition Fragment.cs:75
static double Sin(double a)
static byte Max(byte val1, byte val2)
Definition Math.cs:738
static Vector4 Lerp(Vector4 value1, Vector4 value2, float amount)
Definition Vector4.cs:277

References Terraria.GameContent.RGB.GolemShader._backgroundColor, Terraria.GameContent.RGB.GolemShader._coreColor, Terraria.GameContent.RGB.GolemShader._glowColor, ReLogic.Peripherals.RGB.Fragment.Count, ReLogic.Peripherals.RGB.Fragment.GetCanvasPositionOfIndex(), Microsoft.Xna.Framework.Vector4.Lerp(), System.Math.Max(), ReLogic.Peripherals.RGB.Fragment.SetColor(), System.Math.Sin(), System.value, and Microsoft.Xna.Framework.Vector2.X.