[{"data":1,"prerenderedAt":243,"buildId":244},["ShallowReactive",2],{"doc-\u002Fdocs\u002Fprimitives\u002Finputs-rasterize":3,"github-stars":151,"guide-nav":153},{"id":4,"title":5,"body":6,"categoryId":136,"categorySlug":137,"categoryTitle":138,"curated":139,"description":140,"editUrl":141,"extension":142,"group":143,"groupTitle":144,"kind":138,"meta":145,"navigation":146,"path":147,"seo":148,"sourceUrl":141,"stem":149,"wordCount":57,"__hash__":150},"primitives\u002Fdocs\u002Fprimitives\u002F42.inputs-rasterize\u002Findex.md","Sheets",{"type":7,"value":8,"toc":131},"minimark",[9,13,41,44,73,78,108,112,127],[10,11,5],"h1",{"id":12},"sheets",[14,15,16,24,25,28,29,32,33,36,37,40],"p",{},[17,18,20],"a",{"href":19},"\u002Fdocs\u002Fprimitives\u002Finputs-rasterize\u002Frasterize",[21,22,23],"code",{},"rasterize",": draw a grid simulation's cells as a deforming sheet of triangles into an offscreen texture, so a body can read what the sheet shows at each pixel: which part of the sheet (",[21,26,27],{},"sheet(uv).xy","), how deep it is (",[21,30,31],{},".z","), whether it covers the pixel (",[21,34,35],{},".w","), and which way it faces (",[21,38,39],{},"sheet.normal(uv).xyz","). Cloth, folding paper, peeling layers.",[14,42,43],{},"The component's own output is still one full-screen quad: the triangles only ever land in this texture. No camera, models or scene.",[45,46,51],"pre",{"className":47,"code":48,"language":49,"meta":50,"style":50},"language-ts shiki shiki-themes github-dark","import {rasterize} from 'shaders\u002Fstd'\n","ts","",[21,52,53],{"__ignoreMap":50},[54,55,58,62,66,69],"span",{"class":56,"line":57},"line",1,[54,59,61],{"class":60},"snl16","import",[54,63,65],{"class":64},"s95oV"," {rasterize} ",[54,67,68],{"class":60},"from",[54,70,72],{"class":71},"sU2Wk"," 'shaders\u002Fstd'\n",[74,75,77],"h2",{"id":76},"types","Types",[79,80,81,94],"table",{},[82,83,84],"thead",{},[85,86,87,91],"tr",{},[88,89,90],"th",{},"Type",[88,92,93],{},"What it is",[95,96,97],"tbody",{},[85,98,99,105],{},[100,101,102],"td",{},[21,103,104],{},"RasterizeInput",[100,106,107],{},"interface RasterizeInput extends InputNode { readonly kind: 'rasterize' readonly grid: GridSim | InputNode readonly scale: number readonly holes: string | null }",[74,109,111],{"id":110},"words","Words",[113,114,116],"primitive-words",{":words":115},"[{\"name\":\"rasterize\",\"path\":\"\u002Fdocs\u002Fprimitives\u002Finputs-rasterize\u002Frasterize\",\"summary\":\"Draw a grid's cells as a sheet of triangles into a texture.\"}]",[117,118,119],"ul",{},[120,121,122,126],"li",{},[17,123,124],{"href":19},[21,125,23],{}," — Draw a grid's cells as a sheet of triangles into a texture.",[128,129,130],"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":50,"searchDepth":132,"depth":132,"links":133},2,[134,135],{"id":76,"depth":132,"text":77},{"id":110,"depth":132,"text":111},"inputs.rasterize","inputs-rasterize",null,false,"rasterize: draw a grid simulation's cells as a deforming sheet of triangles into an offscreen texture, so a body can read what the sheet shows at each pixel: which part of the sheet (sheet(uv).xy), how deep it is (.z), whether it covers the pixel (.w), and which way it faces (sheet.normal(uv).xyz).","https:\u002F\u002Fgithub.com\u002Fshader-effects-inc\u002Fshaders\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Fstd\u002Finputs\u002Frasterize.ts","md","inputs","Inputs",{},true,"\u002Fdocs\u002Fprimitives\u002Finputs-rasterize",{"title":5,"description":140},"docs\u002Fprimitives\u002F42.inputs-rasterize\u002Findex","RBHCexTh3L6Ru-3suQyDSAZJla20SvdrWytoZWGzhD0",{"stars":152},6080,[154,158,162,166,170,174,178,182,186,190,194,198,202,206,210,214,218,223,227,231,235,239],{"path":155,"title":156,"description":157,"category":21},"\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":159,"title":160,"description":161,"category":21},"\u002Fdocs\u002Fguide\u002Fquickstart","Quickstart","Install Shaders, render your first effect, and drive a prop from state.",{"path":163,"title":164,"description":165,"category":21},"\u002Fdocs\u002Fguide\u002Fcomposing-effects","Composing effects","Stack components as layers and nest them to control which layers an effect touches.",{"path":167,"title":168,"description":169,"category":21},"\u002Fdocs\u002Fguide\u002Fblending-masking","Blending and masking","Control how a layer mixes with the layers below it, and reveal one layer through another.",{"path":171,"title":172,"description":173,"category":21},"\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":175,"title":176,"description":177,"category":21},"\u002Fdocs\u002Fguide\u002Fanimation","Animating a shader","Tween a shader's props with Motion, GSAP or anything else that animates a number.",{"path":179,"title":180,"description":181,"category":21},"\u002Fdocs\u002Fguide\u002Fdynamic-props","Dynamic props","Drive any numeric or position prop from time, the cursor, or another layer, without writing animation code.",{"path":183,"title":184,"description":185,"category":21},"\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":187,"title":188,"description":189,"category":21},"\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":191,"title":192,"description":193,"category":21},"\u002Fdocs\u002Fguide\u002Ftransforms","Transforms","Position, size, and rotate any layer inside the canvas with a bounding box, in any CSS unit.",{"path":195,"title":196,"description":197,"category":21},"\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":199,"title":200,"description":201,"category":21},"\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":203,"title":204,"description":205,"category":21},"\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":207,"title":208,"description":209,"category":21},"\u002Fdocs\u002Fguide\u002Fperformance","Performance","Learn what makes an effect expensive on the GPU and how to keep it inside the frame budget.",{"path":211,"title":212,"description":213,"category":21},"\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":215,"title":216,"description":217,"category":21},"\u002Fdocs\u002Fguide\u002Ftelemetry","Telemetry","The `\u003CShader>` component occasionally sends an anonymous performance report to help us improve the engine over time.",{"path":219,"title":220,"description":221,"category":222},"\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":224,"title":225,"description":226,"category":222},"\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":228,"title":229,"description":230,"category":222},"\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":232,"title":233,"description":234,"category":21},"\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":236,"title":237,"description":238,"category":21},"\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":240,"title":241,"description":242,"category":21},"\u002Fdocs\u002Fguide\u002Fssr","Server rendering","Render Shaders in Next.js, Nuxt, SvelteKit, SolidStart and other SSR apps by keeping each shader on the client.",1796051186140,"06e02370-81a6-4d74-9931-661d71414be1"]