Graphics/Material: Add shadow support

The real fun will be in the shader


Former-commit-id: e29e98cbf3c35e4cf14c68852e03dc9da1df0ff1
This commit is contained in:
Lynix
2015-06-18 00:03:38 +02:00
parent 763701df7f
commit ac8578c510
3 changed files with 31 additions and 0 deletions

View File

@@ -38,6 +38,7 @@ inline void NzMaterial::EnableAlphaTest(bool alphaTest)
inline void NzMaterial::EnableDepthSorting(bool depthSorting)
{
// Has no influence on shaders
m_depthSortingEnabled = depthSorting;
}
@@ -48,6 +49,19 @@ inline void NzMaterial::EnableLighting(bool lighting)
InvalidateShaders();
}
inline void NzMaterial::EnableShadowCasting(bool castShadows)
{
// Has no influence on shaders
m_shadowCastingEnabled = castShadows;
}
inline void NzMaterial::EnableShadowReceive(bool receiveShadows)
{
m_shadowReceiveEnabled = receiveShadows;
InvalidateShaders();
}
inline void NzMaterial::EnableTransform(bool transform)
{
m_transformEnabled = transform;
@@ -226,6 +240,16 @@ inline bool NzMaterial::IsLightingEnabled() const
return m_lightingEnabled;
}
inline bool NzMaterial::IsShadowCastingEnabled() const
{
return m_shadowCastingEnabled;
}
inline bool NzMaterial::IsShadowReceiveEnabled() const
{
return m_shadowReceiveEnabled;
}
inline bool NzMaterial::IsTransformEnabled() const
{
return m_transformEnabled;