Skip to content
OnySnow Studios

Light &shadow.

The lamp on this site lights what is really in front of it, the glass bends and glows from its own edges, and every shadow comes from one model. This part is how that was built, the questions I kept asking, and the times I was told the result was wrong and why.

A lamp I move by hand over a photograph. The print throws back a hard white spot at the lamp's mirror point, light pools round the lamp, the room dims while it is held, and the glass edge glows. None of it is a video or a texture: it is computed from where the lamp is. Recorded from the live site.
My role
Creative and technical direction: the look, the questions, every approval
When
25 September to 11 October 2026
Checked against
Reference photographs of glass, prints and cracks; physics papers; a light catalogue
Built with
WebGL shaders, TypeScript, React; built with Claude Code

The lamp.

I started with one question: what would make a website feel like a room? Not a background image, a room, with a light you hold. When you stop moving the pointer, the lamp comes on. It has a size, so its shadows soften with distance; it fades with distance squared, and it lights a surface less the more sideways it falls. Those aren't effects I added. They are what light does, and once the lamp obeyed them, everything else that used light inherited them for free.

The first versions were wrong in ways I could see and the maths couldn't. Two notes from 29 September: “the bloom is a little strong”, and “you should never be able to see the top and bottom at the same time”. Neither is an equation. Each describes a picture, and the job of the technical side is to turn a picture into a rule it can obey. “Never see both edges” became a rule about which faces of a pane are visible from where you stand.

How the creative side served the technical side

The rule “you should never see the top and bottom at the same time” is art direction in one sentence, and it was the exact thing the geometry had got wrong. The creative instinct finds the bug; the engineering fixes it for every case, not just the one I saw.

eyeA pane, seen from the side
Pane below your eye: its top face shows4.6 px

Drag to move the pane. width on screen = offset × thickness / (distance + thickness), for an 18 px pane seen from 1,536 px, 160 px tall in this sketch. The sketch is drawn far thicker than life.

  • Point and area lamps; the lamp's size gives soft shadows
  • Inverse-square falloff and the cosine law, so light weakens with distance and angle
  • Colour from temperature: a lamp has a real colour, not a picked oneIn preview
  • A flashlight with a hotspot and a spill edge, which you can plant and aimIn preview

Glass.

The pointer sweeping left to right across the photography page's hero with Viewpoint follows pointer raised to 1 (its default is 0): the photograph slides under the glass as the eye moves. Recorded from the live site.

Frosted glass only reads as glass if it has an edge with thickness and something to bend and blur behind it. So every pane is a material: float glass is faintly green (an early version had rainbow sides; the real thing is green), its sides are seen from the front by a few pixels of perspective, and its bevel throws a sharp band of light rather than a line.

The decision I'm proudest of is dull: the bend, the light and the shadow at the edge line up because they come from one edge. A drop of drift between them would look like a filter. On 27 September I rebuilt the pane edges from reference photographs instead of from taste, and on 25 September I had already calibrated the liquid glass against a real interface element. A note from 1 October (“that purple glow on the edges”) went on the same list: a colour the real edge doesn't have.

Snell's law and Fresnel
Refraction by Snell's law; Fresnel reflection.
Microfacets
Frosted glass from its microfacets, so frost scatters the way frost does.
Total internal reflection
In the edge, so light travels along the glass.
Overlapping panes
Each filters the light itself, at its own height.
In preview
Exact polarisation, and Newton's rings where two panes rest on each other.

One shadowmodel.

The turning point of this half was a refactor, not an effect.

  • Before 28 September, each cast shadows its own way
  • Cards
  • Type
  • Buttons
  • The lamp
One shadow model28 and 29 September
  • What it gives
  • Type, letter by letter
  • Cards: a tight shadow and a soft one
  • Shadows through glass, tinted and softened
  • The rain, a week later, with no lighting of its own

That is what lets the rest work. Type throws its own shadow letter by letter, through the glass and on it, and a letter's shadow never lands over its neighbour. Cards throw two shadows, a tight one and a soft one, and never across a neighbouring photograph. A shadow through glass is tinted and softened by what it passed through. Because it is one model, changing a rule changes every shadow on the site together, which is the only way to keep a hundred shadows consistent.

The architecture decision

On 28 September, in five steps, every light value was made to come from the lights themselves: the glass and floor passes loop over the lights, the camera became its own module, and the shadow model was shared. The rule since then: effects share causes, they don't each carry their own look. It's why the rain, added a week later, needed no lighting of its own.

One lamp, one shadow model. Here it lights the rain: every drop and stream is lit and shadowed by the same light that lights the glass. Recorded from the live effect.

