diff --git a/src/d3d/d3d9matfx.cpp b/src/d3d/d3d9matfx.cpp index 2970a7fb..87873ef5 100644 --- a/src/d3d/d3d9matfx.cpp +++ b/src/d3d/d3d9matfx.cpp @@ -86,6 +86,7 @@ uploadEnvMatrix(Frame *frame) RawMatrix envMtx, invMtx; Matrix::invert(&invMat, frame->getLTM()); convMatrix(&invMtx, &invMat); + invMtx.pos.set(0.0f, 0.0f, 0.0f); RawMatrix::mult(&envMtx, &invMtx, &normal2texcoord); d3ddevice->SetVertexShaderConstantF(VSLOC_texMat, (float*)&envMtx, 4); } diff --git a/src/gl/gl3matfx.cpp b/src/gl/gl3matfx.cpp index 3734f3aa..cb0614d6 100644 --- a/src/gl/gl3matfx.cpp +++ b/src/gl/gl3matfx.cpp @@ -118,6 +118,7 @@ uploadEnvMatrix(Frame *frame) RawMatrix invMtx; Matrix::invert(&invMat, frame->getLTM()); convMatrix(&invMtx, &invMat); + invMtx.pos.set(0.0f, 0.0f, 0.0f); RawMatrix::mult(&envMtx, &invMtx, &normal2texcoord); } glUniformMatrix4fv(U(u_texMatrix), 1, GL_FALSE, (float*)&envMtx);