Skip to content

Commit

Permalink
Revert "matrix: Reorder point unprojection"
Browse files Browse the repository at this point in the history
This reverts commit 1c46f0b.

The change breaks existing users.
  • Loading branch information
ebassi committed Nov 9, 2015
1 parent 9ea181f commit e0c4e4c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/graphene-matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -1286,15 +1286,12 @@ graphene_matrix_unproject_point3d (const graphene_matrix_t *projection,
float values[4];
float inv_w;

graphene_simd4x4f_matrix_mul (&modelview->value, &projection->value, &tmp);
graphene_simd4x4f_inverse (&tmp, &tmp);
graphene_simd4x4f_inverse (&projection->value, &tmp);
graphene_simd4x4f_matrix_mul (&tmp, &modelview->value, &tmp);

v = graphene_simd4f_init (point->x, point->y, point->z, 1.f);
graphene_simd4x4f_vec4_mul (&tmp, &v, &v);

if (graphene_simd4f_get_w (v) == 0.f)
return;

inv_w = 1.f / graphene_simd4f_get_w (v);
v = graphene_simd4f_mul (v, graphene_simd4f_splat (inv_w));

Expand Down

0 comments on commit e0c4e4c

Please sign in to comment.