Fix to M3X2 in GLSL profile. trunk
authorRyan C. Gordon <icculus@icculus.org>
Wed, 16 Apr 2008 17:58:11 -0400
branchtrunk
changeset 130 e2eeb1f1c902
parent 129 272d51a25a21
child 131 35a1f5c98d95
Fix to M3X2 in GLSL profile. M3X2 should output a vec2, not a vec3.
mojoshader.c
--- a/mojoshader.c	Wed Apr 16 17:53:41 2008 -0400
+++ b/mojoshader.c	Wed Apr 16 17:58:11 2008 -0400
@@ -2317,7 +2317,7 @@
     const char *row1 = make_GLSL_sourcearg_string(ctx, 2);
 
     const char *code = make_GLSL_destarg_assign(ctx, 0,
-                                "vec3(dot(vec3(%s), vec3(%s)), "
+                                "vec2(dot(vec3(%s), vec3(%s)), "
                                      "dot(vec3(%s), vec3(%s)))",
                                 src0, row0, src0, row1);
     output_line(ctx, "%s", code);