private void UpdateRenderQueueSplitOptions()
{
RenderQueue q = this.GetRenderQueue();
if ( this.IsShadowTechniqueStencilBased )
{
// Casters can always be receivers
q.ShadowCastersCannotBeReceivers = false;
}
else // texture based
{
q.ShadowCastersCannotBeReceivers = !this.shadowTextureSelfShadow;
}
if ( this.IsShadowTechniqueAdditive && this.currentViewport.ShowShadows )
{
// Additive lighting, we need to split everything by illumination stage
q.SplitPassesByLightingType = true;
}
else
{
q.SplitPassesByLightingType = false;
}
if ( this.IsShadowTechniqueInUse && this.currentViewport.ShowShadows )
{
// Tell render queue to split off non-shadowable materials
q.SplitNoShadowPasses = true;
}
else
{
q.SplitNoShadowPasses = false;
}
}