Skills

Bevy 3d Lighting

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

Install

npx skills add thedivergentai/Game-Dev-Agentic-Skills --skill bevy-3d-lighting -g -a claude-code -y
Category
Media
Updated
19d ago
License
LGPL-3.0
Context cost
Mediumabout 2,334 tokens
Runs scripts
No, instructions only

What it does

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.

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

NeedSpawn
SunDirectionalLight plus CascadeShadowConfig on one entity.
Local omniPointLight (intensity in lumens, range in meters).
ConeSpotLight with inner_angle and outer_angle in radians.
Distance hazeDistanceFog on the camera entity.
Local image-based lightingLightProbe with EnvironmentMapLight cubemap handles.

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

[dependencies]
bevy = "0.20"
use bevy::light::{
    CascadeShadowConfig, CascadeShadowConfigBuilder, DirectionalLightShadowMap, SunDisk,
};
Read the whole SKILL.md on GitHub

More in Media