Prints that catch the light

A photographer's site should treat photographs like prints. On 11 October the gallery frames became lit surfaces: each print has the paper's gloss, a hard white spot where the lamp mirrors off it, a thin halo, a wide sheen, and a faint curve because real prints bend a degree or two.

I rebuilt the gloss from 50 reference photographs of prints, which is also where the references showed that the spot isn't round: it's a tapering bar along the bend.

The same light that glints off a print is the light that lit the glass and the rain. That's the point of one engine.

The habit. When I can't say what's wrong, I collect fifty real examples and look for what they share that mine doesn't. It turns taste into a list.

Black light, neon,flares, lasers.

“The blacklight effect is terrible. Did you even look up references to what blacklights do and what things look like under black light, and what colors and materials react the strongest?”

My note on the first black-light pass, 1 October 2026

That's the question I ask most: what does the real thing look like, and what reacts? The first pass researched which materials fluoresce and never researched what a black-lit scene looks like. The page was still lit by the room, so under the black light almost nothing changed.

The redo started from the scene: a black light is used in a dark room; what doesn't fluoresce goes dark violet; whites glow blue-white because paper and fabric carry optical brighteners; prints glow in their whites. Then 365 nm and 395 nm lights behaving differently, because they do. It, the neon tube, the road flare, the laser through a prism and the glow paint all live in the same light system, so every one lights the glass and casts shadows with no special case.

  • Black light at 365 and 395 nm: different scenes, as in life
  • Neon as a real tube with electrodes and flicker modes
  • A road flare redone from what a fusee actually is
  • A laser fanned into a spectrum by a prism, with glass solids throwing caustics
  • Glow paint you draw with, charged by light
The laser cycles from red to white; a caption in the clip names each colour. Recorded from the live site with the laser in hand, 8 frames a second.
Green, 532 nm, 5 mW, a beam 1.2 px wide, with the aim sweeping so the beam bounces across the page's panes. Recorded from the live site with the laser in hand, 8 frames a second.

Breaking glass.

“Use real cracks as reference. It's not realistic enough.”

My note, 30 September 2026
The offline fracture simulation, four time steps cross-faded: damage spreads from the impact along radial cracks that reach the frame, struck face on the left, back face on the right. This is the simulation the site's cracks are checked against, not a live hammer strike.

The first cracks were smooth rings and a handful of straight lines. I'd said it wasn't realistic, but the useful part was the instruction: use real cracks. So the build went to fracture science. Concentric cracks aren't rings: they're straight segments that stop at the nearest radial crack, so the “ring” is staggered. Later cracks stop at earlier ones. Radials fork as they run, and a harder blow gives more of them.

Then I added my own data: 55 photographed pieces of broken glass, and two crack photographs for laminated glass. Breaks are simulated offline and only the ones whose statistics match real panes become the library the site plays back. On 1 October the pieces were being left tilted by a few degrees in the dent of the blow, and on 2 October I asked for more of the same: some shards protruding or sinking more than the rest, “nothing crazy, but it does happen”.

Built to last.

Style recalculations, 60 pointer-move frames

Before598
→
After124–184

Step 3: scene registry

Frame requests on a still page, 3 s

Before27 / 24
→
After0 / 0

Step 5: one scheduler (CSS / liquid glass)

WebGL contexts

Before4
→
After2 / 1

Step 6: one shared context (liquid / CSS)

Numbers from the project log for three of the steps: measuring once a frame, one scheduler and one shared WebGL context.

The least visible part is the one I'd show an engineer first. Between 27 and 30 September the effects went from separate tricks to a small engine: one WebGL context, one scheduler that asks for no frames when the page is still, a compositor that owns every pane layer, and registries for lights and scenes. Each step landed behind a preview switch and waited for me to look at it before it became the default.

The status of every behaviour is written down in a light catalogue (now, preview, planned, or “not visible at this scale” with the reason), so I always know what's real, what's waiting for my approval and what I deliberately left out.

The light catalogue, 30 September: 44 behaviours

  • 24Now
  • 15Preview
  • 3No
  • 1Camera
  • 1In the photographs themselves

The catalogue as it stood on 30 September, counted by the first word of each row's status.

Approved before it ships

A new effect runs behind a switch until I've seen it from several views and signed it off. It's slower, and it means the site I publish is the site I've looked at.

I'm open to creative technical project management, founding teams, and agentic AI engineering and research. I read everything that comes in, and I answer.

onysnowstudios@gmail.comLinkedIn →

Resume