@@ -9,13 +9,24 @@ void PBRMaterial::Init(const std::string_view name,
99 const std::string_view metallicPath,
1010 const std::string_view normalPath,
1111 const std::string_view roughnessPath,
12- const std::string_view alphaMaskPath) {
12+ const std::string_view alphaMaskPath)
13+ {
1314 Name = name;
1415
15- AlbedoMap = ResourceManager::GetInstance ().LoadTexture (albedoPath);
16- AOMap = ResourceManager::GetInstance ().LoadTexture (aoPath);
17- MetallicMap = ResourceManager::GetInstance ().LoadTexture (metallicPath);
18- NormalMap = ResourceManager::GetInstance ().LoadTexture (normalPath);
19- RoughnessMap = ResourceManager::GetInstance ().LoadTexture (roughnessPath);
20- AlphaMask = ResourceManager::GetInstance ().LoadTexture (alphaMaskPath);
16+ m_materialTextures[ALBEDO] = ResourceManager::GetInstance ().LoadTexture (albedoPath);
17+ m_materialTextures[AO] = ResourceManager::GetInstance ().LoadTexture (aoPath);
18+ m_materialTextures[METALLIC] = ResourceManager::GetInstance ().LoadTexture (metallicPath);
19+ m_materialTextures[NORMAL] = ResourceManager::GetInstance ().LoadTexture (normalPath);
20+ m_materialTextures[ROUGHNESS] = ResourceManager::GetInstance ().LoadTexture (roughnessPath);
21+ m_materialTextures[ALPHA] = ResourceManager::GetInstance ().LoadTexture (alphaMaskPath);
22+ }
23+
24+ /* **********************************************************************************/
25+ unsigned int PBRMaterial::GetParameterTexture (const ParameterType parameter) const noexcept {
26+ return m_materialTextures[parameter];
27+ }
28+
29+ /* **********************************************************************************/
30+ float PBRMaterial::GetParameterColor (const ParameterType parameter) const noexcept {
31+ return m_materialColors[parameter];
2132}
0 commit comments