# TypeGPU Kit > GPU modules on TypeGPU for WebGPU and React Native. A module borrows the caller's TypeGPU root and records into the encoder or pass it is given; the caller owns the device, the loop and the submit. These pages describe `@typegpu/kit` 0.1.1. If `@typegpu/kit` is installed, read `node_modules/@typegpu/kit/docs/` and its `skills/typegpu-kit/SKILL.md` instead of this site. They match the installed code. Every page is served as Markdown at its address with `.md` in place of the trailing slash. [modules.md](https://docs.swmansion.com/typegpu-kit/modules.md) lists every module with its import, factories, options and bindings. ## Start - [TypeGPU Kit](https://docs.swmansion.com/typegpu-kit/index.md): Building blocks for TypeGPU. Interchangeable by design. Use what you want and fill the gaps with your own code. - [Getting started](https://docs.swmansion.com/typegpu-kit/getting-started.md): Install the kit, draw a first frame and host it as a scene, in a project of your own. - [How to read the docs](https://docs.swmansion.com/typegpu-kit/how-to-read.md): The four kinds of page, the parts of a module page, and what the marks on a module's card state. - [Starter scenes](https://docs.swmansion.com/typegpu-kit/starter-scenes.md): Four whole scenes to start from, a full-screen shader, a lit mesh with a shadow, a frame finished with bloom and particles stepped on the GPU. - [Platforms](https://docs.swmansion.com/typegpu-kit/platforms.md): Browser and React Native requirements for running TypeGPU Kit. ## Tutorials - [Slime mould](https://docs.swmansion.com/typegpu-kit/tutorials/slime-mould.md): Grow a slime mould of 400 000 agents from an empty canvas into glowing threads that find food, with no shader or TypeGPU experience. - [Domino run](https://docs.swmansion.com/typegpu-kit/tutorials/domino-run.md): Build 1 474 dominoes on a walnut floor in low sunlight and simulate their fall on the GPU from the one you tap. - [Write a module](https://docs.swmansion.com/typegpu-kit/tutorials/write-a-module.md): Write a module that moves 65 536 particles through noise, use it from your scene and test what it records. ## Concepts - [How the kit works](https://docs.swmansion.com/typegpu-kit/concepts/how-the-kit-works.md): One frame written in plain TypeGPU, then piece by piece with the kit, and the seven rules every module follows. - [Modules](https://docs.swmansion.com/typegpu-kit/concepts/modules.md): The contract every TypeGPU Kit module follows, and how to write one. - [Connecting modules](https://docs.swmansion.com/typegpu-kit/concepts/connecting-modules.md): How a shader in one module reads the buffers and textures of another, and how the kit's own modules do it. - [Scenes and passes](https://docs.swmansion.com/typegpu-kit/concepts/scenes-and-passes.md): Say once which textures a frame draws into and what each holds, and every renderer draws into the scene, its shadow and every other view. - [Data on the GPU](https://docs.swmansion.com/typegpu-kit/concepts/data-on-the-gpu.md): Keep objects as rows in buffers, move them on the GPU on a fixed step, and read results back without waiting. ## Recipes - [Light from textures](https://docs.swmansion.com/typegpu-kit/recipes/light-from-textures.md): Keep light in a texture, computed once or every frame, and have the lighting read it at each shaded point. - [A finished look for model scenes](https://docs.swmansion.com/typegpu-kit/recipes/lit-models.md): A scene of many copies of loaded models with sun shadows, soft contact shadows, smooth edges, glow and a colour grade, in one file you can copy. - [Dark scenes](https://docs.swmansion.com/typegpu-kit/recipes/dark-scenes.md): Settings that keep a night scene dark, from the sky to the final pass. - [Effects you can scrub](https://docs.swmansion.com/typegpu-kit/recipes/scrubbed-effects.md): Draw particles from their seed and the time since the effect started, so a replay can jump to any moment. - [Beside other renderers](https://docs.swmansion.com/typegpu-kit/recipes/other-renderers.md): Share one device with three.js or vgpu and pass buffers, textures and images between them and the kit. ## Core - [Frames](https://docs.swmansion.com/typegpu-kit/kit/frames.md): A frame loop that hands you one command encoder each frame and submits it once, with the time and callbacks that run after the submit. - [Clock](https://docs.swmansion.com/typegpu-kit/kit/clock.md): Simulation steps of a set length, work that is due every few frames, and easing and springs that keep their pace at any display rate. - [Coroutines](https://docs.swmansion.com/typegpu-kit/kit/coroutines.md): Functions that pause at yield* and resume when your frame calls the scheduler. - [Pipeline warm-up](https://docs.swmansion.com/typegpu-kit/kit/pipelines.md): Compile pipelines behind a loading screen, list each stage's bindings, and find the pipelines warm-up missed. - [Passes](https://docs.swmansion.com/typegpu-kit/kit/passes.md): Describe a frame's render targets once, so every renderer writes colour, depth and whatever else a later pass reads. - [History](https://docs.swmansion.com/typegpu-kit/kit/history.md): Write a shader function once and run it with this frame's values or last frame's, to find how far each point on screen has moved. - [Render targets](https://docs.swmansion.com/typegpu-kit/kit/targets.md): Textures that share a size, replaced together when the size changes. - [Baker](https://docs.swmansion.com/typegpu-kit/kit/baker.md): Bake a 'use gpu' function of a texel's position into a texture, in your encoder or compute pass. - [Mipmaps](https://docs.swmansion.com/typegpu-kit/kit/mipmaps.md): Fill a texture's mip levels in your encoder, each texel combining a 2×2 block of the level above. - [Cameras](https://docs.swmansion.com/typegpu-kit/kit/cameras.md): Orbit, flat, custom and layered cameras with shader accessors, eased motion and last-frame views. - [Shared bindings](https://docs.swmansion.com/typegpu-kit/kit/bindings.md): Put the buffers and textures that several modules bind into one bind group layout you own, and swap any of them without rebuilding a pipeline. - [Tables](https://docs.swmansion.com/typegpu-kit/kit/table.md): Per-object rows with separate buffers for CPU and GPU writes, so uploads preserve kernel updates. - [Live lists](https://docs.swmansion.com/typegpu-kit/kit/live-lists.md): Live rows per group, with indirect draw and dispatch arguments, written on the GPU every frame. - [State machines](https://docs.swmansion.com/typegpu-kit/kit/machines.md): Define states and transitions once, then run them per row on the GPU or per machine on the CPU. - [Neighbour grid](https://docs.swmansion.com/typegpu-kit/kit/grid.md): Items sorted into cells each step, so that a kernel reads only the items near each one. - [Workgroup reduce and scan](https://docs.swmansion.com/typegpu-kit/kit/workgroup.md): Combine one value from every invocation of a compute workgroup into a single result, or into a running result for each of them. - [Sorter](https://docs.swmansion.com/typegpu-kit/kit/sorter.md): Sort a buffer of keys on the GPU, carrying a payload such as indices along with them. - [Readback](https://docs.swmansion.com/typegpu-kit/kit/readback.md): Copy a buffer into your frame's encoder and read it on the CPU after submit without stalling. - [Counters](https://docs.swmansion.com/typegpu-kit/kit/counters.md): Named counters that kernels increment and the CPU reads as changes since its last read. - [Picker](https://docs.swmansion.com/typegpu-kit/kit/picker.md): Find a candidate under the pointer on the GPU, then use it in the same frame or read it back to the CPU. - [Surfaces](https://docs.swmansion.com/typegpu-kit/kit/web.md): A canvas configured for your root, with a drawing buffer that follows its layout, on the web and React Native. - [Hosting scenes](https://docs.swmansion.com/typegpu-kit/kit/hosting.md): Run a scene file on a web or React Native canvas, with its root, surface, loop, errors and teardown handled in order. - [Testing](https://docs.swmansion.com/typegpu-kit/kit/testing.md): Check what a module records in plain Node, then compile its WGSL on a real device. - [GPU debug panel](https://docs.swmansion.com/typegpu-kit/kit/gpu-debug.md): A panel that profiles any WebGPU page without changing its program. - [Profiler](https://docs.swmansion.com/typegpu-kit/kit/profiler.md): GPU timers for your passes, on one query set, read back without stalling. ## Rendering - [Meshes](https://docs.swmansion.com/typegpu-kit/kit/meshes.md): Boxes, planes, spheres and other shapes, computed in the vertex shader or baked into buffers. - [Mesh pool](https://docs.swmansion.com/typegpu-kit/kit/mesh-pool.md): Shapes and glTF models in shared buffers, so one pipeline draws any of them. - [Instances](https://docs.swmansion.com/typegpu-kit/kit/instances.md): Draw lit copies of mesh-pool meshes with one row per instance and one draw per mesh. - [Impostors](https://docs.swmansion.com/typegpu-kit/kit/impostors.md): Capture mesh models into an atlas and draw lit, shadowed cards. - [Poses](https://docs.swmansion.com/typegpu-kit/kit/poses.md): Play a character's animations on its skeleton and blend between them on the GPU each frame. - [Lines](https://docs.swmansion.com/typegpu-kit/kit/lines.md): Polylines with joins, caps and dashes, a whole set in one draw. - [Lighting](https://docs.swmansion.com/typegpu-kit/kit/lighting.md): A sun, a sky, fog and point lights, and the shading your own shaders call. - [Environment light](https://docs.swmansion.com/typegpu-kit/kit/environment.md): Reflections and soft light on every surface, from a panorama photo, six images or a sky. - [Ambient occlusion](https://docs.swmansion.com/typegpu-kit/kit/ao.md): Darker sky light in creases and contacts, read from a depth prepass. ## Post-processing - [Final pass](https://docs.swmansion.com/typegpu-kit/kit/finish.md): The last pass of a frame, mapping linear light to the screen through a tone curve, bloom and your own grade. - [FXAA](https://docs.swmansion.com/typegpu-kit/kit/fxaa.md): Smooth stepped edges in the finished picture with one full-screen pass. - [Temporal antialiasing](https://docs.swmansion.com/typegpu-kit/kit/taa.md): Smooth stepped edges and shimmer by gathering samples over several frames. - [Depth of field](https://docs.swmansion.com/typegpu-kit/kit/dof.md): Blur by distance from a focus, with near objects spreading over what is sharp behind them. ## Particles - [Particles](https://docs.swmansion.com/typegpu-kit/kit/particles.md): GPU particles with your own update and shading. - [Trails](https://docs.swmansion.com/typegpu-kit/kit/trails.md): Ribbons behind moving things, pushed from kernels or written from the CPU. ## Text - [Text](https://docs.swmansion.com/typegpu-kit/kit/text.md): Labels and on-screen text that stay sharp at any size, from a font you bake at build time, with no WebAssembly on the device. ## Assets - [glTF models](https://docs.swmansion.com/typegpu-kit/kit/gltf.md): Read a glTF model file into arrays on the CPU for its meshes, materials, skeleton and animations. - [Textures from images](https://docs.swmansion.com/typegpu-kit/kit/images.md): Load image files as GPU textures, as colour or as data, with the smaller copies a distant surface reads and a sampler for them. - [Camera and video](https://docs.swmansion.com/typegpu-kit/kit/video.md): Copy camera or video frames into a texture you own, fitted, turned and mirrored, or sample the newest frame in place without a copy. ## Examples - [Jelly world](https://docs.swmansion.com/typegpu-kit/examples/jelly-world.md): A ray-marched jelly slider to squish and stretch. Give it a few seconds. - [Classroom](https://docs.swmansion.com/typegpu-kit/examples/classroom.md): Blender's Classroom with baked lightmaps and sunbeams through the dust. - [Night market](https://docs.swmansion.com/typegpu-kit/examples/night-market.md): A potion stall on a rainy night, lit by a lantern, a fire and two lamps. - [Afterimage](https://docs.swmansion.com/typegpu-kit/examples/afterimage.md): A Foucault pendulum in a sunlit concrete hall, drawn like a PS2-era game. - [Cloister](https://docs.swmansion.com/typegpu-kit/examples/cloister.md): A cloister at the blue hour, its lanterns casting shadows through the arches. - [Fireworks](https://docs.swmansion.com/typegpu-kit/examples/fireworks.md): Fireworks over a castle lake. Every burst lights up everything around it. - [Hex isle](https://docs.swmansion.com/typegpu-kit/examples/hex-isle.md): A hex-tile island through a whole day, shot like a tilt-shift miniature. - [Forest](https://docs.swmansion.com/typegpu-kit/examples/forest.md): 20 000 trees in the wind, culled on the GPU every frame. - [Quiver trees](https://docs.swmansion.com/typegpu-kit/examples/quiver-trees.md): 8 000 scanned trees and boulders that turn into impostor cards past 40 m. - [Kinetic](https://docs.swmansion.com/typegpu-kit/examples/kinetic.md): A Calder mobile turning under a GPU-baked sky, from noon to dusk. - [Falling sand](https://docs.swmansion.com/typegpu-kit/examples/falling-sand.md): Paint sand, water and lava into a cave lit only by its own glow. - [Ocean](https://docs.swmansion.com/typegpu-kit/examples/ocean.md): A near gale at dusk, with FFT waves, foam on the crests and a low sun. - [Censer](https://docs.swmansion.com/typegpu-kit/examples/censer.md): Incense smoke from a swinging censer, simulated in 3D on the GPU. - [Slime mould](https://docs.swmansion.com/typegpu-kit/examples/slime-mould.md): 400 000 agents grow a slime mould network toward the food you drop. - [Domino run](https://docs.swmansion.com/typegpu-kit/examples/dominoes.md): 1 474 dominoes in late sun. Tap one and the wave runs. - [SPH sculpt](https://docs.swmansion.com/typegpu-kit/examples/sph-sculpt.md): Dig channels in clay and the spring water finds its way downhill. - [Fish tank](https://docs.swmansion.com/typegpu-kit/examples/fishtank.md): 3 340 schooling fish as GPU boids. Press F to feed them. - [Benthos](https://docs.swmansion.com/typegpu-kit/examples/benthos.md): Light through deep water and marine snow. Move the pointer to stir it. - [Ember mirror](https://docs.swmansion.com/typegpu-kit/examples/ember-mirror.md): Move in front of the camera and your outline sheds embers. - [Stampede](https://docs.swmansion.com/typegpu-kit/examples/stampede.md): 4 096 horses in a golden valley. Spook them and the panic spreads. - [Skeletons](https://docs.swmansion.com/typegpu-kit/examples/skeletons.md): 300 skeletons brawling in a moonlit courtyard, run by a GPU state machine. - [Jellies](https://docs.swmansion.com/typegpu-kit/examples/jellies.md): Translucent jellyfish drawn in any order. Tap one and it flashes. - [Spider](https://docs.swmansion.com/typegpu-kit/examples/spider.md): A spider walking over GPU-made hills toward wherever you point. - [Robot arm](https://docs.swmansion.com/typegpu-kit/examples/robot-arm.md): A toy robot arm stacking painted blocks by colour. Tap one to move it. - [Solar system](https://docs.swmansion.com/typegpu-kit/examples/solar-system.md): Planets wrapped in their own facts. Tap one and its details type out. - [Star map](https://docs.swmansion.com/typegpu-kit/examples/star-map.md): 20 000 stars. Hover one and the GPU picks it in the same frame. - [Survey model](https://docs.swmansion.com/typegpu-kit/examples/survey-model.md): An island as a stack of contour rings, traced on the GPU. - [Platformer](https://docs.swmansion.com/typegpu-kit/examples/platformer.md): A pixel-art platformer printed on paper cards under a desk lamp. - [Blockfall](https://docs.swmansion.com/typegpu-kit/examples/blockfall.md): A 3D falling-block puzzle in stone and glass. Clear a layer and it shatters. - [Lattice](https://docs.swmansion.com/typegpu-kit/examples/lattice.md): Thin beams and rising embers, smoothed over time with TAA. - [Raymarch](https://docs.swmansion.com/typegpu-kit/examples/raymarch.md): Five balls melting into a cube, ray-marched in one pass. - [Flow field](https://docs.swmansion.com/typegpu-kit/examples/flow-field.md): 65 536 particles flowing along Perlin noise. - [Jump flood](https://docs.swmansion.com/typegpu-kit/examples/jump-flood.md): A map of 48 drifting towns whose borders redraw every frame.