The docs here make it sound like it’s possible by binding the -1 slice index. (Unity - Manual: Texture arrays) When I try that it only renders into the first slice. -1 seems like it’s supposed to do something, since any other invalid index makes for some lovely random rendering patterns.
I tried being “clever” and building a list of RenderBuffer refs, but no real surprise that it doesn’t work. Graphics.activeColorBuffer saves the texture ref, but not the slice. You end up binding all targets to the same slice which seems to explode.
Graphics.SetRenderTarget(_rt, 0, CubemapFace.Unknown, 0);
buffers[0] = Graphics.activeColorBuffer;
...
Graphics.SetRenderTarget(buffers, _rt.depthBuffer);
What I’m trying to do is render some subsampled effects coefficients into screen space buffers that I sample in a bunch of other shaders. Having a texture Array would be great so I don’t have to bind a lot of textures in all my other shaders. Surely good for performance if I can avoid individually binding so many textures.
This is easy peasy in even GL 3.x. :-\ Is there something obvious I’m missing?