Vertex() public static méthode

public static Vertex ( float x, float y ) : void
x float
y float
Résultat void
 public static void DrawFilledCurve(Rect r, AudioCurveAndColorEvaluator eval)
 {
     if (Event.current.type == EventType.Repaint)
     {
         Color color;
         HandleUtility.ApplyWireMaterial();
         GL.Begin(1);
         float pixelsPerPoint = EditorGUIUtility.pixelsPerPoint;
         float num2           = 1f / pixelsPerPoint;
         float num3           = 0.5f * num2;
         float num4           = Mathf.Ceil(r.width) * pixelsPerPoint;
         float num5           = Mathf.Floor(r.x) + pixelEpsilon;
         float num6           = 1f / (num4 - 1f);
         float max            = r.height * 0.5f;
         float num8           = r.y + (0.5f * r.height);
         float y = r.y + r.height;
         float b = Mathf.Clamp(max * eval(0f, out color), -max, max);
         for (int i = 0; i < num4; i++)
         {
             float x     = num5 + (i * num2);
             float a     = Mathf.Clamp(max * eval(i * num6, out color), -max, max);
             float num14 = Mathf.Min(a, b) - num3;
             float num15 = Mathf.Max(a, b) + num3;
             GL.Color(new Color(color.r, color.g, color.b, 0f));
             AudioMixerDrawUtils.Vertex(x, num8 - num15);
             GL.Color(color);
             AudioMixerDrawUtils.Vertex(x, num8 - num14);
             AudioMixerDrawUtils.Vertex(x, num8 - num14);
             AudioMixerDrawUtils.Vertex(x, y);
             b = a;
         }
         GL.End();
     }
 }
Exemple #2
0
 public static void DrawFilledCurve(Rect r, AudioCurveAndColorEvaluator eval)
 {
     if (Event.current.type == EventType.Repaint)
     {
         Color color;
         HandleUtility.ApplyWireMaterial();
         GL.Begin(1);
         float pixelsPerPoint = EditorGUIUtility.pixelsPerPoint;
         float num2           = 1f / pixelsPerPoint;
         float num3           = r.width * pixelsPerPoint;
         float num4           = 1f / (num3 - 1f);
         float max            = r.height * 0.5f;
         float num6           = r.y + (0.5f * r.height);
         float y    = r.y + r.height;
         float num8 = Mathf.Clamp(max * eval(0f, out color), -max, max);
         for (int i = 0; i < num3; i++)
         {
             float x     = Mathf.Floor(r.x) + (i * num2);
             float num11 = Mathf.Clamp(max * eval(i * num4, out color), -max, max);
             float num12 = ((num11 >= num8) ? num8 : num11) - (0.5f * num2);
             float num13 = ((num11 <= num8) ? num8 : num11) + (0.5f * num2);
             GL.Color(new Color(color.r, color.g, color.b, 0f));
             AudioMixerDrawUtils.Vertex(x, num6 - num13);
             GL.Color(color);
             AudioMixerDrawUtils.Vertex(x, num6 - num12);
             AudioMixerDrawUtils.Vertex(x, num6 - num12);
             AudioMixerDrawUtils.Vertex(x, y);
             num8 = num11;
         }
         GL.End();
     }
 }
        public static void DrawMinMaxFilledCurve(Rect r, AudioCurveRendering.AudioMinMaxCurveAndColorEvaluator eval)
        {
            HandleUtility.ApplyWireMaterial();
            GL.Begin(1);
            float num  = EditorGUIUtility.pixelsPerPoint;
            float num2 = 1f / num;
            float num3 = 0.5f * num2;
            float num4 = Mathf.Ceil(r.width) * num;
            float num5 = Mathf.Floor(r.x) + AudioCurveRendering.pixelEpsilon;
            float num6 = 1f / (num4 - 1f);
            float num7 = r.height * 0.5f;
            float num8 = r.y + 0.5f * r.height;
            Color c;
            float value;
            float value2;

            eval(0.0001f, out c, out value, out value2);
            AudioCurveRendering.Sort2(ref value, ref value2);
            float b    = num8 - num7 * Mathf.Clamp(value2, -1f, 1f);
            float b2   = num8 - num7 * Mathf.Clamp(value, -1f, 1f);
            float y    = r.y;
            float max  = r.y + r.height;
            int   num9 = 0;

            while ((float)num9 < num4)
            {
                float x = num5 + (float)num9 * num2;
                eval((float)num9 * num6, out c, out value, out value2);
                AudioCurveRendering.Sort2(ref value, ref value2);
                Color c2    = new Color(c.r, c.g, c.b, 0f);
                float num10 = num8 - num7 * Mathf.Clamp(value2, -1f, 1f);
                float num11 = num8 - num7 * Mathf.Clamp(value, -1f, 1f);
                float y2    = Mathf.Clamp(Mathf.Min(num10, b) - num3, y, max);
                float y3    = Mathf.Clamp(Mathf.Max(num10, b) + num3, y, max);
                float y4    = Mathf.Clamp(Mathf.Min(num11, b2) - num3, y, max);
                float y5    = Mathf.Clamp(Mathf.Max(num11, b2) + num3, y, max);
                AudioCurveRendering.Sort2(ref y2, ref y4);
                AudioCurveRendering.Sort2(ref y3, ref y5);
                AudioCurveRendering.Sort2(ref y2, ref y3);
                AudioCurveRendering.Sort2(ref y4, ref y5);
                AudioCurveRendering.Sort2(ref y3, ref y4);
                GL.Color(c2);
                AudioMixerDrawUtils.Vertex(x, y2);
                GL.Color(c);
                AudioMixerDrawUtils.Vertex(x, y3);
                AudioMixerDrawUtils.Vertex(x, y3);
                AudioMixerDrawUtils.Vertex(x, y4);
                AudioMixerDrawUtils.Vertex(x, y4);
                GL.Color(c2);
                AudioMixerDrawUtils.Vertex(x, y5);
                b2 = num11;
                b  = num10;
                num9++;
            }
            GL.End();
        }
