mesa: glsl: better implementation of ftransform()
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 20 Aug 2008 17:06:53 +0000 (11:06 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 20 Aug 2008 17:06:53 +0000 (11:06 -0600)
src/mesa/shader/slang/library/slang_vertex_builtin.gc

index 20c924a30d7e1fdf746a3c5079b884237b61b465..17e86d9a0edd2c9409fd6d95723e9472e06e3bc3 100644 (file)
@@ -57,7 +57,10 @@ varying float gl_FogFragCoord;
 
 vec4 ftransform()
 {
-   __retVal = gl_Vertex * gl_ModelViewProjectionMatrixTranspose;
+   __retVal = gl_ModelViewProjectionMatrix[0] * gl_Vertex.xxxx
+            + gl_ModelViewProjectionMatrix[1] * gl_Vertex.yyyy
+            + gl_ModelViewProjectionMatrix[2] * gl_Vertex.zzzz
+            + gl_ModelViewProjectionMatrix[3] * gl_Vertex.wwww;
 }