When should I use multiple texture units via the glActiveTexture command (TEXTURE 0 and TEXTURE 1)? From the examples I’ve seen multiple textures can be used on the texture unit TEXTURE0.
When should I use multiple texture units via the glActiveTexture command (TEXTURE 0 and
Share
You need multi-texturing for example when you use: normal mapping, parallax mapping, terrain texturing.
In detail for normal mapping you need the diffuse texture unit for the model, but also the normal map and you need to sample both textures, however you can’t activate the same channel for both textures, you need to activate
TEXTURE0andTEXTURE1and bind them to the respective id textures.After you activate them and drew the model using those textures in the color buffer you can use them for other textures.
Think of them as flags to activate different textures channels on the GPU.