Skip to content

Commit b93cc55

Browse files
committed
More messing with PBRMaterial
1 parent 1470856 commit b93cc55

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

MP-APS/.vs/MP-APS/v15/.suo

0 Bytes
Binary file not shown.

MP-APS/.vs/MP-APS/v15/Browse.VC.db

8 KB
Binary file not shown.

MP-APS/PBRMaterial.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
#include <memory>
66
#include <array>
7-
#include <variant>
87

98
// Material for a PBR pipeline
109
class PBRMaterial {
@@ -44,16 +43,22 @@ class PBRMaterial {
4443
unsigned int GetParameterTexture(const ParameterType parameter) const noexcept;
4544
glm::vec3 GetParameterColor(const ParameterType parameter) const noexcept;
4645

47-
// Gets active alpha texture/value from union
48-
auto GetAlpha() const noexcept;
46+
auto GetAlphaValue() const noexcept {
47+
return m_alpha;
48+
}
4949

50-
private:
51-
std::variant<unsigned int, float> m_alpha;
50+
auto GetAlphaMask() const noexcept {
51+
return m_alphaMaskTexture;
52+
}
5253

54+
private:
5355
// unsigned int HeightMap;
5456

5557
std::array<unsigned int, 5> m_materialTextures;
5658
std::array<glm::vec3, 5> m_materialColors;
59+
60+
float m_alpha;
61+
unsigned int m_alphaMaskTexture;
5762
};
5863

5964
using PBRMaterialPtr = std::shared_ptr<PBRMaterial>;

0 commit comments

Comments
 (0)