Implementing Dynamic Windscreen Frost Effect In Godot
In Semaphore, you are both the driver and conductor of a night train.
Semaphore is a PS1-inspired horror train simulator where you play as both the driver and conductor of a night train in the People's Republic of Ordovia. Drive through the night, meet passengers, check their papers, and look after them. Sounds simple enough, right? But strange things start happening after dark, and it's up to you to figure out what's going on.
Since the cab in Semaphore is where players spend a lot of time, developer LatroWorks wanted it to feel as nice and immersive as possible. To reflect the game's snowy weather, they added a frost effect that gradually covers the windscreen, requiring players to reach up and manually wipe away a patch to see clearly.
"The frost shader combines two scales of noise on a chunky 88×64 grid. That gives me a thick, uneven crust around the edges and a thinner haze in the middle. The thicker the frost, the blurrier the view through it. That blur comes from sampling a lower mip level of the screen texture.
When you drag the mouse, GDScript paints into a separate 128×100 texture. Each texel stores when it was last wiped. The brush leaves slightly older timestamps around the rim of each stroke, so the center clears completely, and the edges stay a little cloudy.
The shader compares those timestamps with the in-game clock. The crust and crystal clusters show up first, and the clearer areas fill in later. The cab heater gives you more time before you have to do it again.
My favorite bit is the little scrape as you wipe just enough glass to bring the rails and the red signal into focus."
If you love these snowy night-train vibes, you can even turn the cab into a screensaver: the developer has made a Wallpaper Engine version. You can stop the train completely or speed it up, and the wheel clatter changes pace with it. There are also plenty of settings to adjust snowfall, window frost, cab lighting, wipers, and camera shake. The clock can sync with your PC's time, too.
Semaphore
Semaphore
Semaphore
Wishlist Semaphore here.
Godot developers interested in retro-style graphics should check out Calin P's breakdown of how PS1 graphics work and get a free shader you can use in your own projects. You might also like this free Zelda-style ground fog and procedural tree generator.
We also recommend reading about how this Godot game's spherical world was made, as well as how this game switches between 2D pixel art and 3D visuals.
Don't forget to subscribe to our Newsletter, join our 80 Level Talent platform, Discord, and follow us on Twitter, LinkedIn, Telegram, and Instagram, where we share breakdowns, the latest news, awesome artworks, and more.
Are you a fan of what we do here at 80 Level? Then make sure to set us as a Preferred Source on Google to see more of our content in your feed.
Subscribe to 80 Level Newsletters
Latest news, hand-picked articles, and updates