Skip to content

Commit

Permalink
DS GX: Fix normal texture mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
endrift committed Apr 8, 2017
1 parent 6f04c89 commit 2134a70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ds/gx.c
Original file line number Diff line number Diff line change
Expand Up @@ -979,8 +979,8 @@ static void _fifoRun(struct mTiming* timing, void* context, uint32_t cyclesLate)
y >>= 3;
z >>= 3;
if (DSGXTexParamsGetCoordTfMode(gx->currentPoly.texParams) == 2) {
gx->currentVertex.vs = _dotFrac(x, y, z, &gx->texMatrix.m[0]) + gx->currentVertex.s;
gx->currentVertex.vt = _dotFrac(x, y, z, &gx->texMatrix.m[1]) + gx->currentVertex.t;
gx->currentVertex.vs = (_dotFrac(x, y, z, &gx->texMatrix.m[0]) + gx->currentVertex.s) >> 11;
gx->currentVertex.vt = (_dotFrac(x, y, z, &gx->texMatrix.m[1]) + gx->currentVertex.t) >> 11;
}
int16_t nx = _dotFrac(x, y, z, &gx->vecMatrix.m[0]);
int16_t ny = _dotFrac(x, y, z, &gx->vecMatrix.m[1]);
Expand Down

0 comments on commit 2134a70

Please sign in to comment.