DS GX: Increase w reciprocal coefficient

This commit is contained in:
Vicki Pfau 2017-03-01 10:36:15 -08:00
parent db9978f0c1
commit d6cf1d2fe1
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ static void _emitVertex(struct DSGX* gx, uint16_t x, uint16_t y, uint16_t z) {
gx->currentVertex.vx = (gx->currentVertex.vx + gx->currentVertex.vw) * (int64_t) (gx->viewportWidth << 12) / (gx->currentVertex.vw * 2) + (gx->viewportX1 << 12);
gx->currentVertex.vy = (gx->currentVertex.vy + gx->currentVertex.vw) * (int64_t) (gx->viewportHeight << 12) / (gx->currentVertex.vw * 2) + (gx->viewportY1 << 12);
gx->currentVertex.vw = 0x1000000 / gx->currentVertex.vw;
gx->currentVertex.vw = 0x40000000 / gx->currentVertex.vw;
struct DSGXVertex* vbuf = gx->vertexBuffer[gx->bufferIndex];
vbuf[gx->vertexIndex] = gx->currentVertex;