hs:shader

Write GLSL fragment shaders for procedural graphics, textures, and visual effects.

Updated Jul 19, 2026
One-click install
npx skills add https://github.com/Dozyboy/VSF --skill hs-shader-dozyboy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hs:shader
Source: https://github.com/Dozyboy/VSF/tree/main/Day2_VSF/Demo1/harness/plugins/hs/disabled-skills/shader
Command: npx skills add https://github.com/Dozyboy/VSF --skill hs-shader-dozyboy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing GLSL fragment shaders requires deep knowledge of GPU programming, signed distance fields, noise functions, and color math, which slows down developers and artists building procedural graphics for WebGL, Three.js, or generative art. ## Core Features & Use Cases - SDF Shape Drawing: Create circles, rectangles, polygons, stars, and combined shapes using signed distance field functions with smooth edges. - Procedural Noise & Textures: Generate Perlin, simplex, cellular, Voronoi, and fBm noise to build clouds, marble, wood, terrain, fire, and water effects. - Patterns & Animation: Build tiling, Truchet, kaleidoscope, and domain-warped patterns with time-based animation using standard uniforms like u_time and u_resolution. - Use Case: A developer building a Three.js scene needs an animated lava background; this Skill provides the warped fBm shader code ready to embed as a ShaderMaterial. ## Quick Start Ask the AI to write a GLSL fragment shader that renders an animated cloudy sky using fBm noise and the u_time uniform.

Frequently Asked Questions about hs:shader

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a GLSL fragment shader for procedural textures?▼

Start with normalized coordinates from gl_FragCoord divided by u_resolution, then layer noise functions like fBm to build textures such as clouds, marble, or wood. Combine with smoothstep and mix to map noise values to colors.

How to draw shapes in GLSL using signed distance fields?▼

Use SDF functions that return the distance from a pixel to a shape edge, such as length(st - center) - radius for circles. Convert the distance to a visible shape with smoothstep for anti-aliased edges, and combine shapes with min, max, or smooth boolean operations.

What is the difference between Perlin, simplex, and Voronoi noise in GLSL?▼

Perlin and gradient noise interpolate random gradients for smooth organic variation, while simplex noise is a faster variant with fewer directional artifacts. Voronoi noise measures distance to random feature points, producing cellular patterns useful for cracked ground or biological textures.

Can I use these GLSL shaders in Three.js or WebGL projects?▼

Yes, the fragment shaders use standard GLSL ES syntax compatible with WebGL and Three.js ShaderMaterial. Map the u_time, u_resolution, and u_mouse uniforms to Three.js uniform objects, or adapt them to ShaderToy's iTime, iResolution, and iMouse.

Why does my GLSL shader fail with integer division errors?▼

GLSL requires explicit float types, so expressions like 1/2 evaluate to 0 instead of 0.5. Always write decimal literals such as 1.0/2.0 and use explicit casts like float(i) when converting integers.

How do I animate a fragment shader over time?▼

Pass elapsed seconds through the u_time uniform and incorporate it into your math, such as sin(st.x * 10.0 + u_time) for waves or offsetting noise coordinates for flowing textures. Use fract(u_time) for looping sawtooth motion or sin(u_time) * 0.5 + 0.5 for oscillation.