From 68375447ed3be2c7b1f5c80b9eb3b53b5972f762 Mon Sep 17 00:00:00 2001 From: luigi__ Date: Mon, 9 Feb 2009 19:08:06 +0000 Subject: [PATCH] Fixed a bug with texcoord generation mode 2 (normal). --- desmume/src/gfx3d.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/desmume/src/gfx3d.cpp b/desmume/src/gfx3d.cpp index 2b593e578..84ff44fec 100644 --- a/desmume/src/gfx3d.cpp +++ b/desmume/src/gfx3d.cpp @@ -885,9 +885,6 @@ void gfx3d_glNormal(u32 v) normalTable[(v>>10)&1023], normalTable[(v>>20)&1023]}; - //use the current normal transform matrix - MatrixMultVec3x3 (mtxCurrent[2], normal); - if (texCoordinateTransform == 2) { last_s =( (normal[0] *mtxCurrent[3][0] + normal[1] *mtxCurrent[3][4] + @@ -896,6 +893,8 @@ void gfx3d_glNormal(u32 v) normal[2] *mtxCurrent[3][9]) + (_t*16.0f)) / 16.0f; } + //use the current normal transform matrix + MatrixMultVec3x3 (mtxCurrent[2], normal); //apply lighting model {