Glaze

Live shader authoring · Ruby

Change the code. See the field.

Load Ruby shader definitions, compile them through RLSL, and render them with RBGL.

gem install glaze

Shader workbenchRuby source → live frame

A direct path from source to pixels.

Iterate live, render headlessly, or export a self-contained WebGPU page.

01

Edit in place

Reload shaders while keeping the last good frame after a bad edit.

02

Choose a renderer

Use the CPU renderer or Metal on supported macOS hosts.

03

Take it with you

Capture PNGs, record sequences, or export WebGPU HTML.

A small first step

Start with one example.

Install the gem, then follow the project guide for platform requirements and the full API.

Read the installation guide ↗

require "glaze"

Glaze.shader(:pulse) do
  params { float :speed, default: 1.0, range: 0.0..4.0 }
  fragment do |point, resolution, uniforms|
    wave = point[0] / resolution[0] + uniforms.time * uniforms.speed
    [wave % 1.0, 0.2, 0.4, 1.0]
  end
end