protected override IList FindShadowCastersForLight( Light light, Camera camera )
{
// objectsForRendering was filled at ProcessVisibleLeaf which is called
// during FindVisibleObjects
IList casters = base.FindShadowCastersForLight( light, camera );
for ( int i = 0; i < casters.Count; i++ )
{
if ( !objectsForRendering.ContainsKey( ( (MovableObject)casters[ i ] ).Name ) )
{
// this shadow caster is not visible, remove it
casters.RemoveAt( i );
i--;
}
}
return casters;
}