[{"data":1,"prerenderedAt":321,"buildId":322},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Finputs-blur\u002Fblur":3,"github-stars":229,"guide-nav":231},{"id":4,"title":5,"body":6,"categoryId":214,"categorySlug":215,"categoryTitle":216,"curated":217,"description":15,"editUrl":218,"extension":219,"group":126,"groupTitle":220,"kind":221,"meta":222,"navigation":223,"path":224,"seo":225,"sourceUrl":226,"stem":227,"wordCount":218,"__hash__":228},"primitives\u002Fdocs\u002Fprimitives\u002F37.inputs-blur\u002F1.blur.md","blur",{"type":7,"value":8,"toc":209},"minimark",[9,12,16,38,48,57,62,113,117,170,174,205],[10,11,5],"h1",{"id":5},[13,14,15],"p",{},"A blurred copy of a source, read in WGSL by the name you list it under.",[17,18,23],"pre",{"className":19,"code":20,"language":21,"meta":22,"style":22},"language-ts shiki shiki-themes github-dark","blur(source: InputSource, opts: {radius: ScalarArg}): BlurInput\n","ts","",[24,25,26],"code",{"__ignoreMap":22},[27,28,31,34],"span",{"class":29,"line":30},"line",1,[27,32,5],{"class":33},"svObZ",[27,35,37],{"class":36},"s95oV","(source: InputSource, opts: {radius: ScalarArg}): BlurInput\n",[13,39,40,41,43,44,47],{},"Import ",[24,42,5],{}," from ",[24,45,46],{},"shaders\u002Fstd",".",[13,49,50,53,54,47],{},[24,51,52],{},"radius"," is in canvas pixels (a number or a prop). The blur runs at a fixed working resolution, so its cost does not grow with the canvas. Colour comes back with straight alpha, like ",[24,55,56],{},"child",[58,59,61],"h2",{"id":60},"parameters","Parameters",[63,64,65,81],"table",{},[66,67,68],"thead",{},[69,70,71,75,78],"tr",{},[72,73,74],"th",{},"Name",[72,76,77],{},"Type",[72,79,80],{},"Notes",[82,83,84,99],"tbody",{},[69,85,86,92,97],{},[87,88,89],"td",{},[24,90,91],{},"source",[87,93,94],{},[24,95,96],{},"InputSource",[87,98],{},[69,100,101,106,111],{},[87,102,103],{},[24,104,105],{},"opts",[87,107,108],{},[24,109,110],{},"{radius: ScalarArg}",[87,112],{},[58,114,116],{"id":115},"example","Example",[17,118,120],{"className":19,"code":119,"language":21,"meta":22,"style":22},"inputs: {soft: blur(child, {radius: p('softness')})},\neffect: wgsl`return mix(child, soft(uv), smoothstep(0.2, 0.6, uv.y));`,\n",[24,121,122,153],{"__ignoreMap":22},[27,123,124,127,130,133,136,138,141,143,146,150],{"class":29,"line":30},[27,125,126],{"class":33},"inputs",[27,128,129],{"class":36},": {",[27,131,132],{"class":33},"soft",[27,134,135],{"class":36},": ",[27,137,5],{"class":33},[27,139,140],{"class":36},"(child, {radius: ",[27,142,13],{"class":33},[27,144,145],{"class":36},"(",[27,147,149],{"class":148},"sU2Wk","'softness'",[27,151,152],{"class":36},")})},\n",[27,154,156,159,161,164,167],{"class":29,"line":155},2,[27,157,158],{"class":33},"effect",[27,160,135],{"class":36},[27,162,163],{"class":33},"wgsl",[27,165,166],{"class":148},"`return mix(child, soft(uv), smoothstep(0.2, 0.6, uv.y));`",[27,168,169],{"class":36},",\n",[58,171,173],{"id":172},"see-also","See also",[175,176,177,188,197],"ul",{},[178,179,180,187],"li",{},[181,182,184],"a",{"href":183},"\u002Fdocs\u002Fprimitives\u002Feffects-blurs\u002Fbloom",[24,185,186],{},"bloom"," — A glow: the child's bright parts spread into a soft halo that adds back on top.",[178,189,190,196],{},[181,191,193],{"href":192},"\u002Fdocs\u002Fprimitives\u002Finputs-passes\u002Fdownsample",[24,194,195],{},"downsample"," — A smaller copy of a source, box-filtered so it does not alias.",[178,198,199,204],{},[181,200,202],{"href":201},"\u002Fdocs\u002Fprimitives\u002Finputs\u002Fchild",[24,203,56],{}," — The layer inside this one, as a source for an input.",[206,207,208],"style",{},"html pre.shiki code .svObZ, html code.shiki .svObZ{--shiki-default:#B392F0}html pre.shiki code .s95oV, html code.shiki .s95oV{--shiki-default:#E1E4E8}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);}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}",{"title":22,"searchDepth":155,"depth":155,"links":210},[211,212,213],{"id":60,"depth":155,"text":61},{"id":115,"depth":155,"text":116},{"id":172,"depth":155,"text":173},"inputs.blur","inputs-blur","Blur",false,null,"md","Inputs","function",{},true,"\u002Fdocs\u002Fprimitives\u002Finputs-blur\u002Fblur",{"title":5,"description":15},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Finputs\u002Fblur.ts#L36","docs\u002Fprimitives\u002F37.inputs-blur\u002F1.blur","ewE59fyv4o2C-7YODtEHC3vL5bmboTiLg5TQ1rXyHoo",{"stars":230},6080,[232,236,240,244,248,252,256,260,264,268,272,276,280,284,288,292,296,301,305,309,313,317],{"path":233,"title":234,"description":235,"category":24},"\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":237,"title":238,"description":239,"category":24},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":241,"title":242,"description":243,"category":24},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":245,"title":246,"description":247,"category":24},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":249,"title":250,"description":251,"category":24},"\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":253,"title":254,"description":255,"category":24},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":257,"title":258,"description":259,"category":24},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":261,"title":262,"description":263,"category":24},"\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":265,"title":266,"description":267,"category":24},"\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":269,"title":270,"description":271,"category":24},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":273,"title":274,"description":275,"category":24},"\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":277,"title":278,"description":279,"category":24},"\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":281,"title":282,"description":283,"category":24},"\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":285,"title":286,"description":287,"category":24},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":289,"title":290,"description":291,"category":24},"\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":293,"title":294,"description":295,"category":24},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":297,"title":298,"description":299,"category":300},"\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":302,"title":303,"description":304,"category":300},"\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":306,"title":307,"description":308,"category":300},"\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":310,"title":311,"description":312,"category":24},"\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":314,"title":315,"description":316,"category":24},"\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":318,"title":319,"description":320,"category":24},"\u002Fdocs\u002Fguide\u002Fssr","Server rendering","Render Shaders in Next.js, Nuxt, SvelteKit, SolidStart and other SSR apps by keeping each shader on the client.",1796051185994,"06e02370-81a6-4d74-9931-661d71414be1"]