Skip to content
Snippets Groups Projects
Commit 18551d6c authored by Philip Trettner's avatar Philip Trettner
Browse files

fixed order of cube vertices for culling

parent 606467d0
No related branches found
No related tags found
No related merge requests found
......@@ -107,17 +107,17 @@ public:
auto baseIndex = vi;
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid - left - top) * .5f + .5f), n, left, {0, 0});
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid - left + top) * .5f + .5f), n, left, {0, 1});
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid + left + top) * .5f + .5f), n, left, {1, 1});
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid + left - top) * .5f + .5f), n, left, {1, 0});
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid + left + top) * .5f + .5f), n, left, {1, 1});
vertices[vi++] = gen(mix(minCoord, maxCoord, (mid - left + top) * .5f + .5f), n, left, {0, 1});
indices[ii++] = baseIndex + 0;
indices[ii++] = baseIndex + 1;
indices[ii++] = baseIndex + 3;
indices[ii++] = baseIndex + 1;
indices[ii++] = baseIndex + 2;
indices[ii++] = baseIndex + 3;
indices[ii++] = baseIndex + 2;
indices[ii++] = baseIndex + 1;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment