TextureArray Depth Limit?

Hi, there,

I am loading a texturearray from a file (custom loader) and everything was working great, right up until I increased the size of the array to 63x63x4096. Then I started getting all 0’s when I sampled it in my fragment program. If I reduce the size to 63x63x2048, everything’s fine (except of course, missing half my tex array), but if I add the 2049th depth slice, the whole thing goes black. I thought I might be hitting a texture limit, but the dimensions involved seem really low for that, and the limitation is the same on both my intel integrated & nvidia discrete graphics cards. I have a laptop, though, so maybe it’s just laptop graphics cards being kind of bad?

The integrated is an Intel HD Graphics 4600, the discrete is a GeForce GT 750M.

Is it possible that the 2048 slice limitation is something added by jmonkey, or maybe the version of opengl I’m using has an abitrary 2048 depth limit?

I think these limits are arbitrary per OpenGL/driver and hardware implementation.

So bearing in mind that I’m going to have to split this thing up into N different textures, where N = 4096/the limit, do you know of a reasonably good value for N that will give me access to most hardware? Or some way of determining this?

So I did a little research and it seems like 2048 is an across-the-board limitation, no modern graphics card should have a depth limit less than that. Even DX seems to have a 2048 limit. Just FYI.

1 Like