Load in normal and height maps
(model loading, not rendering)
This commit is contained in:
@@ -103,6 +103,12 @@ Mesh Model::processMesh(aiMesh *mesh, const aiScene *scene) {
|
||||
|
||||
std::vector<Texture*> specularMaps = loadMaterialTextures(material, aiTextureType_SPECULAR, texture_specular);
|
||||
textures.insert(textures.end(), specularMaps.begin(), specularMaps.end());
|
||||
|
||||
std::vector<Texture*> normalMaps = loadMaterialTextures(material, aiTextureType_NORMALS, texture_normal);
|
||||
textures.insert(textures.end(), normalMaps.begin(), normalMaps.end());
|
||||
|
||||
std::vector<Texture*> heightMaps = loadMaterialTextures(material, aiTextureType_HEIGHT, texture_height);
|
||||
textures.insert(textures.end(), heightMaps.begin(), heightMaps.end());
|
||||
}
|
||||
|
||||
return Mesh(vertices, indices, textures);
|
||||
|
||||
Reference in New Issue
Block a user