Fixed some transparency bugs and started on component based camera
This commit is contained in:
@@ -78,7 +78,12 @@ RawModel::RawModel(std::string fileName)
|
||||
// Material diffuse color
|
||||
aiColor4D diffuse;
|
||||
material->Get(AI_MATKEY_COLOR_DIFFUSE, diffuse);
|
||||
desc.DiffuseVertexColor = glm::vec4(diffuse.r, diffuse.g, diffuse.b, diffuse.a);
|
||||
|
||||
float opacity;
|
||||
material->Get(AI_MATKEY_OPACITY, opacity);
|
||||
|
||||
desc.DiffuseVertexColor = glm::vec4(diffuse.r, diffuse.g, diffuse.b, opacity);
|
||||
|
||||
// Material specular color
|
||||
aiColor4D specular;
|
||||
material->Get(AI_MATKEY_COLOR_SPECULAR, specular);
|
||||
@@ -132,6 +137,7 @@ RawModel::RawModel(std::string fileName)
|
||||
matGroup.EndIndex = m_Indices.size() - 1;
|
||||
// Material shininess
|
||||
material->Get(AI_MATKEY_SHININESS, matGroup.Shininess);
|
||||
material->Get(AI_MATKEY_OPACITY, matGroup.Transparency);
|
||||
//LOG_DEBUG("Shininess: %f", matGroup.Shininess);
|
||||
// Diffuse texture
|
||||
//LOG_DEBUG("%i diffuse textures found", material->GetTextureCount(aiTextureType_DIFFUSE));
|
||||
|
||||
Reference in New Issue
Block a user