DS GX: Increase w reciprocal coefficient
Vicki Pfau vi@endrift.com
Wed, 01 Mar 2017 10:36:15 -0800
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/ds/gx.c
→
src/ds/gx.c
@@ -177,7 +177,7 @@ // TODO: What to do if w is 0?
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;