private void UpdateRenderQueueGroupSplitOptions( RenderQueueGroup group,
bool suppressShadows,
bool suppressRenderState )
{
if ( this.IsShadowTechniqueStencilBased )
{
// Casters can always be receivers
group.ShadowCastersCannotBeReceivers = false;
}
else if ( this.IsShadowTechniqueTextureBased )
{
group.ShadowCastersCannotBeReceivers = !this.shadowTextureSelfShadow;
}
if ( !suppressShadows && this.currentViewport.ShowShadows && this.IsShadowTechniqueAdditive )
{
// Additive lighting, we need to split everything by illumination stage
group.SplitPassesByLightingType = true;
}
else
{
group.SplitPassesByLightingType = false;
}
if ( !suppressShadows && this.currentViewport.ShowShadows && this.IsShadowTechniqueInUse )
{
// Tell render queue to split off non-shadowable materials
group.SplitNoShadowPasses = true;
}
else
{
group.SplitNoShadowPasses = false;
}
}