IMG · Images tools

Light Rays Effect

Shareable link

Settings are written to the URL as you change them. Nothing differs from the defaults yet.

Add sunbeams to a photo without painting them. The effect finds the regions brighter than a threshold, smears them away from a light position along radial lines, fades the light as it travels and screens the result over the picture. Real sources in the frame, a window, the sky through trees, a street lamp, are what cast the rays.

Light position

Light X and Light Y place the source as a share of the width and height. Rays travel away from it, so a source above the frame sends beams down into the picture and one at the centre sends them out in every direction. Put it where the real light is and the rays line up with the shadows already there.

Threshold

Only pixels brighter than the threshold cast light. 175 picks out sky and lamps and leaves bright walls alone; 120 includes most highlights and makes a hazy, flooded look. The transition is soft, so a single value does not cut a hard line through a gradient.

Length and fade

Ray length is how far the smear travels as a share of the distance to the source. Fade sets how quickly the light dims along the way: high fade gives short bright shafts near the source, low fade carries them across the whole frame. Intensity scales the finished light before it is blended.

Colour

The ray colour tints the beams. The default is a warm late-afternoon tone; pure white reads as daylight through dust, a pale blue as light through mist. Because the blend is a screen, the colour only reaches the areas the rays cover.

How it is computed

The smear runs at half resolution in two passes of 16 samples each, which is equivalent to a 256-sample radial blur at a fraction of the cost. On video the same step runs on every frame, so a sunbeam through a window keeps moving with the camera.

Frequently Asked Questions

Pixels brighter than the threshold are smeared away from the light's position along straight lines, fading as they go, and the result is screened over the photo. Bright windows, sky and lamps become the sources of the rays.

On or just outside the brightest area, which is what a real light source would be. Rays spread away from that point, so a light placed at the top of the frame sends beams downward.

Nothing in the picture is brighter than the threshold. Lower it until the brightest region is included; too low and the whole photo glows instead.

Only where rays land. The blend is a screen, which lightens toward the ray colour without clipping to flat white, so a warm colour adds warmth only inside the beams.

Explore Our Tools

Browse all tools