Area lights in shaders — Zsolt Ero (hyperknot) The five .glsl.txt files contain the complete recovered fragment-demo code, including its original mathematical functions, animation and display transforms. Only whitespace has been normalized; the shader logic is unchanged. They are also the exact source files fetched by the interactive widgets. The renderer uses locally bundled Three.js, WebGLRenderer and ShaderMaterial, a 2 x 2 fullscreen plane, and an orthographic camera. It supplies: uniform vec3 iResolution; // physical drawing-buffer width, height, 1 uniform float iTime; // simulation time in seconds Its vertex shader is: void main() { gl_Position = vec4(position, 1.0); } It appends this fragment entry point to the reference source: void main() { mainImage(gl_FragColor, gl_FragCoord.xy); gl_FragColor.a = 1.0; } The explicit alpha makes the display opaque: the original vec4(v) output's alpha is not used for compositing these demos. The RGB computation is unchanged. Three.js supplies built-in declarations and highp precision. No textures, channels, mouse input, additional passes or built-in lights are required. The shaders already encode display colors: inverse-square uses gamma 2.2; the other four use their own piecewise linear-to-sRGB function. The renderer uses SRGBColorSpace and NoToneMapping and adds no color-conversion shader chunk. Initial times: inverse-square 0 (static), point-light 1, tiny-disc 0.5, rod-light 6, rectangle-area-light 6 seconds. All demos start paused. Time only advances during explicit playback while visible in the active tab. Reset pauses and restores the initial time. No pointer-dependent behavior is omitted. Resolution follows the square display size, with device pixel ratio capped at 2 and each drawing-buffer dimension capped at 1024. Dimensions are rounded to an even number so no pixel lands exactly on the analytical center singularity. The 512 x 512 PNG posters were captured from these shaders at the initial times. They remain available without JavaScript, on unsupported browsers and after a graphics context loss. The complete code can be expanded beside each widget or read at its plain-text link. Unmodified archival inputs and provenance are retained separately from this published article. Current remote execution was not available for an independent live comparison; these demos reproduce recovered historical code.