Real-time shader experiments

Prototypes in GLSL and WebGL: flowing noise, signed-distance tricks, and lightweight post effects for interactive scenes.

Experiments

Domain-warped FBM

Layered value noise with a secondary warp field to break tiling without extra texture lookups.

GLSL

Signed distance fields 101

Union and smooth-min blends for procedural shapes, rendered as crisp outlines in a single pass.

WebGL

Ray-marched clouds

Beer–Lambert density along view rays with cheap 3D noise and early-out heuristics for frame time.

GLSL

Toon outline post-process

Normal-based edge detection in screen space, tuned for stylized PBR without a dedicated outline mesh.

WebGL

Reaction-diffusion

Gray–Scott on a ping-pong render target; parameters mapped to UV scale for organic pattern control.

Compute

Bloom without the blur tax

Threshold and separable blur at quarter res, composited with energy normalization to avoid milky highlights.

WebGL

Notes

Stabilizing WebGL1 precision

Switching sensitive FBM loops to mediump on mobile exposed banding in the warp field. Bias the lattice coordinates by a large constant before hashing and keep the final mix in highp on desktop only.

Resize and DPR caps

Hero canvases above 2× DPR rarely help perceptually but cost fill rate. Capping devicePixelRatio and resizing from the container aspect ratio kept the fragment shader under budget on integrated GPUs.

SDF text in one draw

Pack glyph distance fields into a single atlas and sample with smoothstep for crisp UI labels inside shader-only demos—no texture uploads per frame beyond the initial atlas bake.

About

ShaderLoft is a hobby lab for real-time graphics: small GLSL sketches, WebGL playgrounds, and notes from weekend game-dev VFX experiments. Nothing here is a product pitch—just shaders worth keeping around when a project needs a visual idea.