private static void CreateMipColorsTexture()
{
if (s_MipColorsTexture == null)
{
s_MipColorsTexture = new Texture2D(0x20, 0x20, TextureFormat.RGBA32, true);
s_MipColorsTexture.hideFlags = HideFlags.HideAndDontSave;
Color[] colorArray = new Color[] { new Color(0f, 0f, 1f, 0.8f), new Color(0f, 0.5f, 1f, 0.4f), new Color(1f, 1f, 1f, 0f), new Color(1f, 0.7f, 0f, 0.2f), new Color(1f, 0.3f, 0f, 0.6f), new Color(1f, 0f, 0f, 0.8f) };
int num = Mathf.Min(6, s_MipColorsTexture.mipmapCount);
for (int i = 0; i < num; i++)
{
int num3 = Mathf.Max(s_MipColorsTexture.width >> i, 1);
int num4 = Mathf.Max(s_MipColorsTexture.height >> i, 1);
Color[] colors = new Color[num3 * num4];
for (int j = 0; j < colors.Length; j++)
{
colors[j] = colorArray[i];
}
s_MipColorsTexture.SetPixels(colors, i);
}
s_MipColorsTexture.filterMode = FilterMode.Trilinear;
s_MipColorsTexture.Apply(false);
Shader.SetGlobalTexture("_SceneViewMipcolorsTexture", s_MipColorsTexture);
}
}