Couchslop / OutrouteRendering development story
Outroute · Lighting and shadows

Where the
light lands

The first lamps hung off the sides of the track. By the time they moved into the pavement, the shadow had become part of the road shader. Then bloom gave each passing car a flash of its own.

Play Outroute on SnackPack.dev →
Outroute gameplay on a floating road among glowing towers in Neon Freeport
Neon Freeport in play. The closer comparisons below use a fixed test scene so the road and lamp changes are easier to see.
01 / Fixture height

From the roadside into the deck

The first paired fixtures hung on bent arms about as high as the car. They projected a tapered silhouette away from each lamp. Dropping the lamps from roof height down toward the deck made the cast broader and longer; the revised calculation used the raised cabin and sloping nose to shape it, and let it fade as the car rose. Inset lenses changed the problem: a tiny fixture at the road surface could suggest a low cast without projecting the whole car literally from that height.

Raised roadside lamp arms and tapered car shadows on an early version of the deck
Raised side lampsRoof-height housings and narrower tapered shadows.
Lower roadside lamp housings and a wider silhouette under the same car
Lower roadside lampsThe paired fixtures moved down and aligned; the cast widened.
Inset deck lenses and widening trapezoidal shadows without tall lamp arms
Deck-level lensesThe poles disappear. A widening cast now starts at the car’s footprint.
02 / The ground shader

Make the asphalt answer back

The game doesn’t render a fresh shadow map for every little lamp. It picks nearby stations along the route and evaluates their casts right on the road. The shadow stays clearer near the vehicle and fades farther out. The lenses also add a separate soft spill: it falls with distance and grazing angle and is easier to see in already shaded pavement than under bright world light.

Road-light spill and car shadow before applying the angle-aware shadow curve
Before angle-aware shadingLocal lamp spill and an existing cast, with the main light held low.
The revised dark asphalt and stronger shadow at the same low light angle
After the asphalt passSame setup, darker asphalt and a stronger grazing-angle shadow.
Watch the shadow cross the roadBoth clips use the same moving car and 15° main light. The revised shader makes the cast read more clearly at that low angle. Open video full size
Drop the key light from 75° to 15°The car and fixture heights stay put. Only the main light lowers, making the revised asphalt response easier to see. Open video full size
Shader shadow multiplier falls smoothly from 150 percent at 15 degrees to 100 at 30, 80 at 60, 50 at 75 and 33 at 90.

Low light, stronger shade

The shader compares the main light with the local road surface, so a bank or loop can change the result even when the light stays put. The curve is a multiplier on the existing shadow, not a measure of final pixel darkness.

See the revised shader at 75°.

03 / Glow in the camera

Light on the road is not bloom

Spill lights the asphalt. Bloom is the soft glow around something bright in the rendered view. The bloom pass takes visible emitters, lets cars and road geometry occlude them, then blurs that bright image back over the scene. High bloom uses several blur scales; Neon Freeport adds glowing signs and buildings, which have a separate scenery bloom switch.

High bloom with normal, unboosted track lamp at a fixed car pose
Ordinary bloomGlobal bloom is on, with both passing boosts neutral.
Larger, brighter halo at the lamp beside the car, with the same car and camera pose
At peak passSame frame setup and global bloom. Only the passing-light settings change.
Same pass, with and without the flashFollow the lamp pair as the car goes by. Ordinary bloom is on in both views; the passing boost is enabled only on the right. Open video full size
04 / Hover-pad lighting

The car brings its own light

The cyan rings mark the four lift pads, not tires. Bloom softens their bright edges in the camera. The early pad effect was a tight fill under the car. The upgrade paints a pale-blue light on the asphalt under each pad, with a faint tail that leaves the larger shadow visible. The brightest area follows the pad’s actual footprint, then falls away softly at the edge. Clearance broadens and weakens the patch until it fades out.

A road-level view of the car’s cyan hover pads without their camera glow or asphalt spill
Emissive pads onlyThe cyan rings are visible, without a halo or light on the road.
Cyan hover-pad bloom softens the rings against the chassis
Add camera bloomA halo blooms around the rings, without illuminating the pavement.
Cyan hover-pad bloom and soft blue pools cast onto the pavement below
Add light on the deckSoft blue pools follow the car under each pad. Here the spill is at its 200% default.
The pads in motionThe left stays emissive only. The right combines camera bloom with soft cyan light on the pavement. Both use the same car, camera and road lamps. Open video full size
05 / The passing flash

More than just brighter

The first pass experiment treated glow as a brightness ramp. The final version lets brightness and halo size move independently. Intensity feeds more energy from the lens into the existing bloom pass; size expands the lamp’s existing soft halo in the color pass, without enlarging the socket, widening city bloom, or adding another full-screen pass.

What each lamp knows

Each pair of deck lamps shares a station along the road. The game measures how far each active car is from that station along the track, not how close it is on screen. Only stations within the car’s reach are visited. If two cars light up the same pair, the stronger contribution wins. That keeps a pack of cars from stacking the flash into a blowout. The results are stored in a small texture, one value per station, reused across camera views and uploaded only when the values change.

Why the peak is so short

At normal ride height the flash starts two stations away. The outer shoulder eases in with a squared ramp. One station out it has reached a quarter of the extra gain; from there a smoothly joined curve keeps most of the rise right at the crossing. The same curve runs in reverse as the car leaves. Height is measured perpendicular to the local deck, so a banked road still behaves like a road. Four scene units above normal ride height, the reach grows to three stations but the peak is halved. At eight extra units the boost is gone. A separate visual lookup eases in the glow near the deck rim before touchdown, without changing shadows or physical contact.

What the two sliders actually change

Intensity scales the lamp’s contribution to the existing depth-tested bloom pass. It can feed a stronger highlight into the blur, but the final pixels don’t brighten in the same proportion. Size instead expands the soft halo drawn around the lens in the main view. It doesn’t resize the fixture, change the blur on city signs, or add a second bloom pass. Both use that same per-station gain, so the halo swells and the highlight flares together as the car crosses.

The same lamp with boosted intensity but neutral halo size
Intensity only1500% source intensity, 100% halo size.
The same lamp with neutral intensity and a larger soft halo
Size only100% source intensity, 3000% halo size.
The flash changes when the car liftsThe scripted jump follows the same path along the track. Its extra glow starts farther out but never hits the same peak as the car on the deck. Open video full size
The ground ramp peaks sharply at the lamp and ends two stations away; the elevated ramp peaks lower and reaches three stations away.

A short peak, not a wall of light

Compare the narrow ground-level crest with the longer, weaker airborne approach. Both are centered on the lamp.

Normal ride height4 units above normal ride height

The graph shows the fraction of the full extra boost, not screen brightness. The shipped Graphics defaults are 1500% intensity and 3000% size; each can be set to 100% to remove that part of the effect. Both work in Standard and High bloom with Dynamic Lighting and Deck Lights on.