set_directional_light_cascade_settings
Configure Cascaded Shadow Map parameters on a directional light, such as cascade count and fadeout, with partial updates. Errors if not a directional light.
Instructions
Configure Cascaded Shadow Map (CSM) settings on a directional light: dynamic shadow distance (movable/stationary), cascade count, distribution exponent, transition fraction, distance-fadeout fraction, and per-object inset shadows for movable objects. Partial update (idempotent): only fields present are written; the engine setters auto-dedup, and the inset-shadows bit (no setter) is guarded by hand. Errors honestly if the actor is not a directional light. Verify by read-back (every field is echoed) or via get_directional_light_cascade_settings.
Returns: { light_name, light_subtype, settings_applied: {...}, applied_count, dynamic_shadow_distance_movable, dynamic_shadow_distance_stationary, num_dynamic_shadow_cascades, cascade_distribution_exponent, cascade_transition_fraction, shadow_distance_fadeout_fraction, use_inset_shadows_for_movable_objects }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| light_name | Yes | Name of the directional light actor to modify | |
| cascade_transition_fraction | No | Proportion of the blended fade region between cascades (0 = hard transitions) | |
| num_dynamic_shadow_cascades | No | Number of cascades the view frustum is split into for the whole-scene dynamic shadow | |
| cascade_distribution_exponent | No | Distributes cascades closer (larger) or farther (smaller) from the camera | |
| dynamic_shadow_distance_movable | No | How far CSM dynamic shadows cover for a movable light, measured from the camera (0 disables) | |
| shadow_distance_fadeout_fraction | No | Size of the fade-out region at the far extent of the dynamic shadow, as a fraction of the shadow distance | |
| dynamic_shadow_distance_stationary | No | How far CSM dynamic shadows cover for a stationary light, measured from the camera (0 disables) | |
| use_inset_shadows_for_movable_objects | No | Stationary lights: use per-object inset shadows for movable components even though CSM is enabled |