Exemple #4
0
        public static void DrawMinMaxFilledCurve(Rect r, AudioCurveRendering.AudioMinMaxCurveAndColorEvaluator eval)
        {
            HandleUtility.ApplyWireMaterial();
            GL.Begin(1);
            float pixelsPerPoint = EditorGUIUtility.pixelsPerPoint;
            float num1           = 1f / pixelsPerPoint;
            float num2           = 0.5f * num1;
            float num3           = Mathf.Ceil(r.width) * pixelsPerPoint;
            float num4           = Mathf.Floor(r.x) + AudioCurveRendering.pixelEpsilon;
            float num5           = 1f / (num3 - 1f);
            float num6           = r.height * 0.5f;
            float num7           = r.y + 0.5f * r.height;
            Color col;
            float minValue1;
            float maxValue1;

            eval(0.0001f, out col, out minValue1, out maxValue1);
            AudioCurveRendering.Sort2(ref minValue1, ref maxValue1);
            float b1  = num7 - num6 * Mathf.Clamp(maxValue1, -1f, 1f);
            float b2  = num7 - num6 * Mathf.Clamp(minValue1, -1f, 1f);
            float y1  = r.y;
            float max = r.y + r.height;

            for (int index = 0; (double)index < (double)num3; ++index)
            {
                float x = num4 + (float)index * num1;
                eval((float)index * num5, out col, out minValue1, out maxValue1);
                AudioCurveRendering.Sort2(ref minValue1, ref maxValue1);
                Color c         = new Color(col.r, col.g, col.b, 0.0f);
                float a1        = num7 - num6 * Mathf.Clamp(maxValue1, -1f, 1f);
                float a2        = num7 - num6 * Mathf.Clamp(minValue1, -1f, 1f);
                float minValue2 = Mathf.Clamp(Mathf.Min(a1, b1) - num2, y1, max);
                float y2        = Mathf.Clamp(Mathf.Max(a1, b1) + num2, y1, max);
                float y3        = Mathf.Clamp(Mathf.Min(a2, b2) - num2, y1, max);
                float maxValue2 = Mathf.Clamp(Mathf.Max(a2, b2) + num2, y1, max);
                AudioCurveRendering.Sort2(ref minValue2, ref y3);
                AudioCurveRendering.Sort2(ref y2, ref maxValue2);
                AudioCurveRendering.Sort2(ref minValue2, ref y2);
                AudioCurveRendering.Sort2(ref y3, ref maxValue2);
                AudioCurveRendering.Sort2(ref y2, ref y3);
                GL.Color(c);
                AudioMixerDrawUtils.Vertex(x, minValue2);
                GL.Color(col);
                AudioMixerDrawUtils.Vertex(x, y2);
                AudioMixerDrawUtils.Vertex(x, y2);
                AudioMixerDrawUtils.Vertex(x, y3);
                AudioMixerDrawUtils.Vertex(x, y3);
                GL.Color(c);
                AudioMixerDrawUtils.Vertex(x, maxValue2);
                b2 = a2;
                b1 = a1;
            }
            GL.End();
        }
