public static void DrawLine(this Texture2D texture, int x0, int y0, int x1, int y1, Color color, bool AA = false) { if (AA) { Action <int, int, float> draw = (x, y, t) => texture.SetPixel(x, y, Color.Lerp(texture.GetPixel(x, y), color, t)); PTUtils.WuLine(x0, y0, x1, y1, draw); } else { Action <int, int> draw = (x, y) => texture.SetPixel(x, y, color); PTUtils.BresenhamLine(x0, y0, x1, y1, draw); } }