pos to point var rename for bezier

This commit is contained in:
ethan merchant 2024-12-21 09:47:57 -05:00
parent b7d508b7a0
commit b5cae879a6

View file

@ -148,7 +148,7 @@ static class Arts
// ); // );
int steps = 92; int steps = 92;
Vec3 pastPos = p[0]; Vec3 pastPoint = p[0];
float pastThc = 0.0f; float pastThc = 0.0f;
for (int j = 0; j < steps; j++) for (int j = 0; j < steps; j++)
{ {
@ -156,15 +156,15 @@ static class Arts
Vec3 a = Vec3.Lerp(p[0], p[1], t); Vec3 a = Vec3.Lerp(p[0], p[1], t);
Vec3 b = Vec3.Lerp(p[1], p[2], t); Vec3 b = Vec3.Lerp(p[1], p[2], t);
Vec3 c = Vec3.Lerp(p[2], p[3], t); Vec3 c = Vec3.Lerp(p[2], p[3], t);
Vec3 pos = Vec3.Lerp(Vec3.Lerp(a, b, t), Vec3.Lerp(b, c, t), t); Vec3 point = Vec3.Lerp(Vec3.Lerp(a, b, t), Vec3.Lerp(b, c, t), t);
float thc = (1.0f + Maths.precision((1.0f - t), Maths.lerp(0.1f, 0.2f, Noise.u_scalar_x(i))) * 2.0f) * U.cm * 6.0f; float thc = (1.0f + Maths.precision((1.0f - t), Maths.lerp(0.1f, 0.2f, Noise.u_scalar_x(i))) * 2.0f) * U.cm * 6.0f;
Lines.Add( Lines.Add(
pastPos, pastPoint,
pos, point,
thc != pastThc ? Color.Hex(0x959493FF).ToLinear() : Color.Hex(0xB9E7AFFF).ToLinear(), thc != pastThc ? Color.Hex(0x959493FF).ToLinear() : Color.Hex(0xB9E7AFFF).ToLinear(),
thc thc
); );
pastPos = pos; pastPoint = point;
pastThc = thc; pastThc = thc;
} }
} }