hrydgard/pspautotests — pull request #68 by unknownbrackets (2013-04-11 07:29:17+00:00)
Title: Start of a test of the material-related commands

Although I don't really understand them...

Anyway, so far there are a bunch of boxes that draw differently in PPSSPP than on the PSP in this test, so it's probably (hopefully?) useful.

I was trying to make a test for that difference:

```
const char *ambient = (gstate.materialupdate & 1) ? (hasColor ? "a_color0" : "u_matambientalpha") : "u_matambientalpha";
```

Versus:

```
const char *ambient = (gstate.materialupdate & 1) ? (hasColor ? "vec4(a_color0.rgb, u_matambientalpha.a)" : "u_matambientalpha") : "u_matambientalpha";
```

The former is clearly more correct (lots of things broken with the latter), but trees are missing in Senjou no Valkyria 3, and the latter fixes it. I thought I hit the hasColor, materialupdate, and isLightingEnabled cases, but I must be missing something since I get the same output with either version of the shader...

-[Unknown]