[{"data":1,"prerenderedAt":341,"buildId":342},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Finputs-bloom\u002Fbloom":3,"github-stars":249,"guide-nav":251},{"id":4,"title":5,"body":6,"categoryId":234,"categorySlug":235,"categoryTitle":236,"curated":237,"description":15,"editUrl":238,"extension":239,"group":162,"groupTitle":240,"kind":241,"meta":242,"navigation":243,"path":244,"seo":245,"sourceUrl":246,"stem":247,"wordCount":238,"__hash__":248},"primitives\u002Fdocs\u002Fprimitives\u002F38.inputs-bloom\u002F1.bloom.md","bloom",{"type":7,"value":8,"toc":229},"minimark",[9,12,16,69,79,89,94,149,153,207,211,225],[10,11,5],"h1",{"id":5},[13,14,15],"p",{},"The glow around a source's bright parts, read by name.",[17,18,23],"pre",{"className":19,"code":20,"language":21,"meta":22,"style":22},"language-ts shiki shiki-themes github-dark","bloom(\n  source: InputSource,\n  opts: {threshold?: ScalarArg; radius?: ScalarArg} = {},\n): BloomInput\n","ts","",[24,25,26,38,44,63],"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","(\n",[27,39,41],{"class":29,"line":40},2,[27,42,43],{"class":36},"  source: InputSource,\n",[27,45,47,50,54,57,60],{"class":29,"line":46},3,[27,48,49],{"class":36},"  opts: {threshold?: ScalarArg; radius",[27,51,53],{"class":52},"snl16","?:",[27,55,56],{"class":36}," ScalarArg} ",[27,58,59],{"class":52},"=",[27,61,62],{"class":36}," {},\n",[27,64,66],{"class":29,"line":65},4,[27,67,68],{"class":36},"): BloomInput\n",[13,70,71,72,74,75,78],{},"Import ",[24,73,5],{}," from ",[24,76,77],{},"shaders\u002Fstd",".",[13,80,81,84,85,88],{},[24,82,83],{},"threshold"," is the brightness (0–1, linear luminance) where glow starts; ",[24,86,87],{},"radius"," is how far it spreads, in canvas pixels. The result holds only the glow, so add it to your colour.",[90,91,93],"h2",{"id":92},"parameters","Parameters",[95,96,97,113],"table",{},[98,99,100],"thead",{},[101,102,103,107,110],"tr",{},[104,105,106],"th",{},"Name",[104,108,109],{},"Type",[104,111,112],{},"Notes",[114,115,116,131],"tbody",{},[101,117,118,124,129],{},[119,120,121],"td",{},[24,122,123],{},"source",[119,125,126],{},[24,127,128],{},"InputSource",[119,130],{},[101,132,133,138,143],{},[119,134,135],{},[24,136,137],{},"opts",[119,139,140],{},[24,141,142],{},"{threshold?: ScalarArg; radius?: ScalarArg}",[119,144,145,146,78],{},"Optional. Default ",[24,147,148],{},"{}",[90,150,152],{"id":151},"example","Example",[17,154,156],{"className":19,"code":155,"language":21,"meta":22,"style":22},"inputs: {halo: bloom(child, {threshold: 0.7, radius: 40})},\neffect: wgsl`return vec4f(child.rgb + halo(uv).rgb * glow, child.a);`,\n",[24,157,158,190],{"__ignoreMap":22},[27,159,160,163,166,169,172,174,177,181,184,187],{"class":29,"line":30},[27,161,162],{"class":33},"inputs",[27,164,165],{"class":36},": {",[27,167,168],{"class":33},"halo",[27,170,171],{"class":36},": ",[27,173,5],{"class":33},[27,175,176],{"class":36},"(child, {threshold: ",[27,178,180],{"class":179},"sDLfK","0.7",[27,182,183],{"class":36},", radius: ",[27,185,186],{"class":179},"40",[27,188,189],{"class":36},"})},\n",[27,191,192,195,197,200,204],{"class":29,"line":40},[27,193,194],{"class":33},"effect",[27,196,171],{"class":36},[27,198,199],{"class":33},"wgsl",[27,201,203],{"class":202},"sU2Wk","`return vec4f(child.rgb + halo(uv).rgb * glow, child.a);`",[27,205,206],{"class":36},",\n",[90,208,210],{"id":209},"see-also","See also",[212,213,214],"ul",{},[215,216,217,224],"li",{},[218,219,221],"a",{"href":220},"\u002Fdocs\u002Fprimitives\u002Finputs-blur\u002Fblur",[24,222,223],{},"blur"," — A blurred copy of a source, read in WGSL by the name you list it under.",[226,227,228],"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 pre.shiki code .snl16, html code.shiki .snl16{--shiki-default:#F97583}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 .sDLfK, html code.shiki .sDLfK{--shiki-default:#79B8FF}html pre.shiki code .sU2Wk, html code.shiki .sU2Wk{--shiki-default:#9ECBFF}",{"title":22,"searchDepth":40,"depth":40,"links":230},[231,232,233],{"id":92,"depth":40,"text":93},{"id":151,"depth":40,"text":152},{"id":209,"depth":40,"text":210},"inputs.bloom","inputs-bloom","Bloom",false,null,"md","Inputs","function",{},true,"\u002Fdocs\u002Fprimitives\u002Finputs-bloom\u002Fbloom",{"title":5,"description":15},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Finputs\u002Fbloom.ts#L29","docs\u002Fprimitives\u002F38.inputs-bloom\u002F1.bloom","F4rjaqOBlFNxgjqtuhA0KDQeKLH7TbPoIcdyMlcgB1M",{"stars":250},6080,[252,256,260,264,268,272,276,280,284,288,292,296,300,304,308,312,316,321,325,329,333,337],{"path":253,"title":254,"description":255,"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":257,"title":258,"description":259,"category":24},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":261,"title":262,"description":263,"category":24},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":265,"title":266,"description":267,"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":269,"title":270,"description":271,"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":273,"title":274,"description":275,"category":24},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":277,"title":278,"description":279,"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":281,"title":282,"description":283,"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":285,"title":286,"description":287,"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":289,"title":290,"description":291,"category":24},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":293,"title":294,"description":295,"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":297,"title":298,"description":299,"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":301,"title":302,"description":303,"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":305,"title":306,"description":307,"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":309,"title":310,"description":311,"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":313,"title":314,"description":315,"category":24},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":317,"title":318,"description":319,"category":320},"\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":322,"title":323,"description":324,"category":320},"\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":326,"title":327,"description":328,"category":320},"\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":330,"title":331,"description":332,"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":334,"title":335,"description":336,"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":338,"title":339,"description":340,"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.",1796051186005,"06e02370-81a6-4d74-9931-661d71414be1"]