Exemple #5
0
 public static void DrawLine(float x1, float y1, float x2, float y2, Color c)
 {
     if (Event.current.type == EventType.Repaint)
     {
         HandleUtility.ApplyWireMaterial();
         GL.Begin(1);
         GL.Color(new Color(c.r, c.g, c.b, c.a * AudioMixerDrawUtils.GetAlpha()));
         AudioMixerDrawUtils.Vertex(x1, y1);
         AudioMixerDrawUtils.Vertex(x2, y2);
         GL.End();
     }
 }
        public static void DrawMinMaxFilledCurve(Rect r, AudioMinMaxCurveAndColorEvaluator eval)
        {
            HandleUtility.ApplyWireMaterial();

            GL.Begin(GL.LINES);

            // Adjust by a half pixel to each side so that the transition covers a full pixel.
            // This is needed for very slowly rising edges.
            float pixelScale = (float)EditorGUIUtility.pixelsPerPoint;
            float pixelSize = 1.0f / pixelScale;
            float pixelHalfSize = 0.5f * pixelSize;
            float pixelWidth = Mathf.Ceil(r.width) * pixelScale;
            float startx = Mathf.Floor(r.x) + pixelEpsilon;
            float wx = 1.0f / (float)(pixelWidth - 1);
            float cy = r.height * 0.5f;
            float my = r.y + 0.5f * r.height;
            float minValue, maxValue;
            Color color;

            eval(0.0001f, out color, out minValue, out maxValue); Sort2(ref minValue, ref maxValue);
            float pyMax = my - cy * Mathf.Clamp(maxValue, -1.0f, 1.0f);
            float pyMin = my - cy * Mathf.Clamp(minValue, -1.0f, 1.0f);
            float y1 = r.y, y2 = r.y + r.height;

            for (int x = 0; x < pixelWidth; x++)
            {
                float nx = startx + x * pixelSize;
                eval(x * wx, out color, out minValue, out maxValue); Sort2(ref minValue, ref maxValue);
                Color edgeColor = new Color(color.r, color.g, color.b, 0.0f);
                float nyMax     = my - cy * Mathf.Clamp(maxValue, -1.0f, 1.0f);
                float nyMin     = my - cy * Mathf.Clamp(minValue, -1.0f, 1.0f);
                float a         = Mathf.Clamp(Mathf.Min(nyMax, pyMax) - pixelHalfSize, y1, y2);
                float b         = Mathf.Clamp(Mathf.Max(nyMax, pyMax) + pixelHalfSize, y1, y2);
                float c         = Mathf.Clamp(Mathf.Min(nyMin, pyMin) - pixelHalfSize, y1, y2);
                float d         = Mathf.Clamp(Mathf.Max(nyMin, pyMin) + pixelHalfSize, y1, y2);
                Sort2(ref a, ref c); Sort2(ref b, ref d); Sort2(ref a, ref b); Sort2(ref c, ref d); Sort2(ref b, ref c);
                GL.Color(edgeColor);
                AudioMixerDrawUtils.Vertex(nx, a);
                GL.Color(color);
                AudioMixerDrawUtils.Vertex(nx, b);
                AudioMixerDrawUtils.Vertex(nx, b);
                AudioMixerDrawUtils.Vertex(nx, c);
                AudioMixerDrawUtils.Vertex(nx, c);
                GL.Color(edgeColor);
                AudioMixerDrawUtils.Vertex(nx, d);
                pyMin = nyMin;
                pyMax = nyMax;
            }

            GL.End();
        }
        public static void DrawFilledCurve(Rect r, AudioCurveRendering.AudioCurveAndColorEvaluator eval)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }
            HandleUtility.ApplyWireMaterial();
            GL.Begin(1);
            float num  = 1f / (r.width - 1f);
            float num2 = r.height * 0.5f;
            Color c;
            float num3 = r.y + Mathf.Clamp(num2 - num2 * eval(0.0001f, out c), 0f, r.height);
            int   num4 = 0;

            while ((float)num4 < r.width)
            {
                float num5 = (float)((int)r.x + num4);
                float num6 = r.y + Mathf.Clamp(num2 - num2 * eval((float)num4 * num, out c), 0f, r.height);
                GL.Color(c);
                AudioMixerDrawUtils.Vertex(num5, (float)((int)Mathf.Ceil(num6)));
                AudioMixerDrawUtils.Vertex(num5, r.y + r.height);
                if (Mathf.Abs(num3 - num6) <= 1f)
                {
                    GL.Color(new Color(c.r, c.g, c.b, c.a * (Mathf.Ceil(num6) - num6)));
                    AudioMixerDrawUtils.Vertex(num5, Mathf.Ceil(num6) - 1f);
                    AudioMixerDrawUtils.Vertex(num5, Mathf.Ceil(num6));
                }
                else
                {
                    if (num3 < num6)
                    {
                        GL.Color(new Color(c.r, c.g, c.b, 0f));
                        AudioMixerDrawUtils.Vertex(num5, Mathf.Ceil(num3));
                        GL.Color(c);
                        AudioMixerDrawUtils.Vertex(num5, Mathf.Ceil(num6));
                    }
                    else
                    {
                        GL.Color(new Color(c.r, c.g, c.b, 0f));
                        AudioMixerDrawUtils.Vertex(num5 - 1f, Mathf.Ceil(num6));
                        GL.Color(c);
                        AudioMixerDrawUtils.Vertex(num5 - 1f, Mathf.Ceil(num3));
                    }
                }
                num3 = num6;
                num4++;
            }
            GL.End();
        }
