:INFO [align:center] The Shader Chip A fragment shader, compiled and running in the browser, sitting inside a page that is otherwise plain text in a Git repository. This is the chip that most often gets the question: wait, that runs? :SHADER :NOTE That is not a video or a GIF. It is a live WebGL context, compiled from the source shown beneath it, running at your screen refresh rate. :INFO What It Does The chip takes raw GLSL fragment source and renders it on a canvas. Source visibility is a toggle, so a page can either show the code alongside the output or present the output on its own. :INFO How the Source Is Wrapped You write a mainImage function. The runtime supplies the boilerplate around it: a precision header, the uniforms, and a main function that calls yours and assigns the result. Four uniforms are injected and must not be redeclared: iResolution, iTime, iMouse and iChannel0. :CODE [language:cpp] void mainImage(out vec4 fragColor, in vec2 fragCoord) { vec2 uv = fragCoord / iResolution.xy; vec3 col = 0.5 + 0.5 * cos(iTime + uv.xyx + vec3(0.0, 2.0, 4.0)); fragColor = vec4(col, 1.0); } :INFO The Guard Rail Before compiling, the runtime checks the source for a mainImage or a main function. Without one it refuses and says so plainly rather than handing back a blank canvas. A silent black rectangle is the worst possible failure for a visual chip, because it is indistinguishable from a shader that renders black. :INFO Why There Are No Presets There is no preset list and no effect dropdown anywhere in the chip or its builder. You paste raw GLSL and that is the whole input. It is a harder first five minutes than picking from a menu, and it is honest: what you write is what compiles. A preset list would also age badly, and it would teach nothing about what the chip actually is. :STATS :INFO The Texture Channel That Is Not Wired Up The payload carries an imageUrl for iChannel0, so a shader could sample a texture. No authoring path sets it yet. The uniform is declared and available, the plumbing to fill it is not built. Documented here rather than quietly omitted, because a half-connected feature is still a fact about the system. :QUOTE [quotetype:plain] The chip that proves a page is not a document. :LINK https://slatesource.com/chips Every chip type, side by side