How can I pass multiple textures to a single shader?
It is very simple, really. All you need is to bind the sampler to some texture unit with glUniform1i. So for your code sample, assuming the two uniform samplers: uniform sampler2D DecalTex; // The texture (we’ll bind to texture unit 0) uniform sampler2D BumpTex; // The bump-map (we’ll bind to texture unit 1) In your … Read more