Practical notes on writing shaders and talking to the GPU, from a first fragment shader to Metal and HDR on macOS. The Real-Time Graphics lecture notes cover the theory and the TouchDesigner wiki covers the node-based side; these pages sit in between.
Shaders
- (y-) Fragment Shader Basics: per-pixel programs, coordinates, smoothstep and the first circle.
- (y-) Signed Distance Functions and Raymarching: shapes as distance functions and the sphere-tracing loop.
- (y-) Image Convolution Kernels: blur, edge detection, sharpening and separable filters.
- (y-) Compute Shaders: threads, workgroups, shared memory and a parallel reduction.
- (y-) GPU Particle Systems: particle state on the GPU, ping-pong updates and drawing millions of points.
Color and Apple Platforms
- (y-) Color Spaces and Gamma: sRGB, linear light, Display P3 and premultiplied alpha.
- (y-) HDR and EDR on macOS: extended dynamic range, headroom and how a Metal app asks for it.
- (y-) Metal Basics: devices, command buffers, pipelines and a minimal compute dispatch in Swift.