I'm making a voxel engine in OpenGL and wondering how many 3D textures I can have at once. They are fairly large (256x256x256 in GL_R32UI format). I want it to be able to run on any graphics card supporting OpenGL 3.3, if possible. I'm accessing them all from the same fragment shader, by the way. So how many can I have? Will 8 work? Thanks!
1 Answer
$\begingroup$
$\endgroup$
2
As gllampert pointed out in the comments the value is hardware dependent. You can retrieve it with glGet, using GL_MAX_COMBINED_TEXTURE_IMAGE_UNIT
. You can find how different hardware performs here.
However, in OpenGL 3 there is a lower bound of at least 48 simultaneously used textures, no matter which type. [source]
-
$\begingroup$ Also as glampert hinted, you want to find the minimum that must be supported, because that is the amount you can actually rely on, on all hardware. $\endgroup$ Commented Sep 6, 2015 at 20:43
-
$\begingroup$ Well, OpenGL3 enforces 48 as I have mentioned. There might be a higher minimum in practice of course. Or did I misunderstand you? $\endgroup$– WumpfCommented Sep 6, 2015 at 20:45
glGet
. $\endgroup$