Skip to content
All effects

Light rays

Soft shafts of light that fall into a section and slowly breathe.

Backgrounds

This is the real effect. Scroll or move your mouse inside the frame to try it.

The prompt

Add a light rays background to [the section I point to] (soft volumetric light shafts falling into a dark section, also called god rays). Visual: a light source just above the top edge of the section, a bit off centre. From it, soft rays fan downwards, each with its own width and brightness, feathered edges and a long falloff toward the bottom. Only use colours from my palette, fading into the section background. Add faint dust particles that drift slowly inside the brightest rays. Behaviour: the rays never jump around. Only their brightness breathes slowly, each ray on its own rhythm. The mouse bends the ray field a little, like a lens: shift the light source a few percent toward the pointer, eased. Tech: one fragment shader in plain WebGL on a canvas behind the content (angle from the source, a sum of soft bands per ray, multiplied by a radial falloff). Cap the device pixel ratio at 1.5 and the frame rate at 30fps, and pause off screen. Keep the text on top high in contrast. Fallback: a static radial gradient without WebGL, and one still frame with prefers-reduced-motion. Style: build it in the existing design system of this website. Reuse its colours, fonts, spacing, corner radius and existing classes or components, and don't add new colours or fonts. Use real content from this website for any text or images in the effect (its headings, services and copy), never placeholder text. If the project has no design system yet, ask me for the brand colours and fonts before you start.

What it is

Light falling into a section in soft shafts, like sun through a window in a dusty room. The rays do not move around. They just breathe a little.

When it works

Trust sections, testimonials, a big quote, anything that should feel warm and calm. On a solar panel or outdoor brand site it fits the subject perfectly. Light, warmth, the sun.

Get it right

  • Subtle wins. If people notice the effect before the text, it is too strong.
  • Let only the brightness breathe, never the position.
  • Pick a light colour from the brand, not default white.

Also called

  • God rays
  • Volumetric light
  • Light shafts
  • Sun rays background

More effects.

All effects