Free, in your browser

Metal to WebGPU

Paste Metal and get WGSL, the shading language of WebGPU: your functions as they are, or a whole module that draws a shader full screen in any browser. It all happens on this page.

Metal

    What it takes

    Metal as Ray Kiln writes it: functions, structs and constants, and a shader's float4 shade(float2 uv, constant Uniforms& u, constant Params& p). That covers the maths and texture-free shaders the episodes are made of; vertex functions, textures and Metal's own attributes don't convert yet, and the converter names the line it stopped at. It is the converter the playground runs every episode through, tested on all of them.