Guide
Game lighting explained
Lighting is not decoration — it is a gameplay system. A warm torch in a dungeon tells the player where to go; a harsh red rim light telegraphs an incoming boss attack; flat, evenly lit corridors make platforming jumps unreadable. Every frame, your renderer combines light sources, materials, and shadow data into the image on screen, and the choices you make here affect mood, navigation, combat clarity, and frame rate. This guide covers the light types engines expose, the trade-off between real-time and baked global illumination, shadow techniques from cheap to cinematic, how physically based rendering (PBR) interacts with lights, probes and reflection captures for moving objects, volumetric fog and god-rays, day-night cycles, and a production checklist that ties lighting to level design, shaders, and camera framing.
What lighting does beyond looking pretty
Film directors use lighting to guide the eye; game designers use it for the same reason plus mechanical affordances. Three jobs overlap in every scene:
- Mood and identity — cool blue moonlight reads as lonely; saturated neon reads as cyberpunk. Consistent color temperature across a biome sells place.
- Readability — players must see enemies, pickups, ledges, and hazards without squinting. High-contrast silhouettes beat photorealistic murk in fast action.
- Performance budgeting — each dynamic light with shadows can cost milliseconds. Lighting design is inseparable from your frame budget.
Treat lighting as early as greybox blockout. A level that only "comes alive" after an artist paints lights at the end often needs structural rework — moving windows, widening sightlines, or adding emissive props that double as navigation beacons.
Light types every engine provides
Real-time engines (Unity, Unreal, Godot, custom WebGL) model a handful of idealized light shapes. Know which to reach for:
- Directional light — parallel rays from infinite distance, like the sun. One per scene is typical; rotation drives time-of-day. Cheap per object because shadow maps are shared.
- Point light — radiates spherically from a position (torches, bulbs, explosions). Falloff with distance is configurable; each shadow-casting point light is expensive.
- Spot light — cone-shaped beam (flashlights, stage spots, headlights). Inner and outer cone angles control penumbra softness.
- Area light — emissive rectangle or disc; produces soft shadows and realistic highlights on PBR materials. Often baked or approximated in real time because accurate area shadows are costly.
- Emissive surfaces — meshes or sprites that glow (screens, runes, lava). They contribute to bloom and sometimes bounce light in baked GI without being full dynamic lights.
2D games simplify this stack: tinted ambient color plus localized point lights on a normal map, or hand-painted light masks in a multiply layer. The design goals — focal points and hazard contrast — stay the same.
Real-time vs baked global illumination
Global illumination (GI) models indirect light: a red wall bouncing warm fill onto a white floor, or sunlight bleeding through a stained-glass window. Fully dynamic GI (ray-traced or probe-based updates every frame) looks stunning but taxes GPUs. Most shipped games mix approaches:
Baked lighting
Static geometry has lightmaps precomputed offline. UV charts store per-texel color and optional directional information (light probes for moving characters sample nearby baked data). Pros: gorgeous indirect bounce at zero runtime cost for static props. Cons: long bake times, no moving sun without blending lightmap sets, artifacts on thin geometry if UVs are sloppy.
Fully dynamic lighting
Every object lit per frame from live sources. Mandatory for destructible worlds, large time-of-day shifts, and multiplayer where level state changes unpredictably. Pair with simplified GI: screen-space ambient occlusion (SSAO), reflection probes, or engine-specific real-time global illumination (Lumen, DDGI) at controlled quality tiers.
Hybrid (the common production path)
Baked indirect for architecture + one movable directional sun with cascaded shadows + a handful of dynamic fill lights for gameplay events. Players get stable performance in interiors and dramatic exterior sunsets without rebaking entire cities nightly.
Shadow techniques and their costs
Shadows ground objects in space and sell scale, but they are among the most expensive lighting features. Typical implementations:
- Shadow maps — render scene depth from the light's point of view into a texture; compare per pixel. Resolution determines sharpness; low res shows blocky stair-steps (aliasing).
- Cascaded shadow maps (CSM) — multiple shadow map frusta at increasing distance from the camera so near shadows stay sharp while distant ones coarsen. Standard for open-world sun shadows.
- Contact shadows / screen-space shadows — short-range detail (feet on ground) derived from the depth buffer. Cheap but fails on off-screen occluders.
- Ray-traced shadows — hardware RT cores trace rays per pixel for soft area-light penumbra. Quality scales with denoising and sample count; often a PC ultra preset only.
Budget discipline: not every torch needs a shadow map. Use blob shadows (decals) for minor props, fake shadows in albedo textures for distant clutter, and reserve full shadows for the player, enemies, and hero interactables.
PBR materials and how lights read on them
Modern games use physically based rendering: surfaces defined by albedo (base color), metalness, roughness, and normal maps. Lights interact predictably — rough dielectric (wood, skin) has broad highlights; smooth metal mirrors the environment. This matters for lighting artists because a single point light on chrome reads ten times brighter than on matte stone with the same intensity.
Practical rules:
- Keep albedo textures within a sane luminance range (no pure black or #FFFFFF white on large surfaces) so lights have headroom.
- Use roughness variation — fingerprints on metal, worn edges on stone — so highlights break up instead of looking like plastic.
- Pair strong specular materials with reflection probes or image-based lighting (IBL) cubemaps; otherwise metals look like gray paint.
Shader authors implement the BRDF in fragment shaders; lighting designers tune the inputs those shaders consume.
Light probes, reflection captures, and moving objects
Baked GI lives on static meshes, but characters and physics props move. Engines place light probes (spherical harmonics or grid samples) throughout levels; dynamic objects interpolate nearby probes each frame for approximate indirect color. Misplaced probes cause characters to suddenly tint blue when crossing a room — debug views that visualize probe influence are essential.
Reflection probes capture cubemap snapshots of the environment at key locations (shop windows, puddles, armor). Blend between probes as the camera moves. Update frequency is a trade-off: real-time captures every frame are rare; static captures with parallax correction suffice for most interiors.
Volumetric lighting, fog, and atmosphere
God-rays through cathedral windows, dusty mine shafts, and underwater murk are volumetric effects — simulating light scattering through participating media. Techniques range from cheap fullscreen fog tinting distance to froxel-based volumetric fog that reacts to shadow maps in real time.
Fog also hides LOD transitions and distant pop-in — a legitimate production tool, not just mood. Exponential height fog (denser in valleys) sells scale in open worlds. Keep foreground gameplay zones above minimum visibility thresholds; accessibility options should disable heavy fog that obscures enemies per accessibility guidelines.
Day-night cycles and scripted lighting beats
Open-world games animate sun rotation, sky color gradients, and street lamp schedules. Implementation pattern: curve-driven parameters (sun color, intensity, ambient, fog density) keyed over 24 in-game hours, with discrete events (lightning flash, alarm red override) blending on top.
Scripted beats in linear games use lighting volumes or trigger zones — entering a boss arena dims ambient, cranks rim light, and enables volumetrics. Sync lighting changes with audio stingers and juice for maximum impact. Fade times of 0.5–2 seconds feel cinematic; instant snaps read as glitches unless intentional.
Stylized vs photoreal lighting pipelines
Not every game chases ray-traced realism. Stylized titles flatten ramps, paint gradient skies, and use rim lights as outline substitutes (cel-shading). The pipeline differs but the hierarchy remains: key light (main direction), fill (soften shadows), rim (separate subject from background). Overwatch and Zelda-style games exaggerate these three for readability at distance.
Photoreal pipelines lean on HDR rendering, tone mapping (ACES is common), bloom on bright emissives, and color grading LUTs in post. Match art direction early — switching from toon to PBR mid-production rebuilds every material and rebakes every lightmap.
Performance checklist for PC, console, and mobile
- Count shadow-casting lights — hard cap per view (often 1–4 on mobile, 8–16 on desktop with cascading sun counting as one).
- Shadow map resolution tiers — 1024 for minor lights, 2048–4096 for hero sun cascades; never 8K maps "because we can."
- Light overlap — each pixel adds cost for every overlapping dynamic light; merge fills into baked data where possible.
- Forward vs deferred — deferred handles many lights efficiently on PC; mobile often stays forward+ clustered; pick pipeline before lighting design diverges.
- Profile GPU markers — shadow passes, SSAO, and volumetrics often beat draw calls as the bottleneck in interior scenes.
- Quality presets — ship scalable toggles: shadow distance, volumetric quality, RT GI off/on. Test on min-spec hardware weekly.
Production workflow: from greybox to ship
- Greybox with default sun — validate traversal and sightlines before hero lighting.
- Gameplay pass — emissive pickups, enemy rim colors, hazard zones readable in worst-case darkness.
- Art pass — baked GI for static sets, probe placement, reflection captures, volumetric mood.
- Optimization pass — strip redundant dynamic lights, merge materials, reduce shadow casters.
- Playtest in brightness extremes — OLED living rooms vs dim handheld modes; verify accessibility toggles.
Document lighting constants (sun angles per chapter, probe grid spacing) so multiple artists do not fight each other across parallel level streams.
Key takeaways
- Lighting guides players — mood, navigation, and combat clarity are gameplay systems, not polish layers.
- Mix baked and dynamic — most shipped games bake indirect static GI and spend real-time budget on the sun, hero props, and events.
- Shadows are expensive — cascaded maps for the sun, selective shadows for everything else.
- PBR needs probes and sane albedo — metals and roughness define how lights read; bad inputs cannot be fixed by cranking intensity.
- Profile early on target hardware — volumetrics and shadow resolution decide whether your scene ships at 30 or 60 FPS.
Related reading
- Game shaders explained — how fragment shaders implement BRDF lighting models
- Game level design explained — sightlines, pacing, and environmental storytelling that lighting reinforces
- Game particle systems explained — sparks, smoke, and VFX that interact with scene lights
- Game camera systems explained — framing and exposure that change how lighting reads on screen