Added alpha-mapping support

Former-commit-id: ba4598e9e5efc47e04e72dc709d64d214d77e9a1
This commit is contained in:
Lynix
2013-05-16 22:47:25 +02:00
parent 0b66452e33
commit 4b68ff0118
6 changed files with 110 additions and 25 deletions

View File

@@ -53,6 +53,7 @@ class NAZARA_API NzMaterial : public NzResource
NzColor GetAmbientColor() const;
const NzShader* GetCustomShader() const;
NzColor GetDiffuseColor() const;
NzTexture* GetAlphaMap() const;
NzTexture* GetDiffuseMap() const;
NzTextureSampler& GetDiffuseSampler();
const NzTextureSampler& GetDiffuseSampler() const;
@@ -85,6 +86,8 @@ class NAZARA_API NzMaterial : public NzResource
void Reset();
bool SetAlphaMap(const NzString& texturePath);
void SetAlphaMap(NzTexture* map);
void SetAmbientColor(const NzColor& ambient);
void SetDiffuseColor(const NzColor& diffuse);
bool SetDiffuseMap(const NzString& texturePath);
@@ -128,6 +131,7 @@ class NAZARA_API NzMaterial : public NzResource
NzTextureSampler m_diffuseSampler;
NzTextureSampler m_specularSampler;
mutable NzShaderConstRef m_customShader;
NzTextureRef m_alphaMap;
NzTextureRef m_diffuseMap;
NzTextureRef m_emissiveMap;
NzTextureRef m_heightMap;