G · Shaders & GPU programming
312 atoms · 17 modules primarily in this domain.
Modules
Advanced SDF geometry: curves, implicit forms, and material channels
Animated procedural patterns with sine, time, and smoothstep
Building a WebGPU render pipeline from scratch
Color grading and look development on the GPU
GLSL debugging and live recovery: gotchas, error reading, and the panic shader
GLSL fundamentals: coordinates, vectors, and color output
GPU compute and feedback-buffer simulations
Lighting and shading raymarched SDF surfaces
Optimizing raymarched and SDF scenes for performance
Orientation: the fragment shader as a per-pixel color function
Procedural character animation with animation-principle signals
Procedural noise, fBm, and fractal fields
Ray tracing and physically based rendering foundations
Raymarching a first SDF scene
Real-time ray budgets, denoising, and importance sampling
Sculpting SDF shapes: blends, symmetry, and domain repetition
Writing WGSL vertex and fragment shaders
Atoms by level
L0 · Orientation — 1
L1 · Foundations — 58
A blend mode is a per-pixel formula that determines how two image layers combine into a composite result
A color space's gamut is the subset of all human-visible colors it can reproduce
A color's 'quality' is its hue position in the color circle; its 'quantity' (brilliance) is its lightness or darkness
A GLSL double-buffer feedback pass with gain ≥ 1 saturates to white within a few frames
A GLSL fragment shader is a function that maps each pixel's (x,y) coordinate to an output RGB color, run in parallel for every pixel
A GLSL vector's components have interchangeable names: .xyzw, .rgba, .stpq, and [i]
A glslViewer feedback buffer only fills if its render code is wrapped in the matching `#ifdef`
A hard `step` edge aliases in GLSL — use `smoothstep` with a `fwidth` width for anti-aliasing
A Hydra patch is a left-to-right chain of dot-joined functions, modeled on modular-synth cabling
A set of colors is harmonious when their mixture yields a neutral gray
Additive (Linear Dodge) blend mode sums pixel values, producing glowing brightness that clips to white on overflow
Additive light mixing yields white; subtractive pigment mixing yields gray-black
cables.gl builds interactive WebGL scenes by connecting operator nodes with virtual cables in a browser-based patch editor
Color agent (the physical pigment) and color effect (the perceived result) almost never coincide — ground and context transform what we see
Color is relative: the same hue is almost never perceived as it physically is
Complementary colors incite each other to maximum vividness when adjacent and annihilate each other to gray when mixed
Contrast of hue uses undiluted colors in full intensity; yellow/red/blue is the maximum instance
Dividing gl_FragCoord by u_resolution maps pixel coordinates to the [0,1] UV range
Fine adjacent dots of pure color merge in the eye into a single optical mixture more vibrant than a pigment blend
GLSL `mediump` precision makes large `u_time` and fine gradients visibly step — use `highp`
GLSL does not implicitly convert `int` to `float` — mixing them in an expression is a compile error
GLSL ES requires a precision mediump float block at the top of every shader
GLSL integer division truncates: `1/2` is `0`, not `0.5`
GLSL operations with undefined results produce NaN/Inf that spread and turn pixels black
GLSL swizzling reads or writes a vector's components in any order in one expression
GLSL syntax must match the `#version` directive — mixing ES 1.00 and 3.00 syntax fails to compile
GLSL vector constructors are exact — you cannot assign a `vec2` to a `vec3`, and swizzles must exist
GLSL's mix() linearly interpolates between two colors by a 0.0–1.0 factor
glslViewer in this rig has no audio input — `a.fft` does not exist and reactivity must use `u_time`
glslViewer's `u_mouse` is in pixels, not 0..1 — normalize by `u_resolution` before use
GPU shaders run massively in parallel — individual invocations cannot communicate with or observe each other within a pass
GPUs work exclusively with triangles, lines, and points — all geometry must be decomposed into triangles before drawing
HSB describes color as hue, saturation, and brightness for intuitive, intentional variation
Hydra models analog video synthesis: each function is a box that generates or transforms a signal
Itten's 12-hue color circle places complementaries diametrically opposite and is constructed from pigmentary primaries, not spectral primaries
Light-dark contrast is the most plastic contrast — white and black are its poles with an infinite gray scale between
Mapping UV coordinates directly to RGB channels visualizes the coordinate space as a gradient
Multiply blend mode darkens by multiplying per-channel values, giving white transparency and black full darkening
Multiplying st.x by width/height corrects the UV space for non-square canvases
Neutral gray is achromatic and characterless but takes on a complementary tinge from any adjacent color
Normalizing pixel coordinates to [-1,1] makes shaders resolution-independent and centers the mathematical origin
Normalizing RGB to 0.0–1.0 decouples color description from bit-depth encoding
Objects have no intrinsic color — their apparent color is determined by what wavelengths the surface reflects under the incident light
On GL ES 1.00, `for` loop bounds must be compile-time constants, not uniforms
Rasterization and ray tracing are inverse nested loops: triangles→pixels versus pixels→triangles
Red-orange is the warmest color and blue-green the coldest, but intermediate hues shift warm or cold only relative to their neighbors
RGB numeric values have no meaning without a color space to interpret them
Saturation contrast — pure vs. diluted color — can be achieved by mixing with white, black, gray, or the complementary
Screen blend mode lightens by inverting, multiplying, and inverting again — giving black transparency and white full brightening
Shadertoy uniform names (`iTime`, `iResolution`, etc.) are undefined in glslViewer and must be replaced
sRGB is the default internet color space, matching Rec. 709 primaries with D65 white point
Staring at a hue fatigues its retinal receptors, producing the complementary color as an after-image
The 12 principles of animation provide a checklist of techniques that make procedural characters feel alive
The Book of Shaders defines three standard uniforms: u_resolution, u_mouse, and u_time
The eye simultaneously generates the complementary of any color it sees
The signal-flow model makes interconnection primary, unlike the canvas-drawing model of Processing
Unbounded `u_time` loses float precision over minutes, causing visible jitter in periodic motion
WebGPU has three shader stages: vertex computes positions, fragment computes colors, compute runs a function N times
L2 · First instrument — 168
3D geometry in p5.js needs a light source to convey shape and depth; ambient vs directional/point light differ
A bind group links GPU resources to shader binding points and must be created from a layout and set before each draw or dispatch call
A blurred copy of the image added back via screen or add blend is a cheap bloom/glow effect
A Bounding Volume Hierarchy cuts ray-intersection cost from linear to roughly logarithmic by skipping missed subtrees
A color space's primaries define which physical red, green, and blue it can produce
A color space's white point defines what full-intensity (1,1,1) looks like in the real world
A color's expressive weight shifts with its position in the composition field — low blue is heavy, high blue is light
A complete visual design can be built from one hue using only lighter and darker variations in HSB
A cosine/gradient palette defines a whole color ramp from a few coefficients and animates it by shifting phase over time
A GLSL shader program splits into a vertex shader run per-vertex and a fragment shader run per-pixel
A GLSL sine oscillator needs a bias and gain to map its -1/+1 range to 0-1 for color
A GPURenderPipeline bundles shader modules, vertex buffer layout, and render targets into a fixed, reusable draw configuration
A GPUVertexBufferLayout declares the byte stride and attribute format of each vertex, linking buffer data to shader @location slots
A light grain pass over the final composite is the most reliable 'make it look intentional' move — it unifies layers and hides banding
A near-monochrome ground with one saturated accent — letting contrast do the work, not hue variety — is the geometric palette recipe
A normalized parabola 4t(1−t) is a clean parametric signal for bounce, squash, and stretch animations
A path tracer is technically a type of ray tracer that accumulates indirect lighting via random sampling
A physically meaningful base albedo is around 0.18–0.2, not 1.0, for correct lighting response
A ray is modeled as the parametric function P(t) = A + t*b to enable intersection math
A reference-list SDF is dropped into a shader by adding an offset parameter subtracted from p
A render pipeline's fragment targets array must match the texture format of the color attachments used in the render pass
A signed distance function (SDF) returns positive distances outside a shape, negative inside, and zero at its boundary
A slow warp of a simple texture is the richest single source of visual complexity — it beats a complex static texture
A strong focal point is created by contrast, isolation, or convergence — not by competing elements
A tone response curve encodes intensity non-linearly to match human brightness perception
A uniform buffer holds per-draw-call constants visible to all shader invocations, unlike per-vertex attributes or writable storage buffers
A vignette darkens frame edges to concentrate attention inward and give a generative field coherence
A WebGPU canvas context must be configured with a device and the device's preferred texture format before drawing
A WebGPU draw call requires setPipeline, setVertexBuffer, and draw called in sequence on a render pass encoder
A WebGPU render loop re-records and re-submits a command buffer each frame; requestAnimationFrame or setInterval drives the cadence
A WebGPU render pass with loadOp 'clear' and a clearValue fills the attached texture with a solid RGBA color
A WebGPU uniform is a shader global held constant for every invocation of one draw call
A WGSL fragment function can reuse the vertex stage's output struct as its input type, ensuring @location consistency automatically
A WGSL fragment shader is an @fragment function that returns a vec4f RGBA color tagged @location(0) for the first color attachment
A WGSL vertex shader is an @vertex function that takes @location inputs from the vertex buffer and returns a @builtin(position) vec4f
A whole Hydra chain compiles to one GPU shader that computes every pixel in parallel
Adding a second sine octave at double frequency and half amplitude adds fine detail to procedural patterns
Aliased high-frequency sine waves produce pseudo-random variation suitable for per-instance seeding
An ellipsoid SDF is computed by scaling space to transform the ellipsoid into a unit sphere
Animating shaders with the sine function and iTime creates smooth, looping motion without discontinuities
Antialiasing in ray tracing averages multiple randomly-offset rays per pixel
CIE XYZ is the device-independent hub space used for all color space conversions
Classic fractal coloring maps iteration count or distance to a cycled multi-stop ramp with a dark base so bright filaments glow
Color arithmetic must be done in linear light, not in gamma-encoded values
Colored lights produce complementary-colored shadows, and multiple colored light sources create multiple hued shadows
Colors outside a color space's gamut require mathematically negative primary values
Compose the big value masses and empty areas first; detail cannot rescue a frame whose masses don't read
Continuous slow zooming is the signature motion of fractal visuals — iteration count and zoom depth are the main expressive controls
Contrast of extension balances color areas by their luminosity: yellow needs three times less area than violet to hold equal visual weight
Converting between linear RGB color spaces is a 3x3 matrix multiplication
Conway's Game of Life updates each cell based on neighbor count: fewer than 2 or more than 3 active neighbors → dies; exactly 3 → activates; 2 → unchanged
Darken Only and Lighten Only take the per-channel min and max of the two layers
Darker color variations have lower brightness and higher saturation — adding black alone is insufficient
Data passes from vertex to fragment shaders as inter-stage variables declared with @location attributes, automatically interpolated across triangles
Delaying a body's animation signal by a small time offset gives secondary parts inertial lag
Depth is implied by overlap, scale, parallax, atmospheric fade, and blur-soften on layers
Difference blend mode subtracts layers and takes the absolute value, making matching areas black and differing areas bright
Diffuse (Lambertian) brightness is the clamped dot product of the surface normal and the light direction
Diffuse path tracing recurses on random scatter directions until a depth limit terminates the chain
Displacement-map is static structural coordinate offset; modulation-warp is its animated cousin driving continuous motion
Displacing an SDF's input coordinate before evaluation deforms the shape by any function
Divide blend mode divides the base by the top layer, so a darker top brightens the base and any colour over black becomes white
Dodge modes lighten and burn modes darken as mirror images: dodging equals burning the negative
Domain-warping noise with noise — feeding noise into modulation-warp — produces turbulent, liquid, marbled texture and is the richest cheap texture
Domain-warping noise with noise is the core organic visual move — turbulent, liquid, marbled
Driving a shape's radius or count from audio is realizable now; making a shape appear on-the-kick is not
Each hue has characteristic psychological and symbolic expressive values that shift with context but retain a core identity
EEVEE and Cycles share the same shader-node material system, so a scene's materials preview and render across both engines unchanged
EEVEE uses rasterization to estimate lighting in real time, trading physical accuracy for interactive speed
Every visual animation is a parameter driven by a function of time — the character of motion is entirely in that function
Extended (unbounded) color range allows values outside 0–1 for HDR and wide-gamut workflows
fBm in shaders is built by summing noise octaves with exponentially decreasing amplitude and increasing frequency
FBM sums octaves at doubling frequency and halving amplitude — more octaves add finer natural detail across scales
Feedback gain near 1 causes runaway whiteout — leave headroom and decay each frame
Folding or repeating UV coordinates multiplies SDF shapes without extra draw calls
Fractal visuals have two build routes: domain repetition with raymarching for 3D lattices, or feedback zoom for a cheap 2D self-similar tunnel
Gamma correction must be applied from the start of shader development, not added at the end
Geometric motion should be restrained and mechanical-but-eased so the eye can follow every edge
Geometric visuals are built by combining one SDF shape with boolean operations, then imposing symmetry, then composing the frame
Geometric visuals are built on precision — outline-stroke shapes, high value-contrast, no noise, on a flat ground
Glitch motion is frantic and discontinuous — jumps, freezes, and strobe-flash accents rather than smooth transitions
Glitch palette is high-contrast and electric — black plus saturated green/magenta/cyan and white, with broken color from channel offset on-brand
Global illumination (indirect light) has no good rasterization solution and requires ray tracing
GLSL pow(x,y) returns undefined for negative x, causing silent visual bugs
GLSL requires a decimal point on all floating-point literals
GLSL uniforms pass values from the CPU to the GPU each frame
GLSL UV coordinates let shaders vary per-pixel, turning time oscillators into spatial patterns
GLSL's in/out/inout qualifiers set whether a function reads, writes, or modifies an argument
GPU fragment shader color output channels are clamped to [0,1]; values exceeding 1 saturate and produce incorrect gradients
GPU instancing draws multiple copies of the same geometry in one draw call, using @builtin(instance_index) to differentiate each copy
GPU-side data is stored in GPUBuffers created with size and usage flags, then populated via device.queue.writeBuffer
Hard Light and Overlay are commuted versions of the same formula: Hard Light treats the blend layer as Overlay treats the base layer
Harmonious dyads, triads, tetrads, and hexads can be constructed by inscribing geometric figures in the 12-hue color circle
Hue/Saturation/Color/Luminosity blend modes swap perceptual dimensions between layers rather than mixing channel values
Hydra blend operations are per-pixel arithmetic on R, G, B values, not layer compositing
Hydra's modulate() uses one texture's red/green channels as coordinate offsets to warp another
In p5.js WEBGL mode the coordinate origin is at the canvas center, not the top-left
In the glitch style, digital degradation is the material — corruption, pixel-sorting, and RGB split are the primary tools, not side effects to avoid
Interactive computer graphics still depends on rasterization hardware; ray tracing cannot yet replace it
IQ's first SDF-raymarched image, Slisesix (2008), won a 4KB demoscene procedural-graphics competition
Kandinsky's basic plane is an active field in which colors exert forces of advance and recession
Limiting to 2–4 hues with role assignments reads as intent rather than randomness
Line-segment and curve SDFs need a thickness offset subtracted to become visible
Mapping HSB to polar coordinates with atan and length renders a color wheel
Matching hues to equal brilliance levels is a trainable skill — cold colors are routinely rendered too light and warm colors too dark
Matching pure primaries individually is the procedure for deriving a color space conversion matrix
Multiplying vertex positions by 0 collapses geometry to a single point, which the GPU silently discards — an efficient way to hide inactive instances
Negative space is a deliberate compositional choice, not a deficiency — emptiness amplifies the subject
Noise-field is coherent — nearby points are similar yet non-repeating — making it the foundational texture primitive for organic imagery
Normalizing UV coordinates to clip space (−1 to 1, aspect-ratio-corrected) makes shaders independent of canvas resolution
One coherent noise source well-warped beats many uncorrelated textures fighting — texture should support form, not compete with the focal-point
One or two motions at a time — a still figure on a flowing ground reads far better than everything moving
Overlay blends Multiply and Screen conditionally on the base layer: darks get darker, lights get lighter, midtones are unaffected
Perlin-noise modulation produces smooth, continuously-varying CV that never repeats, unlike stepped random LFOs
Placing focal elements on the thirds lines or intersections reads as dynamic; centering reads as static
Polar warp reinterprets Cartesian coordinates as (radius, angle), turning stripes into rings and scrolling into rotation
Polar-warp plus radial-symmetry forms the mandala/kaleidoscope skeleton of a psychedelic visual
Primitive-based SDFs define scenes as mathematical formulae rather than volumetric grids, giving infinite precision and a tiny memory footprint
Pythagorean integer triplets provide exact normalized rotation matrices without trigonometry
Ray tracing renders by following the paths of light rays as they interact with scene objects and lights
Ray tracing's main advantage over rasterization is computing secondary effects: reflections, refractions, and shadows
Raymarching finds ray–surface intersections by stepping along the ray using the SDF value as the safe step distance
Replacing step with smoothstep at an SDF boundary adds anti-aliasing and glow effects
Reserve raymarched 3D for when depth adds meaning; a flat SDF composition is often stronger
Returning a material ID alongside the SDF distance lets the raymarcher know which object was hit for shading
RGB is a poor space for color reasoning because interpolation muddies through gray
SDF boolean subtraction uses max(distance, -cutter) to carve one shape out of another
SDF union, intersection, and subtraction combine primitive shapes into complex ones
SDFs and immediate-mode drawing are two distinct shape paradigms: field-based vs path-based
Shadertoy and Three.js trace their origins directly to demoscene real-time graphics practice
Shadow rays use the same raymarching loop from the shading point toward the light to determine occlusion
Size-restricted intros (64K and 4K) force procedural generation over raw data storage
Smoothstep with adjustable limits controls where a procedural pattern transitions from dark to light
smoothstep() creates smooth transitions between two thresholds, enabling anti-aliased edges in shaders
Soft Light is a gentler Overlay where pure black or white inputs do not produce pure black or white outputs
Squash-and-stretch animation preserves volume by inversely scaling perpendicular axes
Stacking colors darkest-on-top makes the eye read a transparent veil even though every layer is opaque
Symmetry (reflection, radial, tiling) turns a small motif into a full frame at minimal cost
Taking the absolute value of one coordinate in an SDF replicates geometry on both sides of a mirror plane
The CIE xy chromaticity diagram is perceptually non-uniform — equal distances do not mean equal color differences
The CIE xy chromaticity diagram projects 3D XYZ color into 2D by separating hue from brightness
The color sphere is a three-dimensional model mapping hue, brilliance, and saturation simultaneously, with white and black at the poles
The floor of the repeated domain gives a unique integer ID per tiled instance for per-cell variation
The GLSL length() function computes distance from the origin, enabling radial gradients and circular shapes
The minimum of multiple SDFs combines them into a single scene that ray marchers can query
The SDF gradient estimated by finite differences gives the surface normal needed for lighting
The SDF of a line segment is the distance from a point to the nearest point on the clamped segment
The smooth minimum (smin) blends two SDFs with a controllable rounded join instead of a sharp union
The sRGB TRC is piecewise: linear near black, then a power curve with exponent 2.4
The three primary colors correspond to the three fundamental shapes: yellow to triangle, red to square, blue to circle
The vertex shader transforms each vertex to clip space; the rasterizer then runs the fragment shader once per covered pixel
The y-component of the ray direction provides a natural UV for sky gradient and cloud placement
Three phase-offset cosine waves generate smooth procedural color palettes
Transforming clip-space vertices into grid cells requires scaling by 1/N, translating by -1, then adding a per-instance cell offset scaled by 2/N
Two near-frequency spatial oscillators beating against each other produce moire shimmer interference
Value contrast (light vs dark) is the strongest visual cue, outranking saturation and hue
Vertex data passed to WebGPU must live in a JavaScript TypedArray matching the expected GPU numeric format
Visual balance distributes visual weight so symmetric reads as stable and asymmetric as dynamic
Voronoi cell look varies between distance-to-nearest-point and distance-to-second-nearest — each gives a distinct aesthetic
Warm colors advance and cold colors recede, but this depth effect reverses depending on the background
Warm hues advance and feel active; cool hues recede and feel calm
WebGPU clip space maps the canvas to a fixed [-1, +1] range on both axes regardless of canvas pixel dimensions
WebGPU commands are recorded into a command buffer and submitted to a queue — the GPU does nothing until submit() is called
WebGPU draws or computes via a pipeline that chains shaders to GPU resources through bind groups
WebGPU initialization requires requesting an adapter then a device in two async steps
WGSL declares data with var (mutable storage), let (immutable value), and const (compile-time constant)
WGSL structs bundle multiple @location and @builtin annotated fields into a single typed input or output for shader functions
Wrapping the input coordinate into a periodic cell tiles one SDF into infinite copies at near-zero cost
L3 · Craft — 74
A camera-screen feedback loop is a physical system that iterates a differential equation
A cheap bounding primitive tested first can skip the full SDF evaluation for the majority of ray steps
A compute shader is an @compute WGSL function that runs without fixed vertex/fragment I/O, reading and writing only storage buffers or textures
A for loop that repeatedly scales, tiles (fract), and accumulates color creates multi-scale fractal detail in shaders
A p5.js filter shader reads the canvas via tex0 and vTexCoord to apply per-pixel post-processing
A quadratic Bezier SDF takes three control points and returns distance to the curve
Adding abs() to a displaced SDF allows the raymarcher to backtrack when it overshoots a surface
An SDF can be derived from any implicit curve equation by setting the LHS equal to d
Animated SDF characters recover rest-pose coordinates via an invertible animation so textures track the surface rather than swimming
Animating the smooth-minimum blend radius with the motion signal adapts blending to the character's pose
Applying a smooth-step S-curve to output color increases contrast and creates a filmic look
Applying pow() with a value slightly above 1.0 to the final color enhances contrast by darkening shadows without affecting highlights
Audio FFT data can be passed to shaders as a 4-band uniform for audio-reactive visuals
BRDFs model how a surface reflects light as a function of incoming and outgoing directions
cables.gl operators are programmable in JavaScript with typed ports, extending the patch beyond the built-in op library
Colorizing the shadow penumbra with warm tones rather than grey makes rendered images more cinematic
Combining fast grid traversal with local SDF raymarching accelerates scenes where objects occupy sparse grid cells
Compute work in WebGPU runs in a compute pass that is recorded before the render pass in the same command encoder
dispatchWorkgroups takes the number of workgroups, not invocations — total invocations equals workgroup count times workgroup size
Dividing a shader build into named checkpoint stages lets you resume from a stable state and avoid rabbit holes
Each hue has a perceived brightness (luminosity) that peaks at yellow/cyan/magenta and dips at red/green/blue
Exact SDFs give the true Euclidean distance; approximate SDFs are safe lower bounds but force smaller marching steps
Extending map() to return a vec4 provides auxiliary channels for UV coordinates, occlusion, and per-material signals
Fake subsurface scattering brightens silhouettes using the Fresnel term tinted by a flesh color
Fractional Brownian Motion adds correlated memory to white noise integration, controlled by the Hurst exponent H
GPU compute/ALU capacity growing faster than memory bandwidth made primitive-based SDFs increasingly competitive from 2007 onward
GPU ray tracing adds five programmable shader types to the graphics pipeline
Grouping scene elements rather than distributing them uniformly prevents visual noise and creates organic set design
In live cinema, software is used as a real-time instrument for expression, not as a tool to produce a finished product
Injecting fake bounce/subsurface lighting by hand into a raymarched scene fakes realistic results without global illumination
Linear Light combines Linear Dodge and Linear Burn and simplifies to base + 2·top − 1, decreasing contrast
Making the raymarching hit threshold proportional to distance implements view-dependent level-of-detail
Microfacet models represent rough surfaces as collections of tiny facets described by a normal distribution
Modern real-time rendering uses rasterization + ray tracing + denoising together, not pure ray tracing
Monte Carlo integration converges at O(n^-1/2) regardless of problem dimension, unlike quadrature methods
Monte Carlo integration estimates the rendering-equation integral by averaging random samples
Motion blur is achieved by rendering multiple frames at sub-frame time offsets and averaging the results
Named noise colors (pink, brown, yellow) map to specific fBm spectral slopes and Hurst exponents
Noise-based fBm fills the frequency spectrum with far fewer octaves than sine-wave additive synthesis
Offline rendering's trajectory from rasterization to pure ray tracing predicts interactive graphics' future
Outdoor SDF shaders use three light sources: sun key light, sky dome fill, and ground bounce
p5.Framebuffer is an off-screen GPU surface you can draw to and then reuse as a texture
Perlin noise is a repeatable pseudo-random function of 3D position used for procedural textures
Polynomial smooth-min functions preserve SDF shape outside the blend zone; exponential versions distort the whole field
Procedurally painted occlusion using model-aware distance signals fills gaps left by sampled AO
Radiance is constant along a ray through empty space, making it the natural quantity for ray tracing
Radiance is the fundamental radiometric quantity for rendering because it is constant along rays in empty space
Raising an animation curve to a power of itself creates a non-linear 'stay down longer' contact simulation
Raising per-surface occlusion to a power of the surface color simulates colorized secondary light bounces
Ray differentials estimate how much of a pixel's footprint overlaps SDF geometry to produce smooth antialiased edges
Raymarching surface normals are estimated by sampling the SDF gradient at nearby points
Real-time ray tracing is limited to ~1 ray per pixel; denoising reconstructs a clean image from noisy 1-sample results
SDF ambient occlusion samples the field at short offsets along the normal to detect nearby geometry
SDF soft shadows track how close the shadow ray comes to occluders, not just whether it hits them
Shadertoy fragment shaders run in three.js on a fullscreen quad by mapping iTime and iResolution uniforms into the render loop
Simultaneous contrast can be neutralized by adding the missing complementary explicitly, or by introducing light-dark contrast between the hues
Sky specular is computed by reflecting the view ray and checking if the reflection hits the sky
Spherical UV coordinates map latitude/longitude angles to texture image coordinates for sphere texturing
Starting with over-saturated colors and pulling back is more reliable than building up from grey
Storage buffers are large, compute-shader-writable GPU buffers declared var<storage> in WGSL, contrasting with size-limited read-only uniforms
The 1/x function creates neon glow effects in shaders by producing extreme brightness near zero and a slow falloff
The color occupying the larger area in a composition acts as background; the smaller area advances — and these roles can reverse as area proportions shift
The eye spontaneously groups scattered same-color areas into a visible shape — these 'simultaneous patterns' are independent organizational elements in composition
The four core radiometric quantities for rendering are energy, flux, irradiance, and radiance
The fract() function repeats space by tiling UV coordinates into a 0–1 grid, enabling fractal-like layering
The Hurst exponent directly encodes the fBm's statistical self-similarity: zooming in by U horizontally scales amplitude by U^(-H)
The Phong model sums ambient, diffuse, and specular components to shade 3D surfaces
The ping-pong pattern uses two alternating state buffers — one read-input, one write-output — to prevent in-place mutation corruption in GPU simulations
Three.js post-processing chains render passes through an EffectComposer that processes them in order of addition
Vivid Light combines Color Dodge and Color Burn around middle grey, increasing perceived contrast
WebGPU compute threads are grouped into workgroups and addressed by a global invocation id
WGSL storage buffers are read-only by default with var<storage>; read-write access requires var<storage, read_write> and is only available in compute shaders
When multiple pipelines share resources, an explicit GPUBindGroupLayout and GPUPipelineLayout must replace the auto-generated layout
Wrapping edge-cell neighbor lookups with the modulo operator creates a toroidal grid topology that prevents out-of-bounds buffer access
L4 · Performance — 2
L5 · Voice — 9
A GLSL shader that compiles but outputs values outside 0..1 or produces NaN renders black or blown-out
Debug a GLSL compile error by reading its line number, then bisecting back to a known-good body
Every GLSL fragment shader must define void main() and assign gl_FragColor at least once
GLSL requires explicit float literals and exact vector sizes; int/float mixing is a compile error
GLSL uniforms must be declared before use; only glslViewer-provided names are available without declaration
glslViewer keeps the last successfully-compiled shader on screen when a save fails to compile
Shadertoy shaders use different uniform names from glslViewer and will not run as-is
The canonical GLSL panic shader is the hello.frag cosine palette driven by u_time with a clamped output
The terminal-rig glslViewer has no audio-reactivity bridge; use u_time for motion instead