fixed view matrix; im2d UV

This commit is contained in:
aap
2018-06-14 23:17:55 +02:00
parent 5cdc0499c5
commit e6d01b1159
7 changed files with 62 additions and 28 deletions

View File

@@ -207,6 +207,12 @@ cameraSync(ObjectWithFrame *obj)
Camera *cam = (Camera*)obj;
Matrix inv, proj;
Matrix::invertOrthonormal(&inv, cam->getFrame()->getLTM());
inv.right.x = -inv.right.x;
inv.up.x = -inv.up.x;
inv.at.x = -inv.at.x;
inv.pos.x = -inv.pos.x;
float32 xscl = 1.0f/(2.0f*cam->viewWindow.x);
float32 yscl = 1.0f/(2.0f*cam->viewWindow.y);