Skip to content

Design study 09 · Desert dusk shader

A living hero background that weighs less than a photo.

A full-screen sky drawn entirely on the graphics card: aurora ribbons drift, stars twinkle, and a setting sun follows the pointer (or drifts on its own) over three layers of dunes. It is a few kilobytes of code instead of a video file — and it is the background behind the hero on our own motion page.

Concept build · not client work

Written for this site to demonstrate the technique. On your project it would be designed around your brand, content, and performance budget.

Live demo: Desert dusk shader

WebGL is unavailable here — showing the still version.

Try it: Move your pointer across the stage — the sun and the dune light follow it. Live demo — running in your browser
Built with
WebGL · GLSL shader · Pointer uniforms
Libraries
None — plain browser code
Starts
When it nears the screen
Reduced motion
Still frame + Play button
Script weight
Measured when the demo loads

The case study

What it solves, and how it stays fast.

01

The problem it’s built for

Premium hero sections usually lean on a large photo or an autoplaying video. Both are heavy, both look the same on every visit, and video in particular costs real load time on a phone. The goal here was a hero backdrop that feels alive and on-brand, reacts to the visitor, and costs less to load than the photo it replaces.

02

How it’s built

  • One fragment shader paints the whole scene: a single full-screen triangle, with time and pointer position passed in as uniforms each frame.
  • Aurora curtains, twinkling stars, the sun, and three parallax dune layers are all computed per pixel — there are no image files at all.
  • The pointer is eased before it reaches the shader, so the light glides instead of snapping — and with no pointer, the sun drifts on its own.
  • Written in raw WebGL 1 for the widest device support — no Three.js or other graphics library.
03

Performance choices

  • Rendering resolution is capped (about 1.1 million pixels, device pixel ratio at most 2), so a large 4K screen never multiplies the work.
  • If frames start running slow, it steps its own quality down automatically.
  • It only starts when it nears the screen, and stops when it is scrolled away or the tab is hidden.
  • A lost graphics context is handled, so a crashed GPU driver never leaves a broken canvas.
04

Accessibility & fallbacks

  • The canvas is labelled as an image with a plain-language description for screen readers.
  • Visitors who ask their device to reduce motion get one still frame and a Play button.
  • Where WebGL is unavailable, a CSS-painted dusk poster shows instead — never a blank box.
  • Headlines on top of it stay real text, with a scrim behind them for contrast.

Where it fits

Where a design like this earns its place.

Hero moments and brand backdrops that weigh less than a photo.

Hero sections

A memorable first screen behind a clear offer — without a 5 MB video.

Landscaping, outdoor & hospitality

Atmosphere-led brands where mood sells before the menu or price list.

Launch & campaign pages

A backdrop that makes a new offer feel like an event.

Scoped like everything else: available on its own or added to any website package, flat-quoted in your launch plan with a written performance budget — what it does, what it may weigh, and how it behaves on phones and with reduced motion.

Want a moment like this on your site?

Tell us where it should go. You get a written scope, a performance budget, and one flat quote — before anything is built.

Prefer to start with a quick message? Use the message button in the corner — a real person replies, typically within one business day.

Use the up and down arrow keys to move through results, Enter to open one, Escape to close.