How Semaphore’s Godot shader brings frost back to a freshly wiped windscreen

In Semaphore, players drag the mouse across a frosted windscreen to bring the rails and signals back into focus. The cleared patch gradually frosts over again. LatroWorks, the developer of the PS1-inspired horror game about driving and conducting a night train, uses two textures for the effect: one supplies the view through the glass, and the other records when each part of the glass was last wiped.

According to LatroWorks, the Godot shader combines two scales of noise on an 88×64 grid to form a thick, uneven crust around the edges of the windscreen and a thinner haze in the middle. Where the frost is thicker, the shader samples a lower-resolution mip level of the screen texture, making the track outside look blurrier.

As the player drags the mouse, GDScript writes timestamps into a separate 128×100 texture. Each texel records the last wipe time for its patch of glass. The brush assigns slightly older timestamps around the rim of each stroke, so the center clears completely while the edges stay cloudy.

The shader compares those timestamps with the in-game clock to determine how the frost returns. Crust and clusters of crystals reappear first; the clearer patches fill in later. Running the cab heater gives the player more time before the next wipe.

LatroWorks also made a Wallpaper Engine version of the cab. Users can stop the train or speed it up, with the wheel clatter changing pace to match. Controls cover snowfall, window frost, cab lighting, wipers and camera shake, and the cab clock can sync with the PC’s time.