"Improved" Dolphin matricies slightly
This commit is contained in:
@@ -228,13 +228,14 @@ errorret_t shaderUpdateMVPDolphin() {
|
||||
|
||||
// Set Model/View Matrix
|
||||
if(mvDirt) {
|
||||
// guMtxConcat(
|
||||
// SHADER_BOUND->matrixView,
|
||||
// SHADER_BOUND->matrixModel,
|
||||
// SHADER_BOUND->matrixModelView
|
||||
// );
|
||||
// GX_LoadPosMtxImm(SHADER_BOUND->matrixModelView, GX_PNMTX0);
|
||||
GX_LoadPosMtxImm(SHADER_BOUND->matrixView, GX_PNMTX0);
|
||||
guMtxIdentity(SHADER_BOUND->matrixModel);
|
||||
guMtxTransApply(SHADER_BOUND->matrixModel, SHADER_BOUND->matrixModel, 0.0F, 1.0F, 0.0F);
|
||||
guMtxConcat(
|
||||
SHADER_BOUND->matrixModel,
|
||||
SHADER_BOUND->matrixView,
|
||||
SHADER_BOUND->matrixModelView
|
||||
);
|
||||
GX_LoadPosMtxImm(SHADER_BOUND->matrixModelView, GX_PNMTX0);
|
||||
}
|
||||
|
||||
SHADER_BOUND->dirtyMatrix = 0;
|
||||
@@ -256,7 +257,9 @@ void shaderMat4ToMtx(const mat4 inGlmMatrix, Mtx outGXMatrix) {
|
||||
assertNotNull(inGlmMatrix, "Input matrix cannot be null");
|
||||
assertNotNull(outGXMatrix, "Output matrix cannot be null");
|
||||
|
||||
for(int row = 0; row < 4; ++row) {// Can perhaps be 3.
|
||||
guMtxIdentity(outGXMatrix);
|
||||
|
||||
for(int row = 0; row < 3; ++row) {
|
||||
for(int col = 0; col < 4; ++col) {
|
||||
outGXMatrix[row][col] = inGlmMatrix[col][row];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user