DOM-anchored viewports

The shader to the right is a ScrollScene tracking this section's right column. u_resolution updates every frame to the element's exact physical pixel size. Each webGL program on this page shares a single webGL context via wtc-gl scrollRenderer

Element-relative fragment math

The rings are centred on this element's midpoint. The shader reads u_origin.xy (element bottom-left in GL pixel space) and u_resolution to find the centre, so the rings stay locked here regardless of scroll position.

One RAF

All three shaders here are driven by a single requestAnimationFrame. Scenes outside the viewport are skipped automatically via IntersectionObserver.