draw cluster of leafs at top of bamboo using noise offstep

This commit is contained in:
ethan merchant 2024-12-21 09:48:30 -05:00
parent b5cae879a6
commit 4ae3e435bd

View file

@ -167,6 +167,28 @@ static class Arts
pastPoint = point;
pastThc = thc;
}
// leaves
for (int j = 0; j < 10; j++)
{
meshes["leaf"].Draw(
mat_unlit,
Matrix.TRS(
p[3] + Quat.LookAt(p[3], p[2], Vec3.Right) * V.XYZ(
Noise.s_scalar_x(j + offstep()),
Noise.s_scalar_x(j + offstep()),
Noise.s_scalar_x(j + offstep()) * 3
) * 0.2f,
(
Quat.FromAngles(Noise.s_scalar_x(j + offstep()) * 180f, 0, 0) *
Quat.FromAngles(0, Noise.s_scalar_x(j + offstep()) * 180f, 0) *
Quat.FromAngles(0, 0, Noise.s_scalar_x(j + offstep()) * 180f)
),
0.1f
),
Color.Hex(0xBAE8B0FF).ToLinear()
);
}
}
// unit cube