Graphics/Material: Add shadow support
The real fun will be in the shader Former-commit-id: e29e98cbf3c35e4cf14c68852e03dc9da1df0ff1
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user