c++ - Assigning texture to an object using multiple textures -


enter image description here

i'm making object loader, , texture parts in different texture files. best solution of having mapped on model? need treat every part has it's own texture 1 model, final body has many separate drawing calls 1 texture each?

with advent of programmable rendering pipeline (i.e.: shaders) can apply , combine multiple textures meshes without need multiple draw calls.

modern gpus have several texture units (glactivetexture) , shaders can read may units @ time. model on right showed in picture, example, uses variation of phong lighting model diffuse texture, normal map texture , specular map texture highlights. these 3 textures applied each texture unit , whole model rendered in 1 draw call. fragment shader reads textures , combines them produce final image.

your question not specific, can now. if have more specific questions, please fell free ask.


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -