[{"data":1,"prerenderedAt":276,"buildId":277},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Fsim-grids\u002Fstage-pass":3,"github-stars":184,"guide-nav":186},{"id":4,"title":5,"body":6,"categoryId":168,"categorySlug":169,"categoryTitle":170,"curated":171,"description":16,"editUrl":172,"extension":173,"group":174,"groupTitle":175,"kind":176,"meta":177,"navigation":178,"path":179,"seo":180,"sourceUrl":181,"stem":182,"wordCount":172,"__hash__":183},"primitives\u002Fdocs\u002Fprimitives\u002F48.sim-grids\u002F4.stage-pass.md","stage.pass",{"type":7,"value":8,"toc":162},"minimark",[9,13,17,43,58,63,100,104,118,122,158],[10,11,5],"h1",{"id":12},"stagepass",[14,15,16],"p",{},"One GPU pass, the same every frame.",[18,19,24],"pre",{"className":20,"code":21,"language":22,"meta":23,"style":23},"language-ts shiki shiki-themes github-dark","stage.pass(step: ComputeStep): GridStage\n","ts","",[25,26,27],"code",{"__ignoreMap":23},[28,29,32,36,40],"span",{"class":30,"line":31},"line",1,[28,33,35],{"class":34},"s95oV","stage.",[28,37,39],{"class":38},"svObZ","pass",[28,41,42],{"class":34},"(step: ComputeStep): GridStage\n",[14,44,45,46,49,50,53,54,57],{},"Import ",[25,47,48],{},"sim"," from ",[25,51,52],{},"shaders\u002Fstd"," and use ",[25,55,56],{},"sim.grids.stage.pass",".",[59,60,62],"h2",{"id":61},"parameters","Parameters",[64,65,66,82],"table",{},[67,68,69],"thead",{},[70,71,72,76,79],"tr",{},[73,74,75],"th",{},"Name",[73,77,78],{},"Type",[73,80,81],{},"Notes",[83,84,85],"tbody",{},[70,86,87,93,98],{},[88,89,90],"td",{},[25,91,92],{},"step",[88,94,95],{},[25,96,97],{},"ComputeStep",[88,99],{},[59,101,103],{"id":102},"example","Example",[18,105,107],{"className":20,"code":106,"language":22,"meta":23,"style":23},"stage.pass(update)\n",[25,108,109],{"__ignoreMap":23},[28,110,111,113,115],{"class":30,"line":31},[28,112,35],{"class":34},[28,114,39],{"class":38},[28,116,117],{"class":34},"(update)\n",[59,119,121],{"id":120},"see-also","See also",[123,124,125,136,149],"ul",{},[126,127,128,135],"li",{},[129,130,132],"a",{"href":131},"\u002Fdocs\u002Fprimitives\u002Fsim-grids\u002Fstage-cache",[25,133,134],{},"stage.cache"," — A GPU pass chosen per frame, for a pass whose input is rebound after the frame starts.",[126,137,138,144,145,148],{},[129,139,141],{"href":140},"\u002Fdocs\u002Fprimitives\u002Fsim-grids\u002Fstage-iterate",[25,142,143],{},"stage.iterate"," — Run a step ",[25,146,147],{},"count"," times this frame.",[126,150,151,157],{},[129,152,154],{"href":153},"\u002Fdocs\u002Fprimitives\u002Fsim-grids\u002Fstage-publish",[25,155,156],{},"stage.publish"," — The last stage: write the state into the texture the layer samples.",[159,160,161],"style",{},"html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":23,"searchDepth":163,"depth":163,"links":164},2,[165,166,167],{"id":61,"depth":163,"text":62},{"id":102,"depth":163,"text":103},{"id":120,"depth":163,"text":121},"sim.grids","sim-grids","Grid programs",false,null,"md","simulation","Simulation","function",{},true,"\u002Fdocs\u002Fprimitives\u002Fsim-grids\u002Fstage-pass",{"title":5,"description":16},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fsim\u002Fgrids.ts#L274","docs\u002Fprimitives\u002F48.sim-grids\u002F4.stage-pass","F8yNUpv231ScxvkOis4v82xVcwOJutktBuyxOBPHr0I",{"stars":185},6080,[187,191,195,199,203,207,211,215,219,223,227,231,235,239,243,247,251,256,260,264,268,272],{"path":188,"title":189,"description":190,"category":25},"\u002Fdocs\u002Fguide","Getting started","Shaders is a desktop app where your AI agent designs interactive effects on an infinite canvas, and you shape them by hand.",{"path":192,"title":193,"description":194,"category":25},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":196,"title":197,"description":198,"category":25},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":200,"title":201,"description":202,"category":25},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":204,"title":205,"description":206,"category":25},"\u002Fdocs\u002Fguide\u002Fprops-reactivity","Props and reactivity","Bind props to your framework's state so effects update when it changes, and animate props with an animation library.",{"path":208,"title":209,"description":210,"category":25},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":212,"title":213,"description":214,"category":25},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":216,"title":217,"description":218,"category":25},"\u002Fdocs\u002Fguide\u002Flayout-positioning","Layout and positioning","Size and place a shader in your page with CSS, as a background, a fill, or an inline block.",{"path":220,"title":221,"description":222,"category":25},"\u002Fdocs\u002Fguide\u002Fsizing-and-units","Sizing and units","Size and place layers in CSS units (px, %, vw, rem, and canvas units) that stay correct as the canvas and window resize.",{"path":224,"title":225,"description":226,"category":25},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":228,"title":229,"description":230,"category":25},"\u002Fdocs\u002Fguide\u002Fshape-effects","Shape effects","Pick the 2D, 3D or custom SVG shape that Glass, Neon, Emboss and other shape effects draw inside.",{"path":232,"title":233,"description":234,"category":25},"\u002Fdocs\u002Fguide\u002Fcolor-space","Color space","Match colors to your design tool with the output color space, and keep bright layers from clipping with tone mapping.",{"path":236,"title":237,"description":238,"category":25},"\u002Fdocs\u002Fguide\u002Fhooks-events","Hooks and events","Run code when an effect is ready to show, and show a fallback when the GPU can't run it.",{"path":240,"title":241,"description":242,"category":25},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":244,"title":245,"description":246,"category":25},"\u002Fdocs\u002Fguide\u002Fcustom-shaders","Custom components","Write your own component in TypeScript, use it like any component in the library, and write WGSL by hand when you need to.",{"path":248,"title":249,"description":250,"category":25},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":252,"title":253,"description":254,"category":255},"\u002Fdocs\u002Fguide\u002Fmcp","Working with your agent","The Shaders MCP connects your AI agent to the desktop app, so it can design shaders on your canvas and install them in your project.","workflows",{"path":257,"title":258,"description":259,"category":255},"\u002Fdocs\u002Fguide\u002Fcli","Working with the CLI","The Shaders CLI installs shaders from your projects and the Pro library into your codebase as component files, and keeps them in sync as you keep designing.",{"path":261,"title":262,"description":263,"category":255},"\u002Fdocs\u002Fguide\u002Fframeworks","Supported frameworks","Shaders runs in any web project that renders in a browser with WebGPU, with components for React, Vue, Svelte and Solid and a JavaScript API for everything else.",{"path":265,"title":266,"description":267,"category":25},"\u002Fdocs\u002Fguide\u002Fagent-skill","Agent skill for the engine","Teach your coding agent to write Shaders code with the open-source engine, for when it's working in your codebase instead of on the canvas.",{"path":269,"title":270,"description":271,"category":25},"\u002Fdocs\u002Fguide\u002Fvideo-rendering","Rendering to video","Render a shader effect to video frame by frame, from Remotion, Hyperframes or your own headless Chrome script.",{"path":273,"title":274,"description":275,"category":25},"\u002Fdocs\u002Fguide\u002Fssr","Server rendering","Render Shaders in Next.js, Nuxt, SvelteKit, SolidStart and other SSR apps by keeping each shader on the client.",1796051187279,"06e02370-81a6-4d74-9931-661d71414be1"]