Hah this took a while, as there was no texture scaffolding in place at
all. Thus all this had to be added and tested for the first time:
* 2D textures
* 2D texture arrays
* Texture transformation uniforms
* Texture transformation UBOs
* Instanced texture offset
This also means that MeshVisualizer can be used to visualize arbitrary
(single-channel) integer textures now, not just render meshes with
object ID textures. Yay for feature parity!
Forgot that gl_VertexID includes the base offset in the multidraw
scenarios, so we need to take all vertices into account, not just the
largest view. The wraparound would cause nasty output differences among
drivers.
Mainly to have feature parity with Flat and Phong -- otherwise switching
to draw a wireframe on an instanced mesh would be too annoying. Also, if
we have multidraw there already, why not instancing as well.
Originally the uniform wasn't present with the assumption that users
could easily adjust color map offset to achieve the same effect. That
was however unnecessarily annoying and error-prone in cases where it's
essential to have the same object IDs from multiple draws have a
matching color, and it was complicating multidraw workflows as the color
map offset was not a part of per-draw data, but rather material data.
This makes existing tests slightly broken, which is good (if it
wouldn't, the thresholds would be too huge). Since the addition of ES3.2
geometry shaders (which broke this) happened long before there were
rendering tests for shaders, this breakage wasn't caught until now. Of
course proper tests would include the perspective case from the previous
commit since the very beginning, but that's hard to do when you're
testing long after the code was written.
The test files are now RLE-encoded, which makes them significantly
smaller (tho I assume Git would further compress both anyway). Not
updating existing files to RLE yet to avoid repo history bloat, doing
that the next time they get changed.