Te Shader Play

Live-reload wgsl shaders and watch them render in real time.

Shader parameters

You can enter custom parameters in the Shader parameters window.

To use the parameters in the shaders you have to declare them like:

@group(1) @binding(3)
var<uniform> my_shader_parameter: u32;
type supported
bool 🔴 (Not allowed by wgpu)
u32 🟢
i32 🟢
f16 🔴
f32 🟢
atomic<T> 🔴
vecN<T> 🟢 where T is supported
matCxR<T> 🟢 where T is f32 and C and R in {2,3,4}
array<E,N> 🔴
array<E> 🔴
struct 🔴

A time parameter is located at @group(0) binding(0), which is a u32. It represents the milliseconds elapsed since the program started.

Check the default shader (credit: kishimisu) for an example.