About

One shader at a time.

Ray Kiln publishes new Metal shaders. For each one, a short video shows how it is built; a page here has the full source, every parameter explained, and the sound it makes.

The name comes from light and from firing: “ray” for raymarching and the way light travels, “kiln” for something made fresh and hot.

What a shader is

A shader is a small program that runs on the graphics chip. A fragment shader runs once for every pixel, many millions of times a frame, and returns that pixel's colour. With nothing but a formula you can make clouds, fire, water or a scene in 3D. Metal is Apple's language for it.

One file makes the picture and the sound

Each episode is a single .metal file. A function called shade returns the colour of every pixel. A second, sound, returns the stereo audio sample for any moment in time, and runs on the graphics chip too. The picture and the soundtrack come from the same timeline, so they always agree.

How the videos are made

A small Mac app runs the shader and records it frame by frame at a fixed timestep, so even a heavy shader gives a perfectly smooth 4K, 60 frames a second capture. The sliders you see on screen are declared in the shader with one comment line each, and the same lines make the parameters table on each page.

What this browser remembers

Unless you make an account, the site sets no cookies and knows nothing about you. Visits are counted with Cloudflare Web Analytics, which uses no cookies and keeps nothing that identifies you: page, country, browser and how fast the page loaded. To mark the shaders you have opened, the ones that are new since your first visit, where you stopped in a video, and whether you turned keyboard shortcuts off, this site keeps a short note in your browser's own storage, which only this site's pages can read.

Accounts and the gallery

An account is free and optional. It keeps your favourites, and with the Ray Kiln app it lets you share your own shaders to the gallery, with their source, for others to read and open. Signing in sets two cookies, only to keep you signed in. The privacy page says what an account stores, and your account page can download or delete all of it.

Who

Made by Pablo Miranda.

See the shaders