Exemple #8
0
 public static void DrawGradientRectHorizontal(Rect r, Color c1, Color c2)
 {
     if (Event.current.type == EventType.Repaint)
     {
         HandleUtility.ApplyWireMaterial();
         GL.Begin(7);
         GL.Color(new Color(c1.r, c1.g, c1.b, c1.a * AudioMixerDrawUtils.GetAlpha()));
         AudioMixerDrawUtils.Vertex(r.x + r.width, r.y);
         AudioMixerDrawUtils.Vertex(r.x + r.width, r.y + r.height);
         GL.Color(new Color(c2.r, c2.g, c2.b, c2.a * AudioMixerDrawUtils.GetAlpha()));
         AudioMixerDrawUtils.Vertex(r.x, r.y + r.height);
         AudioMixerDrawUtils.Vertex(r.x, r.y);
         GL.End();
     }
 }
        public static void DrawSymmetricFilledCurve(Rect r, AudioCurveAndColorEvaluator eval)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }

            HandleUtility.ApplyWireMaterial();

            GL.Begin(GL.LINES);

            // Adjust by a half pixel to each side so that the transition covers a full pixel.
            // This is needed for very slowly rising edges.
            float pixelScale    = (float)EditorGUIUtility.pixelsPerPoint;
            float pixelSize     = 1.0f / pixelScale;
            float pixelHalfSize = 0.5f * pixelSize;
            float pixelWidth    = Mathf.Ceil(r.width) * pixelScale;
            float startx        = Mathf.Floor(r.x) + pixelEpsilon;
            float wx            = 1.0f / (float)(pixelWidth - 1);
            float cy            = r.height * 0.5f;
            float my            = r.y + 0.5f * r.height;
            Color color;

            float py = Mathf.Clamp(cy * eval(0.0001f, out color), 0.0f, cy);

            for (int x = 0; x < pixelWidth; x++)
            {
                float nx        = startx + x * pixelSize;
                float ny        = Mathf.Clamp(cy * eval(x * wx, out color), 0.0f, cy);
                float e1        = Mathf.Max(Mathf.Min(ny, py) - pixelHalfSize, 0.0f); // Avoid self-intersection
                float e2        = Mathf.Min(Mathf.Max(ny, py) + pixelHalfSize, cy);
                Color edgeColor = new Color(color.r, color.g, color.b, 0.0f);
                GL.Color(edgeColor);
                AudioMixerDrawUtils.Vertex(nx, my - e2);
                GL.Color(color);
                AudioMixerDrawUtils.Vertex(nx, my - e1);
                AudioMixerDrawUtils.Vertex(nx, my - e1);
                AudioMixerDrawUtils.Vertex(nx, my + e1);
                AudioMixerDrawUtils.Vertex(nx, my + e1);
                GL.Color(edgeColor);
                AudioMixerDrawUtils.Vertex(nx, my + e2);
                py = ny;
            }

            GL.End();
        }
        public static void DrawSymmetricFilledCurve(Rect r, AudioCurveRendering.AudioCurveAndColorEvaluator eval)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }
            HandleUtility.ApplyWireMaterial();
            GL.Begin(1);
            float num  = EditorGUIUtility.pixelsPerPoint;
            float num2 = 1f / num;
            float num3 = 0.5f * num2;
            float num4 = Mathf.Ceil(r.width) * num;
            float num5 = Mathf.Floor(r.x) + AudioCurveRendering.pixelEpsilon;
            float num6 = 1f / (num4 - 1f);
            float num7 = r.height * 0.5f;
            float num8 = r.y + 0.5f * r.height;
            Color c;
            float b    = Mathf.Clamp(num7 * eval(0.0001f, out c), 0f, num7);
            int   num9 = 0;

            while ((float)num9 < num4)
            {
                float x     = num5 + (float)num9 * num2;
                float num10 = Mathf.Clamp(num7 * eval((float)num9 * num6, out c), 0f, num7);
                float num11 = Mathf.Max(Mathf.Min(num10, b) - num3, 0f);
                float num12 = Mathf.Min(Mathf.Max(num10, b) + num3, num7);
                Color c2    = new Color(c.r, c.g, c.b, 0f);
                GL.Color(c2);
                AudioMixerDrawUtils.Vertex(x, num8 - num12);
                GL.Color(c);
                AudioMixerDrawUtils.Vertex(x, num8 - num11);
                AudioMixerDrawUtils.Vertex(x, num8 - num11);
                AudioMixerDrawUtils.Vertex(x, num8 + num11);
                AudioMixerDrawUtils.Vertex(x, num8 + num11);
                GL.Color(c2);
                AudioMixerDrawUtils.Vertex(x, num8 + num12);
                b = num10;
                num9++;
            }
            GL.End();
        }
