๐Ÿšง ShaderBot is currently in beta. Some features may evolve.Join the Beta!
๐ŸŽ“ Choose your role for a personalized experience

GLSL / WGSL Guide

๐Ÿ‘† Select your role above to see customized content

External Resource Library

41 hand-picked resources โ€” tutorials, tools, communities

Level

Domain

41 resource(s)

๐Ÿ–ผ The Book of Shadersโ†—

Step-by-step guide to fragment shaders โ€” the most referenced GLSL learning resource. Open source.

Beginner
๐Ÿ–ผ Inigo Quilez โ€” Articles & Tutorialsโ†—

SDFs, ray marching, soft shadows, color palettes โ€” the bible of advanced GLSL techniques by Shadertoy's co-creator.

Advanced
โ–ถ An Introduction to Shader Art Coding โ€” kishimisuโ†—

The most-watched beginner tutorial for shader art on Shadertoy. Hundreds of thousands of views.

Beginner
โ–ถ The Art of Code โ€” YouTube Channelโ†—

Friendly GLSL tutorials: ray marching, fractals, game effects โ€” excellent for beginners.

Beginner
โ–ถ Freya Holmรฉr โ€” Math for Game Devsโ†—

Vectors, interpolation, Bezier curves, signed distances โ€” beautifully animated math for shaders.

Beginner
โ–ถ Value Noise Derivatives โ€” kishimisuโ†—

Deep dive into value noise, fbm and domain warping in GLSL.

Intermediate
โ–ถ Shadertoy Tutorials โ€” Inigo Quilezโ†—

Live coding sessions and explanations of advanced ray marching, SDF operations and rendering.

Advanced
โ–ถ WebGL Fundamentals โ€” Video Seriesโ†—

Browser-level WebGL: buffers, shaders, textures โ€” useful for understanding the pipeline.

Intermediate
๐Ÿ–ผ Shadertoy โ€” Learn (official tutorials)โ†—

Official Shadertoy shader tutorials โ€” uniforms, ray marching, noise, directly runnable.

Beginner
๐Ÿ”ง GLSL Sandboxโ†—

Live GLSL editor in the browser โ€” instant feedback, huge public shader gallery.

Beginner
๐Ÿ”ง Shadertoyโ†—

The premier online GLSL editor and community. Thousands of shared shaders with source code.

Beginner
๐Ÿ–ผ WebGL Fundamentalsโ†—

Exhaustive written guide to raw WebGL โ€” vertices, textures, transforms, lighting.

Beginner
๐Ÿค–Discord Commands
๐ŸŒฑ Ch.1First StepsDiscord Commands
๐Ÿค–

Discord Commands

Quick reference /shader & uniforms

ยท 3 min

Discord Commands Reference

๐Ÿš€ Quick Start

Paste your GLSL code directly into /shader. The bot compiles and returns an animated GIF within seconds. 17 slash commands available โ€” shaders, AI, audio, collab, marketplace and more.

๐Ÿ–ผ๏ธ Shaders

/shaderMain

Compiles and displays a custom GLSL/WGSL shader.

code: Your GLSL code (required)
resolution: 480x270 / 960x540 / 1920x1080 (default: 480x270)
duration: 0.5โ€“5.0s (default: 2s)
format: gif / webp / png-sequence
view: 2d / 3d (render on 3D mesh)
mesh: sphere / cube / torus / plane (when view=3d)
texture0โ€“3: Image URL for iChannel0โ€“3
/shader-preset

Runs one of 1,200+ pre-built presets (nebula, matrix, particles, neoncityโ€ฆ). Autocomplete available.

preset: Preset name (autocomplete)
resolution / duration / format / view / mesh: Same options as /shader
/shader-generateAI

Generates a shader via guided visual parameters. Autocomplete on every option.

shape: Shape (circle, wave, fractalโ€ฆ)
color / animation / speed / pattern / background / effect / complexity: Visual options (all optional)
resolution / duration / view / mesh: Same options as /shader
/shader-promptAI

Generates a full shader from a natural language description (e.g. "purple nebula with twinkling stars").

description: What you want to see (required)
resolution / duration / view / mesh: Same options as /shader
/shader-code

Displays the GLSL source code of a preset. Autocomplete available.

name: Preset name (autocomplete)
/shader-minecraftMinecraft

Minecraft shaders โ€” OptiFine, Iris and Vibrant Visuals. 50+ dedicated presets.

