Skip to content

BumpyClock/agent-templates / skills/shader-art-coding

shader-art-coding

Verified

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, 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.

FileKindSize
CREDITS.mdmarkdown6.3 KB
LICENSEother1.0 KB
SKILL.mdskill md7.1 KB
agents/openai.yamlconfig298 B
glsl/architecture.glslother1.8 KB
glsl/atmosphere.glslother4.6 KB
glsl/camera.glslother2.1 KB
glsl/color.glslother4.7 KB
glsl/common.glslother2.7 KB
glsl/debug.glslother1.4 KB
glsl/domain.glslother4.8 KB
glsl/hash.glslother4.1 KB
glsl/intersect.glslother1.7 KB
glsl/noise.glslother21.3 KB
glsl/operators.glslother5.3 KB
glsl/pattern.glslother3.1 KB
glsl/post.glslother2.6 KB
glsl/raymarch.glslother4.0 KB
glsl/sdf2d.glslother11.7 KB
glsl/sdf3d.glslother10.0 KB
glsl/shading.glslother4.6 KB
glsl/tonemap.glslother4.8 KB
glsl/volume.glslother3.4 KB
glsl/water.glslother3.1 KB
references/composition-and-debugging.mdmarkdown5.2 KB
references/formula-code-couples-materials.mdmarkdown15.5 KB
references/formula-code-couples-sdf.mdmarkdown20.5 KB
references/formula-code-couples-terrain.mdmarkdown17.1 KB
references/formula-cookbook.mdmarkdown19.0 KB
references/library-index.mdmarkdown56.2 KB
references/noise-use-cases.mdmarkdown17.1 KB
references/procedural-buildings.mdmarkdown7.5 KB
references/rendering-pipeline.mdmarkdown8.4 KB
references/sdf-library-guide.mdmarkdown10.4 KB
references/shader-workflow.mdmarkdown3.5 KB
references/subject-routing.mdmarkdown9.7 KB
references/terrain-production.mdmarkdown7.3 KB
references/water-quality.mdmarkdown10.6 KB
scripts/glsl_tools.pyscript29.4 KB
templates/alpine-valley.glslother3.9 KB
templates/coastal-water.glslother7.6 KB
templates/noise-progression.glslother2.3 KB
templates/noise-terrain-map.glslother2.2 KB
templates/ocean.glslother13.1 KB
templates/pattern-swatches.glslother3.6 KB
templates/procedural-city.glslother4.5 KB
templates/raymarch-sdf.glslother5.3 KB
templates/sdf-2d-poster.glslother3.7 KB
templates/terrain.glslother4.7 KB
templates/volumetric-clouds.glslother3.9 KB

glsl/debug.glsl

View on GitHub
//! debug: visualize intermediate fields. The pack's DEBUG_MODE convention:
//!   0 final render | 1 distance field / contours | 2 normals | 3 material ids
//!   4 step count / depth | 5 masks / density | 6 lighting terms
//! Declare it as   #define DEBUG_MODE 0   at the top of the shader. Shadertoy has no custom uniforms.

/// Distance field as contour bands: warm outside, cool inside, white zero line. Bands are 0.1 units apart.
/// @use checking SDF scale, smoothness, wrong signs, bad blends (kinked or bunched contours)
vec3 debugDistance(float d) {
    vec3 col = (d > 0.0) ? vec3(0.9, 0.6, 0.3) : vec3(0.4, 0.7, 0.85);
    col *= 1.0 - exp(-4.0 * abs(d));
    col *= 0.8 + 0.2 * cos(TAU * d / 0.1);
    return mix(col, vec3(1.0), 1.0 - smoothstep(0.0, 0.01, abs(d)));
}

/// Normal as RGB.
/// @use spotting seams, flipped normals, noisy normals
vec3 debugNormal(vec3 n) { return 0.5 + 0.5 * n; }

/// Distinct color per integer id.
/// @use material ids, cell ids, instance ids
vec3 debugIdColor(float id) {
    return 0.55 + 0.45 * cos(TAU * (0.618034 * id + vec3(0.0, 0.33, 0.67)));
}

/// Heat ramp for a value in [0,1]: black, blue, magenta, orange, yellow, white.
/// @use step counts (steps / maxSteps), depth, cost, any scalar mask
vec3 debugHeat(float t) {
    t = clamp(t, 0.0, 1.0);
    return clamp(vec3(1.5 * t, 1.6 * t * t * t - 0.1, 0.9 * sin(PI * t) + 0.2 * t * t), 0.0, 1.0);
}
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 319kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 319kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 319kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 319kUpdated Claude CodeCodexVerifiedInstall