From f9ba5b9c8c68c88c59935d663d43e24642b6df2c Mon Sep 17 00:00:00 2001 From: Jannik Vogel Date: Mon, 11 Feb 2019 23:19:17 +0100 Subject: [PATCH] psh: Final combiner G input is a scalar --- hw/xbox/nv2a/nv2a_psh.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/xbox/nv2a/nv2a_psh.c b/hw/xbox/nv2a/nv2a_psh.c index 9feb4e6865..eb5fb291bb 100644 --- a/hw/xbox/nv2a/nv2a_psh.c +++ b/hw/xbox/nv2a/nv2a_psh.c @@ -488,13 +488,12 @@ static void add_final_stage_code(struct PixelShader *ps, struct FCInputInfo fina QString *b = get_input_var(ps, final.b, false); QString *c = get_input_var(ps, final.c, false); QString *d = get_input_var(ps, final.d, false); - QString *g = get_input_var(ps, final.g, false); + QString *g = get_input_var(ps, final.g, true); qstring_append_fmt(ps->code, "fragColor.rgb = %s + mix(vec3(%s), vec3(%s), vec3(%s));\n", qstring_get_str(d), qstring_get_str(c), qstring_get_str(b), qstring_get_str(a)); - /* FIXME: Is .x correctly here? */ - qstring_append_fmt(ps->code, "fragColor.a = vec3(%s).x;\n", qstring_get_str(g)); + qstring_append_fmt(ps->code, "fragColor.a = %s;\n", qstring_get_str(g)); qobject_unref(a); qobject_unref(b);