The Shadow Is a Lie (A Very Good One)
You're running through a forest. Shadows from the trees stretch across the ground ahead of you, shifting as you move, and for a second your brain files it under real. Light threading through branches. Physical. Almost photographic.
Not one photon was simulated.
The engine didn't model the sun. What it did is closer to a stage illusion than physics, and once you understand the trick, you'll catch it running silently behind every game you've ever played.
The Depth Map Trick That Runs Everything
The dominant technique in real-time rendering is called shadow mapping, and it works by asking a deceptively simple question: can this pixel see the light source, or is something in the way?
Before drawing a single frame you see, the engine renders the entire scene a second time from the light's point of view. Not to display it. Just to record distance. Every pixel in that hidden render stores one number: how far the nearest surface sits from the light. That grid of distances is the shadow map, a depth texture typically 1024x1024 or 2048x2048 pixels, invisible, disposable, rebuilt every frame.
Then the engine draws the actual frame from the camera's perspective. For every visible surface point, it asks: project this point into the light's coordinate system, look up the corresponding depth in the shadow map, and compare. Is the stored depth shallower than this point's distance from the light? If yes, something else is closer. This point is behind it. Shadow applied.
Two numbers. That's it.
Here's the scenario spelled out. A lamppost stands in a city scene. The engine renders from the lamp's perspective and records that a brick wall is 8 meters away. Then it renders your view. Your character stands 11 meters from that lamp, behind the wall. The shadow map says 8 meters to the nearest surface, your character is at 11. Something is closer to the light. Your character goes dark.
All of that happens sixty times a second.
Why Shadows Look Weird (And What Engines Do About It)
Shadow mapping has a fundamental problem that every graphics programmer loses sleep over: resolution.
That 2048x2048 depth texture has to cover an enormous area of the game world. Each texel in the map represents a chunk of real space, sometimes several centimeters across. When you project geometry into that grid, edges don't land cleanly on pixel boundaries. The result is shadow acne, that staircase-stepping artifact crawling across surfaces, and Peter Panning, where objects appear to float because their shadows are slightly misaligned.
The fix most engines reach for is a cascade of shadow maps. Close to the camera, a high-resolution map covers a small area with fine detail. Further out, a lower-resolution map covers more ground. Unreal Engine uses four cascades by default; Unity's Universal Render Pipeline lets developers tune cascade distances manually. You've probably noticed the seam where cascades switch over, that slight change in shadow sharpness in the middle distance. Not a bug. The cost of running in real time.
Soft shadows add another layer of fakery. Real penumbras form because light sources have area, not a single point. Engines simulate this with Percentage Closer Filtering: instead of one depth comparison, they sample a small neighborhood of the shadow map and average the results. More samples, softer edge, higher cost. A typical soft shadow pass might sample 16 or 32 neighboring texels per pixel. The shadow looks like it was cast by a real bulb. It wasn't.
The Alternative Path (And What It Actually Costs)
Ray tracing does calculate where light actually falls. Hardware ray tracing fires rays from surfaces toward light sources and checks for intersections. The shadows it produces are physically accurate: correct penumbras, correct self-shadowing, correct contact shadows where objects touch the ground.
So why doesn't every game use it?
Cost. A single frame at 1080p contains over two million pixels, and firing even one ray per pixel toward a light source is a serious workload. Firing enough rays to produce a smooth, noise-free result still carries a significant performance penalty on current hardware. Most games that support ray-traced shadows use them selectively, for the player character or key environmental lights, while shadow maps handle everything else quietly in the background.
Here's the part the marketing doesn't say loudly: the gap between the two approaches is smaller than it looks. One player runs ray-traced shadows on a high-end GPU, getting physically accurate contact shadows under every object. Another runs cascaded shadow maps on a mid-range GPU from a few years back, getting approximations that look nearly identical from ten meters away. Shadow mapping, after decades of refinement, is extraordinarily good at looking like the real thing. The honest opinion is that for most players, at most distances, the difference is not worth the frame budget. Spend those milliseconds somewhere else.
What People Actually Misread
The common assumption is that more realistic shadows mean the engine is doing more physics. It mostly isn't. Even ray-traced shadows in games are denoised, temporally accumulated, and reconstructed from far fewer samples than a true path tracer would use. The output looks physically accurate. The process is still a pipeline of clever approximations, like a forgery so good the forger starts believing it themselves.
The other misconception: that shadow quality is just about resolution. It isn't. Shadow quality is the interplay between map resolution, cascade distances, filtering kernel size, and bias values that prevent acne. A game with 512x512 shadow maps and well-tuned cascades can look cleaner in motion than one with 4096x4096 maps and sloppy bias settings. The numbers matter less than the calibration. That distinction deserves more attention than it gets, because the industry keeps selling resolution as quality and they are not the same thing.
Want to see the scaffolding yourself? Find the shadow quality slider in any game you're playing, drop it two notches, and watch the cascade seams appear, the soft edges harden, the acne flicker back onto surfaces. That's not the engine failing. That's the engine showing you what it normally hides.
The remarkable thing isn't that game shadows have flaws. It's that a technique built on a comparison between two numbers, run sixty times a second, fools the human visual system as completely as it does. The light isn't real. The shadow absolutely looks like it is. That gap, between the computation and the perception, is where most of graphics engineering quietly lives.