sickn33 avatar

Shader Programming Glsl

This walks you through writing GLSL shaders for WebGL and game engines, covering the vertex/fragment pipeline, uniforms, varyings, and vector operations like swizzling. It includes a working raymarching example with signed distance functions and emphasizes GPU-friendly patterns like using smoothstep instead of branching. The best practices section is genuinely helpful, calling out common performance pitfalls like calculating constants in the shader instead of passing them as uniforms. If you're implementing custom visual effects or procedural generation and need a quick reference for GLSL syntax and optimization patterns, this covers the essentials without drowning you in theory.

skills.sh installs
126
GitHub stars
39.4K
last updated
Jun 3, 2026

Install

$ npx -y skills add sickn33/antigravity-awesome-skills --skill shader-programming-glsl --agent claude-code

Installs into .claude/skills of the current project.

Files

Shader Programming GLSL

Overview

A comprehensive guide to writing GPU shaders using GLSL (OpenGL Shading Language). Learn syntax, uniforms, varying variables, and key mathematical concepts like swizzling and vector operations for visual effects.

When to Use This Skill

  • Use when creating custom visual effects in WebGL, Three.js, or game engines.
  • Use when optimizing graphics rendering performance.
  • Use when implementing post-processing effects (blur, bloom, color correction).
  • Use when procedurally generating textures or geometry on the GPU.

Step-by-Step Guide

1. Structure: Vertex vs. Fragment

The basic syntax below targets GLSL ES 1.00/WebGL 1. Host engines may inject matrices/attributes; raw WebGL must bind them explicitly. GLSL ES 3.00 uses in/out and a declared fragment output instead of attribute/varying/gl_FragColor. Compile the vertex and fragment shaders separately, link them into a program, and inspect compile/link logs.

Understand the pipeline:

  • Vertex Shader: Transforms 3D coordinates to 2D screen space (gl_Position).
  • Fragment Shader: Colors individual pixels (gl_FragColor).

Sponsors

Details

Repository
github.com/sickn33/antigravity-awesome-skills
Category
Game Development
First seen
Jun 3, 2026

More from sickn33/antigravity-awesome-skills

All 708
1msw-git avatarmsw-sprite-ruidmsw-git/msw-ai-coding-plugins-officialSpriteRendererComponent.SpriteRUID (world) and SpriteGUIRendererComponent.ImageRUID (UI) — native RUID type support (sprite / animationclip direct playback), th10.5Kskills.sh installs
2pixijs avatarpixijs-scene-spritepixijs/pixijs-skillsUse this skill when drawing images in PixiJS v8. Covers Sprite with anchor/tint/texture, AnimatedSprite for frame animation, NineSliceSprite for resizable UI pa7Kskills.sh installs
3omer-metin avatargame-ui-designomer-metin/skills-for-antigravityWorld-class game UI design expertise combining the clarity of Nintendo's UI philosophy, the immersive diegetic interfaces of Dead Space and Metroid Prime, and t4.3Kskills.sh installs
4softaworks avatargame-changing-featuressoftaworks/agent-toolkitFind 10x product opportunities and high-leverage improvements. Use when user wants strategic product thinking, mentions '10x', wants to find high-impact feature4Kskills.sh installs
5majidmanzarpour avatarthreejs-game-ui-designermajidmanzarpour/threejs-game-skillsDesign premium Three.js game UI. Use for HUDs, menus, overlays, pause/win/lose screens, settings, icon controls, touch UI, typography, responsive layout, safe a3.9Kskills.sh installs
6majidmanzarpour avatarthreejs-game-directormajidmanzarpour/threejs-game-skillsPrimary entrypoint for complete Three.js browser game creation and premium iteration. Use by default for build-a-game, upgrade, polish, premium, AAA, high-fidel3.5Kskills.sh installs