mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
wined3d-NormalMatrix: Fix calculation of transpose matrix.
This commit is contained in:
parent
8751f075a1
commit
b0cf640a90
@ -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 <mbruni@codeweavers.com>
|
||||
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");
|
||||
|
Loading…
Reference in New Issue
Block a user