[{"data":1,"prerenderedAt":393,"buildId":394},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Fmaterials\u002Farealightstudio":3,"github-stars":301,"guide-nav":303},{"id":4,"title":5,"body":6,"categoryId":51,"categorySlug":51,"categoryTitle":288,"curated":289,"description":16,"editUrl":290,"extension":291,"group":204,"groupTitle":292,"kind":293,"meta":294,"navigation":295,"path":296,"seo":297,"sourceUrl":298,"stem":299,"wordCount":290,"__hash__":300},"primitives\u002Fdocs\u002Fprimitives\u002F14.materials\u002F55.arealightstudio.md","areaLightStudio",{"type":7,"value":8,"toc":282},"minimark",[9,13,17,46,61,84,89,126,130,214,224,228,268,272,278],[10,11,5],"h1",{"id":12},"arealightstudio",[14,15,16],"p",{},"A photo studio a glossy or transparent surface reflects: crisp coloured light panels in a room.",[18,19,24],"pre",{"className":20,"code":21,"language":22,"meta":23,"style":23},"language-ts shiki shiki-themes github-dark","areaLightStudio(opts: {panels: StudioPanel[]; room: StudioRoom; behind: Expr; hint?: string}): AreaLightStudio\n","ts","",[25,26,27],"code",{"__ignoreMap":23},[28,29,32,35,39,43],"span",{"class":30,"line":31},"line",1,[28,33,5],{"class":34},"svObZ",[28,36,38],{"class":37},"s95oV","(opts: {panels: StudioPanel[]; room: StudioRoom; behind: Expr; hint",[28,40,42],{"class":41},"snl16","?:",[28,44,45],{"class":37}," string}): AreaLightStudio\n",[14,47,48,49,52,53,56,57,60],{},"Import ",[25,50,51],{},"materials"," from ",[25,54,55],{},"shaders\u002Fstd"," and use ",[25,58,59],{},"materials.areaLightStudio",".",[14,62,63,64,67,68,71,72,75,76,79,80,83],{},"Panels are plain data: a direction, a size, a colour, a gain. Their edges stay crisp, so a dispersive material splits them into spectra, and ",[25,65,66],{},"light(dir, blur)"," widens every edge by ",[25,69,70],{},"blur"," while keeping the panel's total light the same: pass the angle one pixel covers (",[25,73,74],{},"fwidth"," of the reflected direction) and curved glass reflects smooth, alias-free panels. The room fades to ",[25,77,78],{},"behind"," (what lies past the subject, usually the layers beneath) for directions that look into the scene. Build it once, outside any loop, and pass ",[25,81,82],{},"deps"," to the loop.",[85,86,88],"h2",{"id":87},"parameters","Parameters",[90,91,92,108],"table",{},[93,94,95],"thead",{},[96,97,98,102,105],"tr",{},[99,100,101],"th",{},"Name",[99,103,104],{},"Type",[99,106,107],{},"Notes",[109,110,111],"tbody",{},[96,112,113,119,124],{},[114,115,116],"td",{},[25,117,118],{},"opts",[114,120,121],{},[25,122,123],{},"{panels: StudioPanel[]; room: StudioRoom; behind: Expr; hint?: string}",[114,125],{},[85,127,129],{"id":128},"example","Example",[18,131,133],{"className":20,"code":132,"language":22,"meta":23,"style":23},"const studio = areaLightStudio({panels: [{toward: K, size: [0.55, 0.3], rounding: 0.08, color: key, gain: 2.6, hotspot: 1.4}], room, behind: backdrop})\nconst env = studio.light(reflect(view, n), envBlur)\n",[25,134,135,189],{"__ignoreMap":23},[28,136,137,140,144,147,150,153,156,159,162,165,168,171,174,177,180,183,186],{"class":30,"line":31},[28,138,139],{"class":41},"const",[28,141,143],{"class":142},"sDLfK"," studio",[28,145,146],{"class":41}," =",[28,148,149],{"class":34}," areaLightStudio",[28,151,152],{"class":37},"({panels: [{toward: ",[28,154,155],{"class":142},"K",[28,157,158],{"class":37},", size: [",[28,160,161],{"class":142},"0.55",[28,163,164],{"class":37},", ",[28,166,167],{"class":142},"0.3",[28,169,170],{"class":37},"], rounding: ",[28,172,173],{"class":142},"0.08",[28,175,176],{"class":37},", color: key, gain: ",[28,178,179],{"class":142},"2.6",[28,181,182],{"class":37},", hotspot: ",[28,184,185],{"class":142},"1.4",[28,187,188],{"class":37},"}], room, behind: backdrop})\n",[28,190,192,194,197,199,202,205,208,211],{"class":30,"line":191},2,[28,193,139],{"class":41},[28,195,196],{"class":142}," env",[28,198,146],{"class":41},[28,200,201],{"class":37}," studio.",[28,203,204],{"class":34},"light",[28,206,207],{"class":37},"(",[28,209,210],{"class":34},"reflect",[28,212,213],{"class":37},"(view, n), envBlur)\n",[215,216,217],"blockquote",{},[14,218,219,223],{},[220,221,222],"strong",{},"Tip."," Two to four panels read as a real studio: a big key, a strip on each side, one overhead.",[85,225,227],{"id":226},"see-also","See also",[229,230,231,242,257],"ul",{},[232,233,234,241],"li",{},[235,236,238],"a",{"href":237},"\u002Fdocs\u002Fprimitives\u002Fmaterials\u002Fstudiosoftboxes",[25,239,240],{},"studioSoftboxes"," — The brightness of a five-light studio seen in a reflected direction.",[232,243,244,249,250,253,254,60],{},[235,245,247],{"href":246},"\u002Fdocs\u002Fprimitives\u002Fmath\u002Freflect",[25,248,210],{}," — The direction ",[25,251,252],{},"i"," bounced off a surface with unit normal ",[25,255,256],{},"n",[232,258,259,264,265,60],{},[235,260,262],{"href":261},"\u002Fdocs\u002Fprimitives\u002Fmath\u002Ffwidth",[25,263,74],{}," — How much a value changes across one pixel, in any direction: ",[25,266,267],{},"|dpdx| + |dpdy|",[85,269,271],{"id":270},"used-by","Used by",[14,273,274],{},[235,275,277],{"href":276},"\u002Fdocs\u002Fcomponents\u002Fprismaticglass","PrismaticGlass",[279,280,281],"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}",{"title":23,"searchDepth":191,"depth":191,"links":283},[284,285,286,287],{"id":87,"depth":191,"text":88},{"id":128,"depth":191,"text":129},{"id":226,"depth":191,"text":227},{"id":270,"depth":191,"text":271},"Materials & surfaces",false,null,"md","Noise, light & materials","function",{},true,"\u002Fdocs\u002Fprimitives\u002Fmaterials\u002Farealightstudio",{"title":5,"description":16},"https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Fpaint\u002Fmaterials.ts#L1542","docs\u002Fprimitives\u002F14.materials\u002F55.arealightstudio","SfN3a3wmnQvtrG3xdB9WKwgPH0JmewqnpIUXbrs6gPM",{"stars":302},6080,[304,308,312,316,320,324,328,332,336,340,344,348,352,356,360,364,368,373,377,381,385,389],{"path":305,"title":306,"description":307,"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":309,"title":310,"description":311,"category":25},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":313,"title":314,"description":315,"category":25},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":317,"title":318,"description":319,"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":321,"title":322,"description":323,"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":325,"title":326,"description":327,"category":25},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":329,"title":330,"description":331,"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":333,"title":334,"description":335,"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":337,"title":338,"description":339,"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":341,"title":342,"description":343,"category":25},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":345,"title":346,"description":347,"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":349,"title":350,"description":351,"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":353,"title":354,"description":355,"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":357,"title":358,"description":359,"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":361,"title":362,"description":363,"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":365,"title":366,"description":367,"category":25},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":369,"title":370,"description":371,"category":372},"\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":374,"title":375,"description":376,"category":372},"\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":378,"title":379,"description":380,"category":372},"\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":382,"title":383,"description":384,"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":386,"title":387,"description":388,"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":390,"title":391,"description":392,"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.",1796051178733,"06e02370-81a6-4d74-9931-661d71414be1"]