# Bevy 3d Lighting

Spawn and tune Bevy 0.20 directional, point, and spot lights, cascade shadows, distance...

- Repository: https://github.com/thedivergentai/Game-Dev-Agentic-Skills (917 stars)
- Category: Media
- License: LGPL-3.0
- Last updated: 2026-10-16
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-3d-lighting -g -a claude-code -y`
Codex: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-3d-lighting -g -a codex -y`
Cursor: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-3d-lighting -g -a cursor -y`
Gemini CLI: `npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-3d-lighting -g -a gemini-cli -y`

## Description

Spawn and tune Bevy 0.20 directional, point, and spot lights, cascade shadows, distance fog, and a nearest-light shadow budget. Use when a 3D scene needs a sun, local lights, or fog on the camera. Keywords: DirectionalLight, PointLight, SpotLight, CascadeShadowConfig, DistanceFog, bevy_light.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Bevy 3D lighting

## When to use

Load this when a 3D scene needs lights. Materials stay on bevy-3d-materials. Spawn light entities; clustering and shadow extraction stay engine-owned.

## ECS shape

- **Module:** `bevy::light` says it provides directional, point, and spot lights, plus light probes, atmosphere, volumetrics, and shadow configuration.
- **Feature:** `bevy_light` is described the same way on the crate feature list.
- **PBR page names:** `DirectionalLightViewEntities`, `ExtractedDirectionalLight`, `ExtractedPointLight`, `ExtractedRectLight`, `GpuClusteredLight` (point, spot, or rectangle), `DistanceFog`, `LightProbePlugin`, `ContactShadows`.
- **Systems:** light clustering and extraction are engine-owned. Gameplay only spawns light entities.

## Light choice

| Need | Spawn |
| --- | --- |
| Sun | `DirectionalLight` plus `CascadeShadowConfig` on one entity. |
| Local omni | `PointLight` (`intensity` in lumens, `range` in meters). |
| Cone | `SpotLight` with `inner_angle` and `outer_angle` in radians. |
| Distance haze | `DistanceFog` on the camera entity. |
| Local image-based lighting | `LightProbe` with `EnvironmentMapLight` cubemap handles. |

`bevy_solari` is the experimental raytraced-lighting Cargo feature. These examples use the raster lights in `bevy::light`.

```toml
[dependencies]
bevy = "0.20"
```

```rust
use bevy::light::{
    CascadeShadowConfig, CascadeShadowConfigBuilder, DirectionalLightShadowMap, SunDisk,
};

The rest: https://github.com/thedivergentai/Game-Dev-Agentic-Skills/blob/HEAD/skills/bevy-3d-lighting/SKILL.md
