private void incrementalizeX(float p1[], float p2[],
                               float p[], float dp[], int x) {
    float delta = p2[TX] - p1[TX];
    if (delta == 0) delta = 1;
    float fraction = x + 0.5f - p1[TX];
    if (smooth) {
      delta /= SUBXRES;
      fraction /= SUBXRES;
    }

    if (interpX) {
      dp[TX] = (p2[TX] - p1[TX]) / delta;
      p[TX] = p1[TX] + dp[TX] * fraction;
    }

    if (interpARGB) {
      dp[R] = (p2[R] - p1[R]) / delta;
      dp[G] = (p2[G] - p1[G]) / delta;
      dp[B] = (p2[B] - p1[B]) / delta;
      dp[A] = (p2[A] - p1[A]) / delta;
      p[R] = p1[R] + dp[R] * fraction;
      p[G] = p1[G] + dp[G] * fraction;
      p[B] = p1[B] + dp[B] * fraction;
      p[A] = p1[A] + dp[A] * fraction;
    }

    if (interpUV) {
      dp[U] = (p2[U] - p1[U]) / delta;
      dp[V] = (p2[V] - p1[V]) / delta;

      p[U] = p1[U] + dp[U] * fraction;
      p[V] = p1[V] + dp[V] * fraction;
    }
  }