<p>As gllampert pointed out in the comments the value is hardware dependent. You can retrieve it with <a href="https://www.opengl.org/sdk/docs/man3/xhtml/glGet.xml">glGet</a>, using <code>GL_MAX_COMBINED_TEXTURE_IMAGE_UNIT</code>. You can find how different hardware performs <a href="http://delphigl.de/glcapsviewer/gl_stats_caps_single.php?listreportsbycap=GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS">here</a>.</p>

<p>However, in OpenGL 3 there is a lower bound of <strong>at least 48 simultaneously used textures</strong>, no matter which type. [<a href="https://www.opengl.org/sdk/docs/man3/xhtml/glActiveTexture.xml">source</a>]</p>

CC BY-SA 3.0
2015-09-06T20:43:18.473Z
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.
Alan Wolfe
CC BY-SA 3.0
2015-09-06T20:45:16.870Z
Well, OpenGL3 enforces 48 as I have mentioned. There might be a higher minimum in practice of course. Or did I misunderstand you?
Wumpf
CC BY-SA 3.0
2015-09-06T20:31:32.580Z
2015-09-06T20:52:27.517Z
2015-09-06T20:52:27.517Z
Wumpf
<p>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!</p>

CC BY-SA 3.0
2015-09-06T19:12:20.497Z
I'm fairly certain that these values are hardware/version specific, but there are minimum values that an implementation must support. You can query them with [`glGet`](https://www.opengl.org/sdk/docs/man/html/glGet.xhtml).
glampert
CC BY-SA 3.0
2015-09-07T00:01:07.253Z
Note that the textures you've described are 64 MB each, so you may get limited by available VRAM before you hit API limits on the number of textures. 8 textures = 512 MB, so should be fairly safe, but many older cards or mobile cards only have 1 or 2 GB of VRAM, so you won't be able to go much more than 8 of these textures and still have VRAM left over for anything else.
Nathan Reed
CC BY-SA 3.0
2015-09-07T09:44:37.250Z
What do you mean by 256*256*256? what is the third number?
Iman Rosstin
CC BY-SA 3.0
2015-09-08T20:44:07.357Z
@Iman it's a 3d texture rather than a 2d texture - if you want more info you could ask a separate question if you like.
trichoplax is on Codidact now
CC BY-SA 3.0
2015-09-09T13:19:38.813Z
I never heard such a thing, I thought textures are 2D (u,v) raster map that draped on 3d objects, however I take a look at tutorials and I become familiar with the concept. Thanks for your tip Terry
Iman Rosstin
<opengl><3dtexture>
How many 3D textures does OpenGL support
Sam
# How many 3D textures does OpenGL support

(Asked by: username_0 on 2015-09-06)

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!

**Tags:** opengl, 3dtexture

> **Comments:**
> **username_1**: I'm fairly certain that these values are hardware/version specific, but there are minimum values that an implementation must support. You can query them with [`glGet`](https://www.opengl.org/sdk/docs/man/html/glGet.xhtml).  
> **username_2**: Note that the textures you've described are 64 MB each, so you may get limited by available VRAM before you hit API limits on the number of textures. 8 textures = 512 MB, so should be fairly safe, but many older cards or mobile cards only have 1 or 2 GB of VRAM, so you won't be able to go much more than 8 of these textures and still have VRAM left over for anything else.  
> **username_3**: What do you mean by 256*256*256? what is the third number?  
> **username_4**: @username_3 it's a 3d texture rather than a 2d texture - if you want more info you could ask a separate question if you like.  
> **username_3**: I never heard such a thing, I thought textures are 2D (u,v) raster map that draped on 3d objects, however I take a look at tutorials and I become familiar with the concept. Thanks for your tip Terry  

---

## 1 answers

### Answer by username_5 on 2015-09-06. Score: 6 | Accepted answer

As gllampert pointed out in the comments the value is hardware dependent. You can retrieve it with [glGet](https://www.opengl.org/sdk/docs/man3/xhtml/glGet.xml), using `GL_MAX_COMBINED_TEXTURE_IMAGE_UNIT`. You can find how different hardware performs [here](http://delphigl.de/glcapsviewer/gl_stats_caps_single.php?listreportsbycap=GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS).

However, in OpenGL 3 there is a lower bound of **at least 48 simultaneously used textures**, no matter which type. [[source](https://www.opengl.org/sdk/docs/man3/xhtml/glActiveTexture.xml)]

> **Comments:**
> **username_6**: Also as username_1 hinted, you want to find the minimum that must be supported, because that is the amount you can actually rely on, on all hardware.  
> **username_5**: Well, OpenGL3 enforces 48 as I have mentioned. There might be a higher minimum in practice of course. Or did I misunderstand you?  

---

