[{"data":1,"prerenderedAt":340,"buildId":341},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Finputs":3,"github-stars":248,"guide-nav":250},{"id":4,"title":5,"body":6,"categoryId":12,"categorySlug":12,"categoryTitle":237,"curated":238,"description":239,"editUrl":240,"extension":241,"group":12,"groupTitle":5,"kind":237,"meta":242,"navigation":243,"path":244,"seo":245,"sourceUrl":240,"stem":246,"wordCount":45,"__hash__":247},"primitives\u002Fdocs\u002Fprimitives\u002F36.inputs\u002Findex.md","Inputs",{"type":7,"value":8,"toc":232},"minimark",[9,13,32,61,66,206,210,228],[10,11,5],"h1",{"id":12},"inputs",[14,15,16,17,20,21,24,25,24,28,31],"p",{},"Inputs: what the engine computes for a component before its WGSL body runs. A blurred copy of the layer inside, the layer's own last frame, an extra pass at half resolution, a simulation, a particle field. List them in the definition's ",[18,19,12],"code",{}," and read each by name in WGSL: ",[18,22,23],{},"soft(uv)",", ",[18,26,27],{},"last(uv)",[18,29,30],{},"field.slope(uv)",".",[33,34,39],"pre",{"className":35,"code":36,"language":37,"meta":38,"style":38},"language-ts shiki shiki-themes github-dark","import {child} from 'shaders\u002Fstd'\n","ts","",[18,40,41],{"__ignoreMap":38},[42,43,46,50,54,57],"span",{"class":44,"line":45},"line",1,[42,47,49],{"class":48},"snl16","import",[42,51,53],{"class":52},"s95oV"," {child} ",[42,55,56],{"class":48},"from",[42,58,60],{"class":59},"sU2Wk"," 'shaders\u002Fstd'\n",[62,63,65],"h2",{"id":64},"types","Types",[67,68,69,82],"table",{},[70,71,72],"thead",{},[73,74,75,79],"tr",{},[76,77,78],"th",{},"Type",[76,80,81],{},"What it is",[83,84,85,100,110,120,134,144,172,182,196],"tbody",{},[73,86,87,93],{},[88,89,90],"td",{},[18,91,92],{},"ChildSource",[88,94,95,96,99],{},"The layer inside this one, as a source for an input (",[18,97,98],{},"blur(child, …)",").",[73,101,102,107],{},[88,103,104],{},[18,105,106],{},"InputBuildContext",[88,108,109],{},"What an input builder gets: the component's context and ways to reach its sources.",[73,111,112,117],{},[88,113,114],{},[18,115,116],{},"InputBuilder",[88,118,119],{},"The function that builds an input on the GPU.",[73,121,122,127],{},[88,123,124],{},[18,125,126],{},"InputInstance",[88,128,129,130,133],{},"One built input: its named outputs (",[18,131,132],{},"''"," is the default) and its per-frame GPU work.",[73,135,136,141],{},[88,137,138],{},[18,139,140],{},"InputNode",[88,142,143],{},"An input node: plain data plus its builder.",[73,145,146,151],{},[88,147,148],{},[18,149,150],{},"InputReadKind",[88,152,153,154,157,158,160,161,164,165,168,169,99],{},"How a body reads an output: ",[18,155,156],{},"uv"," samples it smoothly at a position (",[18,159,23],{},"), ",[18,162,163],{},"texel"," reads the one texel under a position exactly, unblended (values that must not mix across a boundary, like a nearest point or an index), ",[18,166,167],{},"index"," reads slot i of a list (",[18,170,171],{},"clicks(i)",[73,173,174,179],{},[88,175,176],{},[18,177,178],{},"InputSource",[88,180,181],{},"What an input can read: the child, an image\u002Fvideo\u002Flayer prop, or another input.",[73,183,184,189],{},[88,185,186],{},[18,187,188],{},"InputTexture",[88,190,191,192,195],{},"A texture an input produced or reads, as a TypeGPU texture created with ",[18,193,194],{},"sampled"," usage.",[73,197,198,203],{},[88,199,200],{},[18,201,202],{},"ScalarArg",[88,204,205],{},"A scalar argument: a number or a prop reference, read live each frame.",[62,207,209],{"id":208},"words","Words",[211,212,214],"primitive-words",{":words":213},"[{\"name\":\"child\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Finputs\u002Fchild\",\"summary\":\"The layer inside this one, as a source for an input.\"}]",[215,216,217],"ul",{},[218,219,220,227],"li",{},[221,222,224],"a",{"href":223},"\u002Fdocs\u002Fprimitives\u002Finputs\u002Fchild",[18,225,226],{},"child"," — The layer inside this one, as a source for an input.",[229,230,231],"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":38,"searchDepth":233,"depth":233,"links":234},2,[235,236],{"id":64,"depth":233,"text":65},{"id":208,"depth":233,"text":209},null,false,"Inputs: what the engine computes for a component before its WGSL body runs.","https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Finputs\u002Ftypes.ts","md",{},true,"\u002Fdocs\u002Fprimitives\u002Finputs",{"title":5,"description":239},"docs\u002Fprimitives\u002F36.inputs\u002Findex","-wq1zbhqu4WBoYBLvoUfdKxQoIODA4zSmn6HlVvAZ7w",{"stars":249},6080,[251,255,259,263,267,271,275,279,283,287,291,295,299,303,307,311,315,320,324,328,332,336],{"path":252,"title":253,"description":254,"category":18},"\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":256,"title":257,"description":258,"category":18},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":260,"title":261,"description":262,"category":18},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":264,"title":265,"description":266,"category":18},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":268,"title":269,"description":270,"category":18},"\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":272,"title":273,"description":274,"category":18},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":276,"title":277,"description":278,"category":18},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":280,"title":281,"description":282,"category":18},"\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":284,"title":285,"description":286,"category":18},"\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":288,"title":289,"description":290,"category":18},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":292,"title":293,"description":294,"category":18},"\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":296,"title":297,"description":298,"category":18},"\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":300,"title":301,"description":302,"category":18},"\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":304,"title":305,"description":306,"category":18},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":308,"title":309,"description":310,"category":18},"\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":312,"title":313,"description":314,"category":18},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":316,"title":317,"description":318,"category":319},"\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":321,"title":322,"description":323,"category":319},"\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":325,"title":326,"description":327,"category":319},"\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":329,"title":330,"description":331,"category":18},"\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":333,"title":334,"description":335,"category":18},"\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":337,"title":338,"description":339,"category":18},"\u002Fdocs\u002Fguide\u002Fssr","Server rendering","Render Shaders in Next.js, Nuxt, SvelteKit, SolidStart and other SSR apps by keeping each shader on the client.",1796051185935,"06e02370-81a6-4d74-9931-661d71414be1"]