Enable shadow mapping
First, a light that supports shadow mapping is needed for this to be efficient:
- A spot light (Setup a spot light),
- A beam light (Setup a beam light),
- Point lights also support shadow mapping, but this is a 6 pass process, that is taking more time (Setup a point light).
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 here: Configuring shadow mapping.
![]() | Turning on ray-traced shadows![]() |