From 1026f0e42f914a52e5ebb2ea65262130fe8fa6d8 Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Mon, 18 Feb 2019 22:59:15 +0100 Subject: [PATCH] vsh: Minor improvements to individually weighted skinning --- hw/xbox/nv2a/nv2a_shaders.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/xbox/nv2a/nv2a_shaders.c b/hw/xbox/nv2a/nv2a_shaders.c index e7daa53485..9684e148eb 100644 --- a/hw/xbox/nv2a/nv2a_shaders.c +++ b/hw/xbox/nv2a/nv2a_shaders.c @@ -265,13 +265,12 @@ static void append_skinning_code(QString* str, bool mix, } qstring_append(str, "}\n"); } else { - /* Individual matrices */ + /* Individual weights */ int i; for (i = 0; i < count; i++) { char c = "xyzw"[i]; - qstring_append_fmt(str, "%s += (%s * %s%d * weight.%c).%s;\n", - output, input, matrix, i, c, - swizzle); + qstring_append_fmt(str, "%s += (%s * %s%d).%s * weight.%c;\n", + output, input, matrix, i, swizzle, c); } assert(false); /* FIXME: Untested */ }