Skip to main content
gamedev.net
🔒 Locked

Multiple texture mapping using 3d textures... no?

Started by Maigo 3 replies 700+ views
Original Post
Maigo
Maigo
Hello I'm struggling to write my first OpenGL application and for the task I'm doing my best exploring various texture mapping techniques. I started out implementing normal mapping using shaders and now i want to add some other stuff (like height maps, specular maps and so) that i can use in my shader program. However, I read somewhere that many graphic cards only have 2 texture units so how do I manage to access 3 or more textures with my shader? My first though was to turn to 3d textures... representing one type of texture per layer... is this possible, or just a bad idea? I would really appreciate some feedback on this :)
Yann L
Yann L
Quote:
Original post by Maigo
However, I read somewhere that many graphic cards only have 2 texture units

Ten years ago :)

Current graphics cards have 16+ texture units. And they can be extended virtually without limit by using texture arrays (theoretically up to 131072 texture units).
HuntsMan
HuntsMan
No modern card has only 2 texture units, the documentation you read is probably very old.
V-man
V-man
Gf 8 and above have 32 units but these aren't full units. They are just samplers.
I guess it is the same for AMD HD GPUs.

glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &MaxTextureImageUnits);
Maigo
Maigo
0.o Thanks for the replies! This makes everything so much more easy to handle :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.