# Shader Bay > A WebGPU shader playground. A project is a JSON manifest plus plain standard > WGSL files — no preprocessor, no dialect, no generated code. Projects run in > the browser on the viewer's own GPU; the server never compiles or executes > shaders. This site publishes its complete authoring contract so that an AI can > write a project, compile it against a real GPU, and open the result in the > user's editor without a human in the loop. If you were asked to write a shader for Shader Bay, read the agent guide first: it describes how to compile your work and see the picture you produced, which is not something the server can do for you. ## Start here - [Agent guide](https://shaderbay.com/reference/agent.md): The loop: write, compile on a real GPU, read diagnostics, hand the result to the editor. Start here. - [Authoring reference](https://shaderbay.com/reference/authoring.md): The complete contract: manifest, bindings, the frame uniform, parameters, resources, passes, reserved words, the standard library. - [project.json schema](https://shaderbay.com/reference/project.schema.json): JSON Schema 2020-12 for the manifest, with the enumerations the validator actually enforces. - [Bundle schema](https://shaderbay.com/reference/bundle.schema.json): JSON Schema for { manifest, files } — the form in which projects are exchanged. - [Fact tables](https://shaderbay.com/reference/facts.json): Texture formats and their storage capabilities, WGSL reserved words, the Frame uniform layout, size limits, manifest constants. - [Standard library index](https://shaderbay.com/reference/stdlib.json): Every stdlib module with each function's signature and doc comment, its constants, structs and dependencies. - [Check page](https://shaderbay.com/check): loads a bundle, compiles it on the local GPU and returns diagnostics, statistics and a PNG. Drive it with `window.shaderBay.check(bundle)`, `?src=` or `#p=`. - [Editor](https://shaderbay.com/): open a finished bundle with `#new=` or `?open=`. ## Standard library sources - [stdlib: camera](https://shaderbay.com/reference/stdlib/camera.wgsl): Ray construction from a pixel, look-at basis, orbit camera from mouse. - [stdlib: color](https://shaderbay.com/reference/stdlib/color.wgsl): sRGB transfer, luminance, tonemapReinhard/Aces/Filmic, hsv2rgb/rgb2hsv, cosine palettes. - [stdlib: fluid](https://shaderbay.com/reference/stdlib/fluid.wgsl): Grid helpers: inBounds, clamped loads, gradient/divergence/curl/laplacian stencils, mouseToCells. - [stdlib: hash](https://shaderbay.com/reference/stdlib/hash.wgsl): PCG integer hashes and hash11/21/22/31/33 pseudo-random floats. - [stdlib: math](https://shaderbay.com/reference/stdlib/math.wgsl): PI/TAU, rot2/rotX/rotY/rotZ, remap, smin/smax, aastep, impulse, cubicPulse. - [stdlib: noise](https://shaderbay.com/reference/stdlib/noise.wgsl): valueNoise2/3, perlin2/3, simplex2, fbm2/3, ridged2, curl2/curl3. - [stdlib: sdf2d](https://shaderbay.com/reference/stdlib/sdf2d.wgsl): 2D signed distance shapes (circle, box, segment, hexagon, star) and boolean/smooth operators. - [stdlib: sdf3d](https://shaderbay.com/reference/stdlib/sdf3d.wgsl): 3D signed distance primitives (sphere, box, torus, capsule, cylinder) and operators (smooth union, repeat, twist). - [stdlib: frame](https://shaderbay.com/reference/stdlib/frame.wgsl): Frame uniform (resolution, time, mouse, keys) at @group(0) @binding(0); keyDown(). - [stdlib: fullscreen](https://shaderbay.com/reference/stdlib/fullscreen.wgsl): Default fullscreen vertex shader plus fragCoord()/fragUv() helpers for render passes. - [stdlib: image_main](https://shaderbay.com/reference/stdlib/image_main.wgsl): Fullscreen vertex + fragment wrapper calling mainImage(fragCoord) for image mode. ## Example projects - [example: 01-gradient](https://shaderbay.com/reference/examples/01-gradient.json): The smallest possible project: one function that returns a colour for every pixel. Start here. - [example: 02-uv-shapes](https://shaderbay.com/reference/examples/02-uv-shapes.json): Signed distance functions from the stdlib draw crisp, anti-aliased shapes: a circle, a rounded box and a ring, combined with smooth union. - [example: 03-time-mouse](https://shaderbay.com/reference/examples/03-time-mouse.json): Everything the frame uniform gives you: time-based animation, the mouse position, the press state and keyboard input, drawn as a small dashboard. Click the canvas, then hold the arrow keys (indicators bottom-right). - [example: 04-params](https://shaderbay.com/reference/examples/04-params.json): Expose values as sliders, colour pickers and checkboxes: declare a struct Params in WGSL and describe the UI in project.json. Works in image mode too. - [example: 05-noise-fbm](https://shaderbay.com/reference/examples/05-noise-fbm.json): Using the stdlib: layered Perlin noise (fBm) with domain warping, coloured by a cosine palette. Libraries are listed per pass in project.json and concatenated as plain WGSL. - [example: 06-raymarch-intro](https://shaderbay.com/reference/examples/06-raymarch-intro.json): A 3D scene without triangles: march rays against a signed distance field, shade with normals, soft shadows and fog. Drag to orbit the camera. - [example: 07-compute-to-texture](https://shaderbay.com/reference/examples/07-compute-to-texture.json): A compute shader writes a texture with textureStore, then a render pass samples it. The first step from image shaders towards GPU simulations. - [example: 08-feedback-pingpong](https://shaderbay.com/reference/examples/08-feedback-pingpong.json): A compute pass reads the previous frame and writes the next one, a render pass shows it. Drag with the mouse to paint; the trail fades over time. - [example: 09-particles](https://shaderbay.com/reference/examples/09-particles.json): 65 536 particles in a storage buffer: a compute pass integrates them through a curl-noise flow field, a custom vertex shader draws each one as an additive quad. Hold the mouse to attract them. - [example: attractor-3d](https://shaderbay.com/reference/examples/attractor-3d.json): A quarter of a million points chasing the Thomas attractor in 3D, integrated in a compute pass and projected by a slowly orbiting camera in the vertex shader. Drag to rotate. - [example: fluid-2d](https://shaderbay.com/reference/examples/fluid-2d.json): Stable-fluids smoke simulation: semi-Lagrangian advection, vorticity confinement, Jacobi pressure solve and dye transport, each step its own compute pass. Drag to stir. - [example: game-of-life](https://shaderbay.com/reference/examples/game-of-life.json): Conway's cellular automaton on an r32uint ping-pong texture: an init pass seeds it once, a step pass runs every third frame, and you can paint cells with the mouse. - [example: reaction-diffusion](https://shaderbay.com/reference/examples/reaction-diffusion.json): Gray–Scott reaction–diffusion: two chemicals diffuse and react into coral-like patterns. Several simulation steps run per frame; feed and kill rates change the species of pattern. Drag to seed. - [example: sdf-scene](https://shaderbay.com/reference/examples/sdf-scene.json): A ray-marched hall of twisted columns repeating to the horizon, lit by a moving sun with soft shadows, ambient occlusion and atmospheric fog. Drag to look around.