[{"data":1,"prerenderedAt":296,"buildId":297},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Finputs-passes":3,"github-stars":204,"guide-nav":206},{"id":4,"title":5,"body":6,"categoryId":188,"categorySlug":189,"categoryTitle":190,"curated":191,"description":192,"editUrl":193,"extension":194,"group":195,"groupTitle":196,"kind":190,"meta":197,"navigation":198,"path":199,"seo":200,"sourceUrl":193,"stem":201,"wordCount":202,"__hash__":203},"primitives\u002Fdocs\u002Fprimitives\u002F39.inputs-passes\u002Findex.md","Passes",{"type":7,"value":8,"toc":183},"minimark",[9,13,40,69,74,134,138,179],[10,11,5],"h1",{"id":12},"passes",[14,15,16,17,25,26,32,33,39],"p",{},"Full-screen passes as inputs: ",[18,19,21],"a",{"href":20},"\u002Fdocs\u002Fprimitives\u002Finputs-passes\u002Fpass",[22,23,24],"code",{},"pass"," runs your own WGSL into a texture (at a reduced resolution if you like), ",[18,27,29],{"href":28},"\u002Fdocs\u002Fprimitives\u002Finputs-passes\u002Fdownsample",[22,30,31],{},"downsample"," makes a cheap low-resolution copy of a source, and ",[18,34,36],{"href":35},"\u002Fdocs\u002Fprimitives\u002Finputs-passes\u002Fdirectionalblur",[22,37,38],{},"directionalBlur"," smears a source along a direction.",[41,42,47],"pre",{"className":43,"code":44,"language":45,"meta":46,"style":46},"language-ts shiki shiki-themes github-dark","import {directionalBlur, downsample, pass} from 'shaders\u002Fstd'\n","ts","",[22,48,49],{"__ignoreMap":46},[50,51,54,58,62,65],"span",{"class":52,"line":53},"line",1,[50,55,57],{"class":56},"snl16","import",[50,59,61],{"class":60},"s95oV"," {directionalBlur, downsample, pass} ",[50,63,64],{"class":56},"from",[50,66,68],{"class":67},"sU2Wk"," 'shaders\u002Fstd'\n",[70,71,73],"h2",{"id":72},"types","Types",[75,76,77,90],"table",{},[78,79,80],"thead",{},[81,82,83,87],"tr",{},[84,85,86],"th",{},"Type",[84,88,89],{},"What it is",[91,92,93,104,114,124],"tbody",{},[81,94,95,101],{},[96,97,98],"td",{},[22,99,100],{},"DirectionalBlurInput",[96,102,103],{},"interface DirectionalBlurInput extends InputNode { readonly kind: 'directionalBlur' readonly source: InputSource readonly angle: ScalarArg readonly length: ScalarArg }",[81,105,106,111],{},[96,107,108],{},[22,109,110],{},"DownsampleInput",[96,112,113],{},"interface DownsampleInput extends InputNode { readonly kind: 'downsample' readonly source: InputSource readonly scale: number }",[81,115,116,121],{},[96,117,118],{},[22,119,120],{},"PassFormat",[96,122,123],{},"The formats a pass may write.",[81,125,126,131],{},[96,127,128],{},[22,129,130],{},"PassInput",[96,132,133],{},"interface PassInput extends InputNode { readonly kind: 'pass' readonly body: string readonly scale: number readonly format: PassFormat }",[70,135,137],{"id":136},"words","Words",[139,140,142],"primitive-words",{":words":141},"[{\"name\":\"directionalBlur\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Finputs-passes\u002Fdirectionalblur\",\"summary\":\"A source smeared along a direction: `angle` in degrees (0 points right, 90 down), `length` in canvas pixels. 32 weighted taps along the streak, at half resolution.\"},{\"name\":\"downsample\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Finputs-passes\u002Fdownsample\",\"summary\":\"A smaller copy of a source, box-filtered so it does not alias.\"},{\"name\":\"pass\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Finputs-passes\u002Fpass\",\"summary\":\"Your own WGSL, rendered into a texture every frame before the body runs, read by name: `clouds(uv)`.\"}]",[143,144,145,161,168],"ul",{},[146,147,148,152,153,156,157,160],"li",{},[18,149,150],{"href":35},[22,151,38],{}," — A source smeared along a direction: ",[22,154,155],{},"angle"," in degrees (0 points right, 90 down), ",[22,158,159],{},"length"," in canvas pixels. 32 weighted taps along the streak, at half resolution.",[146,162,163,167],{},[18,164,165],{"href":28},[22,166,31],{}," — A smaller copy of a source, box-filtered so it does not alias.",[146,169,170,174,175,178],{},[18,171,172],{"href":20},[22,173,24],{}," — Your own WGSL, rendered into a texture every frame before the body runs, read by name: ",[22,176,177],{},"clouds(uv)",".",[180,181,182],"style",{},"html pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}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":46,"searchDepth":184,"depth":184,"links":185},2,[186,187],{"id":72,"depth":184,"text":73},{"id":136,"depth":184,"text":137},"inputs.passes","inputs-passes",null,false,"Full-screen passes as inputs: pass runs your own WGSL into a texture (at a reduced resolution if you like), downsample makes a cheap low-resolution copy of a source, and directionalBlur smears a source along a direction.","https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Finputs\u002Fpasses.ts","md","inputs","Inputs",{},true,"\u002Fdocs\u002Fprimitives\u002Finputs-passes",{"title":5,"description":192},"docs\u002Fprimitives\u002F39.inputs-passes\u002Findex",3,"w3u7Vo90N54g5Ysy9zR64lr8yTmXD2v7052Kk5vJ_-U",{"stars":205},6080,[207,211,215,219,223,227,231,235,239,243,247,251,255,259,263,267,271,276,280,284,288,292],{"path":208,"title":209,"description":210,"category":22},"\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":212,"title":213,"description":214,"category":22},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":216,"title":217,"description":218,"category":22},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":220,"title":221,"description":222,"category":22},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":224,"title":225,"description":226,"category":22},"\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":228,"title":229,"description":230,"category":22},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":232,"title":233,"description":234,"category":22},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":236,"title":237,"description":238,"category":22},"\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":240,"title":241,"description":242,"category":22},"\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":244,"title":245,"description":246,"category":22},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":248,"title":249,"description":250,"category":22},"\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":252,"title":253,"description":254,"category":22},"\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":256,"title":257,"description":258,"category":22},"\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":260,"title":261,"description":262,"category":22},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":264,"title":265,"description":266,"category":22},"\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":268,"title":269,"description":270,"category":22},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":272,"title":273,"description":274,"category":275},"\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":277,"title":278,"description":279,"category":275},"\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":281,"title":282,"description":283,"category":275},"\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":285,"title":286,"description":287,"category":22},"\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":289,"title":290,"description":291,"category":22},"\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":293,"title":294,"description":295,"category":22},"\u002Fdocs\u002Fguide\u002Fssr","Server rendering","Render Shaders in Next.js, Nuxt, SvelteKit, SolidStart and other SSR apps by keeping each shader on the client.",1796051186030,"06e02370-81a6-4d74-9931-661d71414be1"]