This is cheap but incomplete.
To do it more "right", we need multipass when blending or alpha test is enabled, ugh. That's for later.
Anyway, this improves the glow situation in Wipeout somewhat. Still lots of stuff that glows that shouldn't, but a little less overwhelmingly bright.
Before, we would use an id with alphatest on, but not actually compile in
alphatest. Or, we would use a shader with alphatest, when we actually
could compile it out.
Causes glitches but the speedup is truly massive in some games so I relent :/
Please do not report graphics bugs when this is enabled...
Future: Maybe remove this setting except on PowerVR?
That is, if there's no depth testing/writing, and the alpha equation will produce the same result as the alpha test (when the alpha test is >= 0 or != 0 and the blend func is safe), we turn off the alpha test.
Turns out it's one hell of a lot and we really should fix this by
checking both vertices and textures to deduce when we can just skip
alpha testing safely, probably quite often.
I care about this because alpha testing drawing is very expensive
on some mobile chips.