If this flag is set, a model casts a dynamic shadow.
Several types of shadows can be selected through global engine variables.
|General decal shadow
|| Individual decal shadow
|Stencil without self-shadow
||Poisson blurred stencil shadow
- This flag can be set in WED as well.
- Casting a shadow can increase the model rendering time,
especially with stencil shadows
. For reducing the rendering time, stencil shadows
are projected from the model's next LOD step if it exists. This can
- A model can cast
or stencil shadows (see shadow and shadow_stencil).
For preventing self shadowing, set the CAST flag too.
Shadows are only cast when the ambient light reaching the entity is above shadow_threshold, and the distance to the entity is below shadow_range.
- Stencil shadows are only cast by non-transparent
models. The model skin must not contain an alpha channel.
Shadows are only cast by entities when they are potentially visible, i.e. when their visual bounding box touches the view frustum and is - in case of a BSP level - not hidden behind a wall. If you want shadows to be cast by offscreen or hiding model entities, increase their visual bounding boxes by placing dummy vertices in MED.
set(my,SHADOW); // lite-C
my.SHADOW = ON; // C-Script
sun_angle, shadow_stencil, CAST, shadow_threshold, shadow_lod,