Exemple #11
0
        public static void DrawSymmetricFilledCurve(Rect r, AudioCurveRendering.AudioCurveAndColorEvaluator eval)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }
            HandleUtility.ApplyWireMaterial();
            GL.Begin(1);
            float pixelsPerPoint = EditorGUIUtility.pixelsPerPoint;
            float num1           = 1f / pixelsPerPoint;
            float num2           = 0.5f * num1;
            float num3           = Mathf.Ceil(r.width) * pixelsPerPoint;
            float num4           = Mathf.Floor(r.x) + AudioCurveRendering.pixelEpsilon;
            float num5           = 1f / (num3 - 1f);
            float num6           = r.height * 0.5f;
            float num7           = r.y + 0.5f * r.height;
            Color col;
            float b = Mathf.Clamp(num6 * eval(0.0001f, out col), 0.0f, num6);

            for (int index = 0; (double)index < (double)num3; ++index)
            {
                float x    = num4 + (float)index * num1;
                float a    = Mathf.Clamp(num6 * eval((float)index * num5, out col), 0.0f, num6);
                float num8 = Mathf.Max(Mathf.Min(a, b) - num2, 0.0f);
                float num9 = Mathf.Min(Mathf.Max(a, b) + num2, num6);
                Color c    = new Color(col.r, col.g, col.b, 0.0f);
                GL.Color(c);
                AudioMixerDrawUtils.Vertex(x, num7 - num9);
                GL.Color(col);
                AudioMixerDrawUtils.Vertex(x, num7 - num8);
                AudioMixerDrawUtils.Vertex(x, num7 - num8);
                AudioMixerDrawUtils.Vertex(x, num7 + num8);
                AudioMixerDrawUtils.Vertex(x, num7 + num8);
                GL.Color(c);
                AudioMixerDrawUtils.Vertex(x, num7 + num9);
                b = a;
            }
            GL.End();
        }
