All examples · Shaders · As Markdown, for AIs

Gas station looks

What this example shows

The material looks on a model made in a modelling tool: a gas station at dusk, its forecourt and the road beside it painted in code, and the nightcrawler walking round the pumps and out along the road. The station keeps the pictures its file gave it; only its shader changes with the look, through compileShader({ lighting, steps }).

toonLighting() cuts the light of the scene into bands and keeps its colour: the warm lamps under the canopy give warm bands, the street lamp a cold one, and the low sun the shadows the dots fill. The lamps have ambient: 0, or their colours would wash the whole forecourt.

Over any look, R lays the old machine (mosaic, bloom, paletteMatch with a dither, crt) and A draws the frame in letters with ascii().

Click the preview first so it hears the keyboard. 1 to 5 change the look, R the old machine, P its palette and A the letters.

Starting
Starting
—