void UpdateStars() { float skyMul = (float)(Math.Cos(CelestialAngle * (2 * Math.PI)) * 4 + 0.5); Utils.Clamp(ref skyMul, 0, 1); FastColour newStarColour = FastColour.Lerp2(starColour, starColourHidden, skyMul); if (newStarColour != curStarColour) { int newStarColourPacked = newStarColour.Pack(); for (int i = 0; i < starCount; i++) { vertices4[i].Colour = newStarColourPacked; } curStarColour = newStarColour; } }