Spline: Not that it should matter, but move the patch_div clamping down after the subsampling

This commit is contained in:
Henrik Rydgard 2015-04-16 18:18:49 +02:00
parent 6bc9a525f8
commit b3305246a3

View File

@ -307,15 +307,15 @@ static void SplinePatchFullQuality(u8 *&dest, u16 *indices, int &count, const Sp
patch_div_t /= quality;
}
if (patch_div_s < 2) patch_div_s = 2;
if (patch_div_t < 2) patch_div_t = 2;
// Downsample until it fits, in case crazy tesselation factors are sent.
while ((patch_div_s + 1) * (patch_div_t + 1) > maxVertices) {
patch_div_s /= 2;
patch_div_t /= 2;
}
if (patch_div_s < 2) patch_div_s = 2;
if (patch_div_t < 2) patch_div_t = 2;
// First compute all the vertices and put them in an array
SimpleVertex *&vertices = (SimpleVertex*&)dest;