Logo di Shader Art Coding

Shader Art Coding

Community
gokayfem
shader-art-coding

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.

Panoramica

Pubblicato dagokayfem
Repositoryshader-skills
Nome della skillshader-art-coding
Stelle
403
Fork
32
File inclusi
47
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • File inclusi: 47

    Script, template e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da gokayfem su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Shader Art Coding in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/gokayfem/shader-skills/tree/main/skills/shader-art-coding
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/gokayfem/shader-skills.git /tmp/shader-skills
mkdir -p .claude/skills
cp -r /tmp/shader-skills/skills/shader-art-coding .claude/skills/shader-art-coding
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Shader Art Coding in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Shader Art Coding non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Shader Art Coding non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Shader Art Coding

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.

Workflow

  1. Target. State the image: subject, camera and framing, dominant forms, materials, light, motion.
  2. Route. Pick the rendering model and starting template from references/subject-routing.md: 2D distance fields (posters, icons, patterns), SDF raymarching (objects, characters), heightfield marching (landscapes), volume integration (clouds, smoke, fire).
  3. Assemble from the library. Find building blocks with 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.
  4. First image fast. Coordinates, background, one primitive, one light. Then add the debug views.
  5. Refine in order: proportions, composition, material separation, lighting, atmosphere, color, antialiasing, performance.
  6. Bundle and check. 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.

Conventions

  • Coordinates: vec2 uv = (2.0 * fragCoord - iResolution.xy) / iResolution.y;, so one pixel is 2.0 / iResolution.y.
  • Scene contract: vec2 map(vec3 p) returns vec2(distance, materialId). raymarch, calcNormal, softShadow, calcAO and sdfThickness all use it.
  • Debug: #define DEBUG_MODE 0 with 0 final, 1 distance field, 2 normals, 3 ids, 4 steps, 5 masks, 6 lighting terms.
  • Color pipeline: light in linear and decode picked colors with srgbToLinear. Then exposure, then the tonemap (tonemapAgX by default, per AA sample), then the average, then linearToSrgb once, then ditherTPDF.
  • Distances: respect the @exact / @bound / @approx tags. If a deformation pushes Lipschitz above 1, divide the distance or lower the stepScale of raymarch.

Hard rules (these break Shadertoy/WebGL)

  • No #version line, no custom uniforms, no gl_FragColor / texture2D / iGlobalTime.
  • No ?: on structs. Use vec2(distance, id) or if.
  • Write float literals: 2.0 * PI, clamp(x, 0.0, 1.0).
  • No 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.
  • Guard NaN sources: atan(0, 0), pow of negatives, sqrt of negatives, normalize(vec3(0)).
  • Keep dFdx / fwidth out of non-uniform branches and loops, or use an explicit pixel size.

Reference routing

Read only what the task needs:

FileRead when
references/subject-routing.mdstarting from a subject ("a jellyfish", "mountains"); maps formal names to subjects
references/library-index.mdchoosing functions: every library function with signature, exactness and uses
references/sdf-library-guide.mdmodeling: exactness tiers, blends, neighbor-checked repetition, deformation limits, WebGL pitfalls
references/rendering-pipeline.mdlighting rigs, shadows/AO, sky and fog, volumes, tonemapping, AA, performance
references/noise-use-cases.mdchoosing Perlin/value/simplex/cellular noise, fBm/ridged/billow/warp/hybrid recipes, game use cases and primary-source code links
references/procedural-buildings.mdparcel IDs, building massing, setbacks/roofs, facade filtering, city repetition and game integration
references/terrain-production.mdterrain representations, designed valleys, slope/altitude materials, tracing limits, chunks and LOD
references/water-quality.mdhigh-quality ocean/coastal water, wave derivatives, Fresnel/refraction/absorption, foam, presets and engine-side upgrades
references/shader-workflow.mdplanning a complex shader end to end; review checklist
references/composition-and-debugging.mdthe image reads poorly, or something is visually wrong
references/formula-cookbook.mdmulti-step recipes: modular cell lattices, terrain synthesis, organic composition
references/formula-code-couples-sdf.mdequation-to-code for organic and modular SDF features
references/formula-code-couples-terrain.mdheightfields, density fields, accumulation, atmosphere
references/formula-code-couples-materials.mdmasks, palettes, lighting terms, polish, motion

Templates in templates/ are complete, render-verified starting points (gallery in the repository README): raymarch-sdf.glsl, terrain.glsl, ocean.glsl, volumetric-clouds.glsl, sdf-2d-poster.glsl, pattern-swatches.glsl, noise-progression.glsl, noise-terrain-map.glsl, procedural-city.glsl, alpine-valley.glsl, coastal-water.glsl.

Output expectations

When writing a shader:

  • Deliver the bundled, paste-ready Shadertoy code with mainImage(out vec4 fragColor, in vec2 fragCoord).
  • Avoid textures unless the user provides them.
  • Include DEBUG_MODE switches and name the art controls as constants at the top.
  • End with a short tuning guide: which constants control scale, softness, color, light and motion.
  • Say whether the shader was compile-checked, and how.
  • For buildings/terrain/water, separate implemented features from engine-side upgrades. Do not call a heightfield a cave generator, a material window a modeled recess, or a procedural foam/caustic mask a fluid/light simulation.
  • For quality requests, state the target and budget, expose presets/debug views, and inspect rendered output. Annotate important template presets with // @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:

  • Identify its rendering model and bottlenecks.
  • Preserve its intent and interface.
  • Fix correctness first, then readability, visual quality and speed.
  • Call out risky changes (coordinate scale, material ids, loop counts).

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Shader Art Coding?

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

Perché usare Shader Art Coding su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Shader Art Coding è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Shader Art Coding in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/gokayfem/shader-skills/tree/main/skills/shader-art-coding. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Shader Art Coding?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Shader Art Coding?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Shader Art Coding: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Shader Art Coding è gratuita?

Sì. È pubblicata su GitHub da gokayfem con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