Exemple #12
0
        public static void DrawSymmetricFilledCurve(Rect r, AudioCurveRendering.AudioCurveAndColorEvaluator eval)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }
            HandleUtility.ApplyWireMaterial();
            GL.Begin(1);
            float num  = EditorGUIUtility.pixelsPerPoint;
            float num2 = 1f / num;
            float num3 = r.width * num;
            float num4 = 1f / (num3 - 1f);
            float num5 = r.height * 0.5f;
            float num6 = r.y + 0.5f * r.height;
            Color c;
            float num7 = Mathf.Clamp(num5 * eval(0.0001f, out c), 0f, num5);
            int   num8 = 0;

            while ((float)num8 < num3)
            {
                float x     = Mathf.Floor(r.x) + (float)num8 * num2;
                float num9  = Mathf.Clamp(num5 * eval((float)num8 * num4, out c), 0f, num5);
                float num10 = (num9 >= num7) ? num7 : num9;
                float num11 = (num9 <= num7) ? num7 : num9;
                GL.Color(new Color(c.r, c.g, c.b, 0f));
                AudioMixerDrawUtils.Vertex(x, num6 + num11);
                GL.Color(c);
                AudioMixerDrawUtils.Vertex(x, num6 + num10);
                AudioMixerDrawUtils.Vertex(x, num6 + num10);
                AudioMixerDrawUtils.Vertex(x, num6 - num10);
                AudioMixerDrawUtils.Vertex(x, num6 - num10);
                GL.Color(new Color(c.r, c.g, c.b, 0f));
                AudioMixerDrawUtils.Vertex(x, num6 - num11);
                num7 = num9;
                num8++;
            }
            GL.End();
        }
        public static void DrawSymmetricFilledCurve(Rect r, AudioCurveRendering.AudioCurveAndColorEvaluator eval)
        {
            if (Event.current.type != EventType.Repaint)
            {
                return;
            }
            HandleUtility.ApplyWireMaterial();
            GL.Begin(1);
            float num  = 1f / (r.width - 1f);
            float num2 = r.height * 0.5f;
            float y    = r.y;
            float num3 = r.y + r.height;
            Color c;
            float num4 = Mathf.Clamp(num2 - num2 * eval(0.0001f, out c), 0f, num2);
            int   num5 = 0;

            while ((float)num5 < r.width)
            {
                float num6 = (float)((int)r.x + num5);
                float num7 = Mathf.Clamp(num2 - num2 * eval((float)num5 * num, out c), 0f, num2);
                GL.Color(c);
                AudioMixerDrawUtils.Vertex(num6, y + (float)((int)Mathf.Ceil(num7)));
                AudioMixerDrawUtils.Vertex(num6, num3 - (float)((int)Mathf.Ceil(num7)));
                if (Mathf.Abs(num4 - num7) <= 1f)
                {
                    GL.Color(new Color(c.r, c.g, c.b, c.a * (Mathf.Ceil(num7) - num7)));
                    AudioMixerDrawUtils.Vertex(num6, y + Mathf.Ceil(num7) - 1f);
                    AudioMixerDrawUtils.Vertex(num6, y + Mathf.Ceil(num7));
                    AudioMixerDrawUtils.Vertex(num6, num3 - Mathf.Ceil(num7) + 1f);
                    AudioMixerDrawUtils.Vertex(num6, num3 - Mathf.Ceil(num7));
                }
                else
                {
                    if (num4 < num7)
                    {
                        GL.Color(new Color(c.r, c.g, c.b, 0f));
                        AudioMixerDrawUtils.Vertex(num6, y + Mathf.Ceil(num4));
                        GL.Color(c);
                        AudioMixerDrawUtils.Vertex(num6, y + Mathf.Ceil(num7));
                        GL.Color(new Color(c.r, c.g, c.b, 0f));
                        AudioMixerDrawUtils.Vertex(num6, num3 - Mathf.Ceil(num4) - 1f);
                        GL.Color(c);
                        AudioMixerDrawUtils.Vertex(num6, num3 - Mathf.Ceil(num7) - 1f);
                    }
                    else
                    {
                        GL.Color(new Color(c.r, c.g, c.b, 0f));
                        AudioMixerDrawUtils.Vertex(num6 - 1f, y + Mathf.Ceil(num7));
                        GL.Color(c);
                        AudioMixerDrawUtils.Vertex(num6 - 1f, y + Mathf.Ceil(num4));
                        GL.Color(new Color(c.r, c.g, c.b, 0f));
                        AudioMixerDrawUtils.Vertex(num6 - 1f, num3 - Mathf.Ceil(num7) - 1f);
                        GL.Color(c);
                        AudioMixerDrawUtils.Vertex(num6 - 1f, num3 - Mathf.Ceil(num4) - 1f);
                    }
                }
                num4 = num7;
                num5++;
            }
            GL.End();
        }