textures : re-binding vs keep to different units


I have one minor question that has been bugging me for a while.
Say I have 10 textures used in 10 shaders, 1 tex/shader. These textures/shaders are all I use in my render loop.

Is it better to a) bind each one to, say, tex unit 0 when needed, or b) bind them once in tex units 0-9 & forget about them?

Provided that I have the available VRAM to store them, is there an advantage for the b) method?


b) could be faster :slight_smile: But you never know how the driver works. I personally see no disadvantage in using b) except it is kind of a hack :slight_smile:

Thanks Zengar,

I’m using b) for the speed potential of no rebinding, but it can get pretty messy after a while with many textures :slight_smile: