Scala WebGPU Examples

simple_triangle

Raw WebGPU · vertices hardcoded in the shader

buffer_triangle

Vertex data from GPU buffers · buffer layouts

painter_triangle

Painter basics · Shade, Form, Shape, draw()

painter_typed_bindings

Type-safe named uniform bindings

painter_dsl

Shaders written in the Scala DSL · WgslFn helpers

panel_triangle

Render to a Panel, then paint() and show()

panel_layer

Fullscreen plasma Layer · time + resolution uniforms

panel_tex

Panels as textures · nearest and linear samplers

blur

Multi-pass Gaussian blur · ping-pong layer chain

instances

100 rotating triangles · per-instance bindings

deferred

Deferred lighting · MRT G-buffer panel

mipmaps

Automatic mipmap generation · 4 mip levels

geometry3d_scene

Terrain, boxes, spheres · indexed, depth-tested

random_lines

Multi-buffer form · grow-only buffer reuse

noise_tests

All noise and hash functions · click to cycle