if (heightFactor < 0.5f)
{
atmosphericBlending.x = 16f; // Tex0 UV coordinate multiplier
atmosphericBlending.y = 1f; // Tex 0 blending weight
atmosphericBlending.z = 8f; // Tex1 UV coordinate multiplier
atmosphericBlending.w = 0f; // Tex1 blending weight
}
else if (heightFactor < 2f)
{
float f = (heightFactor - 0.5f) / 1.5f;
atmosphericBlending.x = 16f;
atmosphericBlending.y = 1f - f;
atmosphericBlending.z = 8f;
atmosphericBlending.w = f;
}
else if (heightFactor < 6f)
{
float f = (heightFactor - 2f) / 4f;
atmosphericBlending.x = 8f;
atmosphericBlending.y = 1f - f;
atmosphericBlending.z = 4f;
atmosphericBlending.w = f;
}
else if (heightFactor < 18f)
{
float f = (heightFactor - 6f) / 12f;
atmosphericBlending.x = 4f;
atmosphericBlending.y = 1f - f;
atmosphericBlending.z = 2f;
atmosphericBlending.w = f;
}
else if (heightFactor < 54f)
{
float f = (heightFactor - 18f) / 36f;
atmosphericBlending.x = 2f;
atmosphericBlending.y = 1f - f;
atmosphericBlending.z = 1f;
atmosphericBlending.w = f;
}
else
{
atmosphericBlending.x = 2f;
atmosphericBlending.y = 0f;
atmosphericBlending.z = 1f;
atmosphericBlending.w = 1f;
}