Note that `unlitColor` (option 1) is a vec3, but `u_matspecular` (option 2) is a vec4.  You'll notice that `u_matspecular.a` is used.  Are you sure it's fine for `specular` to sometimes be a vec3 and other times be a vec4?

That's this line:

```
WRITE(p, "    lightSum1 += u_lightspecular%i * %s * (pow(dot%i, u_matspecular.a) * (dot%i * lightScale%i));\n", i, specular, i, i, i);
```

So if I understand right, when specular is not set for materialupdate, you're wanting to multiply alpha by the specular coefficient (see comment above where it says that's what `u_matspecular.a` is)?

-[Unknown]