From b0cf640a908cf0dbfd2a30c508d0447df6117f7d Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 21 Mar 2015 20:27:58 +0100 Subject: [PATCH] wined3d-NormalMatrix: Fix calculation of transpose matrix. --- ...ned3d-Don-t-use-the-builtin-FFP-uniform-for-the-no.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/wined3d-NormalMatrix/0001-wined3d-Don-t-use-the-builtin-FFP-uniform-for-the-no.patch b/patches/wined3d-NormalMatrix/0001-wined3d-Don-t-use-the-builtin-FFP-uniform-for-the-no.patch index b43088ce..c8352397 100644 --- a/patches/wined3d-NormalMatrix/0001-wined3d-Don-t-use-the-builtin-FFP-uniform-for-the-no.patch +++ b/patches/wined3d-NormalMatrix/0001-wined3d-Don-t-use-the-builtin-FFP-uniform-for-the-no.patch @@ -1,4 +1,4 @@ -From 8456f447a55b969ee02f6d972885274660e6e29e Mon Sep 17 00:00:00 2001 +From 038e357b26d73568f8904330ab79fb6e96792ff4 Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Fri, 20 Mar 2015 18:56:53 +0100 Subject: wined3d: Don't use the builtin FFP uniform for the normal matrix. @@ -8,7 +8,7 @@ Subject: wined3d: Don't use the builtin FFP uniform for the normal matrix. 1 file changed, 93 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index e38cd18..0f1ba8e 100644 +index e38cd18..6839587 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -118,6 +118,7 @@ struct glsl_vs_program @@ -103,7 +103,7 @@ index e38cd18..0f1ba8e 100644 + invert_matrix_3d_general(&mv, &mv); + for (i = 0; i < 3; ++i) + for (j = 0; j < 3; ++j) -+ mat[i][j] = ((float *)&mv)[i * 4 + j]; ++ mat[i][j] = ((float *)&mv)[j * 4 + i]; + + GL_EXTCALL(glUniformMatrix3fv(prog->vs.normal_matrix_location, 1, FALSE, (GLfloat *)mat)); + checkGLcall("glUniformMatrix3fv");