/// <summary>
    /// Creates geometry for river water surface with different start and end Y.
    /// </summary>
    void TriangulateRiverQuad(Vector3 v1, Vector3 v2, Vector3 v3, Vector3 v4, float y1, float y2, float v, bool reversed, Vector3 indices)
    {
        v1.y = v2.y = y1;
        v3.y = v4.y = y2;
        Rivers.AddQuad(v1, v2, v3, v4);

        // Add UVs according to river orientation (used in water flow effect in river shader)
        if (reversed)
        {
            Rivers.AddQuadUV(1f, 0f, 0.8f - v, 0.6f - v);
        }
        else
        {
            Rivers.AddQuadUV(0f, 1f, v, v + 0.2f);
        }

        Rivers.AddQuadCellData(indices, weights1, weights2);
    }
 private void TriangulateRiverQuad(
     Vector3 v1, Vector3 v2, Vector3 v3, Vector3 v4,
     float y1, float y2, float v,
     bool reversed, Vector3 indices)
 {
     v1.y = v2.y = y1;
     v3.y = v4.y = y2;
     Rivers.AddQuad(v1, v2, v3, v4);
     if (reversed)
     {
         Rivers.AddQuadUV(1f, 0f, 0.8f - v, 0.6f - v);
     }
     else
     {
         Rivers.AddQuadUV(0f, 1f, v, v + 0.2f); // left to right, bottom to top.
     }
     Rivers.AddQuadCellData(indices, weights1, weights2);
 }