draw cluster of leafs at top of bamboo using noise offstep
This commit is contained in:
parent
b5cae879a6
commit
4ae3e435bd
1 changed files with 22 additions and 0 deletions
22
src/Arts.cs
22
src/Arts.cs
|
@ -167,6 +167,28 @@ static class Arts
|
||||||
pastPoint = point;
|
pastPoint = point;
|
||||||
pastThc = thc;
|
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
|
// unit cube
|
||||||
|
|
Loading…
Add table
Reference in a new issue