Load in normal and height maps

(model loading, not rendering)
This commit is contained in:
4VRDriver
2020-09-06 21:18:48 +02:00
parent 8b1fe545c1
commit 6cf551ffb4
3 changed files with 12 additions and 7 deletions

View File

@@ -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);