DS GX: Fix normal texture mapping
Vicki Pfau vi@endrift.com
Sat, 08 Apr 2017 12:15:19 -0700
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
src/ds/gx.c
→
src/ds/gx.c
@@ -979,8 +979,8 @@ x >>= 3;
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]);