blender-motion-state-inspection
AFaffaan-m/ECC315k4,381 new stars in the last 7 days
Writes, debugs, and art-directs procedural GLSL fragment shaders (Shadertoy mainImage, WebGL2 / GLSL ES 3.00): SDF raymarching, procedural buildings/cities, 2D distance-field graphics, noise / fBm / domain warping, terrain, ocean/coastal water optics, clouds and other volumes, structural color, black hole lensing, vector-field engraving, feedback simulations, PBR lighting, color and tonemapping. Ships a verified GLSL building-block library with a bundler and checker. Use when the user asks for a shader, Shadertoy, GLSL/.frag/.glsl code, a raymarcher, an SDF scene, a procedural texture or generative visual, or wants a shader fixed, optimized, ported or explained. Not for HLSL/Unity ShaderLab or non-graphics GPU compute.
Treat shader work as visual engineering: start from the intended image, choose the smallest mathematical model that can produce it, build it in inspectable stages, and verify each stage with a debug view.
references/subject-routing.md:
2D distance fields (posters, icons, patterns), SDF raymarching (objects, characters), heightfield marching
(landscapes), volume integration (clouds, smoke, fire). For optical mechanisms, orbital light paths,
vector-field prints or evolving patterns, use references/research-studies.md to select the representation
and a visible test of its behavior.python3 scripts/glsl_tools.py search <words> or
references/library-index.md, and call them by name. Do not paste or re-derive library code; it is tested.
Run python3 scripts/glsl_tools.py examples <exactName> to locate direct calls and debug views. Use rg -n -w <symbol> within the relevant world directory for host-side callers.python3 scripts/glsl_tools.py bundle shader.glsl -o out.glsl inlines exactly the
functions used. python3 scripts/glsl_tools.py check out.glsl lints it and compiles it with glslangValidator
when installed. Fix every error, then deliver out.glsl.Run the scripts from this skill's directory. They need only Python 3.
vec2 uv = (2.0 * fragCoord - iResolution.xy) / iResolution.y;, so one pixel is
2.0 / iResolution.y.vec2 map(vec3 p) returns vec2(distance, materialId). raymarch, calcNormal,
softShadow, calcAO and sdfThickness all use it.#define DEBUG_MODE 0 with 0 final, 1 distance field, 2 normals, 3 ids, 4 steps, 5 masks,
6 lighting terms.srgbToLinear. Then exposure, then the
tonemap (tonemapAgX by default, per AA sample), then the average, then linearToSrgb once, then
ditherTPDF.@exact / @bound / @approx tags. If a deformation pushes Lipschitz above 1,
divide the distance or lower the stepScale of raymarch.#version line, no custom uniforms, no gl_FragColor / texture2D / iGlobalTime.?: on structs. Use vec2(distance, id) or if.2.0 * PI, clamp(x, 0.0, 1.0).fract(sin(...) * 43758.5453) hashes. Use hash12 / hash22 / hash33 (integer PCG). Replace them even
when porting with "keep the look": the sine hash's exact pattern already differs between GPUs, and a PCG hash on
the same integer cell ids gives the noise the same look. check reports a sine hash as an error.atan(0, 0), pow of negatives, sqrt of negatives, normalize(vec3(0)).dFdx / fwidth out of non-uniform branches and loops, or use an explicit pixel size.Read only what the task needs:
| File | Read when |
|---|---|
references/subject-routing.md | starting from a subject ("a jellyfish", "mountains"); maps formal names to subjects |
references/library-index.md | choosing functions: every library function with signature, exactness and uses |
references/sdf-library-guide.md | modeling: exactness tiers, blends, neighbor-checked repetition, deformation limits, WebGL pitfalls |
references/rendering-pipeline.md | lighting rigs, shadows/AO, sky and fog, volumes, tonemapping, AA, performance |
references/noise-use-cases.md | choosing Perlin/value/simplex/cellular noise, fBm/ridged/billow/warp/hybrid recipes, game use cases and primary-source code links |
references/procedural-buildings.md | parcel IDs, building massing, setbacks/roofs, facade filtering, city repetition and game integration |
references/terrain-production.md | terrain representations, designed valleys, slope/altitude materials, tracing limits, chunks and LOD |
references/research-studies.md | optics, null geodesics, streamline engraving, reaction-diffusion, terrain caching and offline playback |
references/frame-budgets.md | diagnosing low FPS, GPU timing, foliage culling, half-resolution shafts, cache invalidation, streaming budgets and adaptive resolution |
references/vegetation-habitats.md | placing tree groves, wet-bank species and understory from shared fields |
references/world-rendering.md | kelp forests, sponges, shipwrecks, tides, foliage detail, room radiosity and full-world source navigation |
references/water-quality.md | high-quality ocean/coastal water, wave derivatives, Fresnel/refraction/absorption, foam, presets and engine-side upgrades |
references/material-sampling.md | breaking up tiled materials while preserving authored trim, layer masks, and relief |
references/shader-workflow.md | planning a complex shader end to end; review checklist |
references/composition-and-debugging.md | the image reads poorly, or something is visually wrong |
references/formula-cookbook.md | multi-step recipes: modular cell lattices, terrain synthesis, organic composition |
references/formula-code-couples-sdf.md | equation-to-code for organic and modular SDF features |
references/formula-code-couples-terrain.md | heightfields, density fields, accumulation, atmosphere |
references/formula-code-couples-materials.md | masks, palettes, lighting terms, polish, motion |
Choose examples and visual checks across the complete template and multipass collection. For a creation or redesign, open the closest implementation. For a repair, compare the failing stage with its working counterpart. For an explanation, trace the relevant function and its caller. For a performance request, compare the same view and settings before and after. Use supplementary examples for specific features and check the assumptions they share with the primary example. For combinations, the guide includes worked inlet, engraved emblem, cached forest and translucent swimmer examples. Read the actual debug branches and use the test that isolates the feature being changed. For persistent state, trace the writer, the sampler, and the first frame after reset. For a visual deliverable, inspect a render at the requested size and a diagnostic that exposes the main failure mode. Report the example used, what you adapted and what you observed. Identify any check you could not run.
For two-pass requests deliver both buffers and their channel bindings. Build the offline viewer with
scripts/build_viewer.py to review motion and diagnostic views.
When writing a shader:
mainImage(out vec4 fragColor, in vec2 fragCoord).DEBUG_MODE switches and name the art controls as constants at the top.// @variant QUALITY=3 (or another defined integer macro) so CI compiles
and renders them. Preserve horizon/shore contact and temporal filtering before adding detail.When improving an existing shader:
AFaffaan-m/ECC315k4,381 new stars in the last 7 days
Generate flow fields and particle systems with p5.js, using seeded randomness for original algorithmic art.
ANanthropics/skills203k3,265 new stars in the last 7 days
ANanthropics/skills203k3,265 new stars in the last 7 days
HAharry0703/MoneyPrinterTurbo147k1,608 new stars in the last 7 days
SHShubhamsaboo/awesome-llm-apps147k907 new stars in the last 7 days
GAgarrytan/gstack143k598 new stars in the last 7 days