psh: Final combiner G input is a scalar

This commit is contained in:
Jannik Vogel 2019-02-11 23:19:17 +01:00 committed by mborgerson
parent 52f897aa17
commit f9ba5b9c8c

@ -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);