Skip to content

Commit

Permalink
fixed matfx matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
aap committed May 15, 2020
1 parent d541301 commit 3971dda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/d3d/d3d9matfx.cpp
Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions src/gl/gl3matfx.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 3971dda

Please sign in to comment.