Enable Shadow Mapping

First, a light that supports shadow mapping is needed for this to be efficient:

Then:

RED::ILightShape* ilight = light->As< RED::ILightShape >();
RC_TEST( ilight->SetShadowMapping( true, iresmgr->GetState() ) );

All the methods needed to configure a shadow map are detailed in the doc Real-Time Lights under the section Configuring Shadow Mapping.