loader: optifine / iris / vibrant
code / preset: Custom shader or Minecraft preset (optional)
/shader-help

Sends a link to this guide and the web dashboard.

๐Ÿค– AI & Assistant

/aiRAG

RAG-powered GLSL assistant. Sub-commands:

/ai ask โ€” General GLSL / ShaderBot question
/ai preset โ€” Detailed info about a preset
/ai suggest โ€” Suggestions based on your code
/ai debug โ€” Debug a shader
/ai analyze โ€” Deep code analysis
/ai image / screenshot / match โ€” Visual analysis (VLM)
/agent

Autonomous shader generation agent.

/agent status โ€” Show status and recent stats
/agent generate โ€” Trigger a generation cycle (admin)

๐ŸŽต Audio & Media

/audio

Audio-reactive shaders from a Discord voice channel.

/audio join โ€” Bot joins the voice channel
/audio leave โ€” Bot leaves the voice channel
/audio shader โ€” Renders an audio-reactive shader (audio_bars, audio_pulse, audio_spectrum)
/musicAudioCraft

AI music generation via AudioCraft (Meta). Returns a .wav file.

/music generate โ€” Generates a clip from a prompt, style and duration

๐Ÿ“Š Data & Visualisation

/dataviz

Renders charts (bar, line, pie, scatter, heatmapโ€ฆ) as animated shader GIFs.

/dataviz-liveWebSocket

Live data visualisation via WebSocket.

/dataviz-live connect โ€” [url] [jsonpath] [min] [max]

๐Ÿค Collaboration & Streaming

/collab

Real-time collaborative shader editing.

/collab start โ€” [preset] โ€” create a session
/collab join / leave / snapshot โ€” Join, leave or snapshot
/sceneOBS

OBS scenes โ€” create browser sources pointing to your shaders.

/scene create โ€” [preset] โ€” returns an OBS Browser Source URL
/scene list / delete โ€” List or delete your scenes
/streamTwitch

Twitch overlay โ€” connect a shader stream to your broadcast.

/stream connect โ€” [username] [preset]
/stream shader / disconnect โ€” Change shader or disconnect

๐Ÿ›’ Marketplace

/marketplace

Buy, sell and manage shaders on the community marketplace.

/marketplace list / buy / sell / my-shaders โ€” Browse, purchase, sell, view your shaders

๐Ÿ“ฆ Variables Available in your Shader

iTimefloat โ€” Time in seconds
iResolutionvec3 โ€” Canvas size (x, y, ratio)
iMousevec4 โ€” Mouse position
fragCoordvec2 โ€” Current pixel coords
iChannel0โ€“3sampler2D โ€” Optional textures
fragColorvec4 out โ€” Output color

โœ… Minimal Example โ€” Ready to Paste in /shader

Ready-to-use plasma shader. Copy this code into /shader code: to try it.

โ–ผ
// Plasma colorรฉ animรฉ โ€” copiez et lancez avec /shader
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord / iResolution.xy;
    vec2 p  = (fragCoord * 2.0 - iResolution.xy) / iResolution.y;

    float t  = iTime;
    float v1 = sin(p.x * 4.0 + t);
    float v2 = sin(p.y * 4.0 + t * 1.3);
    float v3 = sin((p.x + p.y) * 4.0 + t * 0.7);
    float v  = (v1 + v2 + v3) / 3.0;

    vec3 col = vec3(
        sin(v * 3.14159) * 0.5 + 0.5,
        sin(v * 3.14159 + 2.094) * 0.5 + 0.5,
        sin(v * 3.14159 + 4.189) * 0.5 + 0.5
    );

    fragColor = vec4(col, 1.0);
}

๐Ÿ”ท With #define โ€” Compact Syntax

#define macros work normally โ€” t, r, PI, and other shorthands are all supported.

โ–ผ
// Les macros #define sont supportรฉes
#define t  iTime
#define r  iResolution.xy
#define PI 3.14159265

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord / r;
    vec2 p  = uv - 0.5;

    float wave = sin(length(p) * 20.0 - t * 3.0);
    float ring = smoothstep(0.02, 0.0, abs(wave * 0.05));

    vec3 col = mix(
        vec3(0.05, 0.05, 0.2),
        vec3(0.2, 0.8, 1.0),
        ring + sin(t + uv.x * PI) * 0.1
    );

    fragColor = vec4(col, 1.0);
}
3/15