Vercel AI Open-Sources vgpu: A TypeScript WebGPU Library for AI Agent Shaders

2026年8月28日 17:28
站內 AI 整理稿

Shaders are still the hardest thing to ship on a normal web team.WebGPU gives you the hardware, then hands you adapters, bind group layouts, and pipeline descriptors before a single pixel moves.Vercel spent that cost internally building the shaders on vercel.com, and has now open-sourced the result.

vgpu is a TypeScript library that treats .wgsl files as importable modules, exposes one Gpu context, and runs the same shader in a browser canvas, in headless Node.js, and in a CI snapshot test.Is it deployable?

Yes,vgpu is MIT licensed and published to npm, so pnpm add vgpu is the entire acquisition path.It is a library, not a hosted service, so there is no account, quota, or inference bill.#mtp-vgpu-x7k2 p:empty, #mtp-vgpu-x7k2 hr, #mtp-vgpu-x7k2 del, #mtp-vgpu-x7k2 s {display:none!

important} #mtp-vgpu-x7k2 iframe {display:block!important;width:100%!important;border:0!important;background:transparent!important;overflow:hidden!important} (function(){ window.addEventListener('message', function(e){ if(!e.data || !e.data.vgpuHeight) return; var f = document.

getElementById('mtp-vgpu-x7k2-frame'); if(f) f.style.height = e.data.vgpuHeight + 'px'; }); })(); One context, no hidden global state init() acquires an adapter and device and returns a single Gpu handle.Everything else hangs off it.

The browser quick start in the README is four lines: Copy CodeCopiedUse a different Browserconst gpu = await init(); const surface = gpu.surface(canvas, { dpr: [1, 2] }); const wave = gpu.effect(WAVE_WGSL, { set: { speed: 2 } }); gpu.frame.loop(() => { wave.set({ time: gpu.time }); wave.

draw(); }); surface wraps the canvas and clamps device pixel ratio between 1 and 2.effect compiles WGSL into a fullscreen effect whose uniforms are addressed by their WGSL names through set().Frames are explicit: passes, clears, and draws are calls, never implicit scene-graph state.

WGSL as a Module System The differentiator is shader tooling..wgsl files import and export like TypeScript modules.vgpu resolves the module graph, reflects bindings, removes unused declarations, and emits compact shader source at build time.

That removes the hand-written binding declarations that normally drift out of sync with the shader.The README states a complete fullscreen effect ships in 25 KB gzipped, and that the budget is enforced in CI.

Three Runtimes, One API The package exposes subpath exports for vgpu, vgpu/node, vgpu/mock, vgpu/scene, vgpu/client, and vgpu/core.The Node path is Dawn-backed and renders offscreen: Copy CodeCopiedUse a different Browserconst target = gpu.

target({ size: [256, 256], format: "rgba8unorm" }); const pixels = await target.read(); That is what makes CI rendering practical.

pixelmatch and pngjs are direct dependencies of the published package, consistent with the documented workflow where CI compiles the shader, renders a headless frame, and compares the snapshot.The mock adapter is deterministic and exists for tests that should not touch a GPU at all.

The Agent Surface Vercel calls this an agent-first library, and the packaging backs that up.The package ships a vgpu binary, so npx vgpu docs, npx vgpu examples, and npx vgpu check work without a global install.vgpu.sh publishes agents.md, llms.

txt, and a full documentation export, plus a tokenless examples discovery API with an OpenAPI 3.1 description.A hosted read-only MCP server is available at vgpu.sh/api/mcp, and @modelcontextprotocol/server is a direct dependency.There is also an installable agent skill in the repo.

Comparison #mtp-vgpu-cmp-q4n8 p:empty, #mtp-vgpu-cmp-q4n8 hr, #mtp-vgpu-cmp-q4n8 del, #mtp-vgpu-cmp-q4n8 s {display:none!important} #mtp-vgpu-cmp-q4n8 iframe {display:block!important;width:100%!important;border:0!important;background:transparent!important;overflow:hidden!

important} #mtp-vgpu-cmp-q4n8 .mtp-vgpu-cmp-q4n8-cap {font-size:11px!important;color:#8a8a8a!important;text-align:center!important;margin-top:8px!important;line-height:1.5!important} Tap any column header to spotlight one library.Scroll the table sideways on narrow screens.(function(){ window.

addEventListener('message', function(e){ if(!e.data || !e.data.vgpuHeight) return; var f = document.getElementById('mtp-vgpu-cmp-q4n8-frame'); if(f) f.style.height = e.data.vgpuHeight + 'px'; }); })(); Key Takeaways Vercel open-sourced vgpu, the WebGPU library it built to ship shaders on vercel.com.

One API surface runs in the browser, in headless Node.js via Dawn, and in a deterministic mock..wgsl files import and export like TypeScript modules, with reflection for bindings and layouts.A complete fullscreen effect ships in 25 KB gzipped, a budget the repo says CI enforces.

MIT licensed, on npm at v0.3.1, with a CLI, llms.txt, and a hosted read-only MCP endpoint.Check out the GitHub Repo, Docs and Examples, and the npm package.Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter.Wait!are you on telegram?

now you can join us on telegram as well.The post Vercel AI Open-Sources vgpu: A TypeScript WebGPU Library for AI Agent Shaders appeared first on MarkTechPost.

Related

相關文章

量子位AI Agent

我的自媒體搭子太能卷,一頓飯功夫17份成品

百度搭子發布會強調「交付即驚豔」新標準,實際測試自媒體套件,能自動完成帳號分析、內容生成到配圖封面,一口氣產出17份成品,大幅縮短工作時間。企業版則進一步提供15個專業套件、企業知識庫與VPC安全版本,將個人能力擴展為組織級穩定交付。

剛剛
量子位AI Agent

剛剛,港股AGI第一股殺瘋了!Agent業務半年進賬近5億,Token收入Q2暴漲500%

企業智能化服務撐起基本盤,第二增長曲線冒頭 “怎麼沒人聊OpenClaw了”、“OpenClaw涼涼”…… 正當全網開始“賽博悼念”這個曾帶火Agent概念的現象級產品時,有一家公司卻憑藉Agent業務—— 賺!錢!了! 更讓人意外的是,Agent業務在這裡坐的還不是“小孩桌”,它已經成了這家公司業績增長的核心引擎。

1 小時前
鈦媒體AI Agent

越用AI,遊戲開發者越焦慮:54%擔心被替代,37%稱工作流沒變快

DataEye2026.08.28 16:08 · 來自廣東全文2295字AI正在加速遊戲開發,但開發者似乎並沒有因此更安心。文 | DataEyeAI正在加速遊戲開發,但開發者似乎並沒有因此更安心。Perforce聯合AWS發佈的《2026 State of Real-Time Workflows Report》顯示,AI正在從“新興工具”逐漸進入遊戲及相關行業的日常工作流,但與此同時,圍繞崗位安全、內容質量、創造力和倫理的擔憂也在同步上升。

3 小時前

騰訊WorkBuddy,學不會豆包工作?

騰訊WorkBuddy被批評未能像豆包那樣真正進入工作場景,原因在於對工作脈絡的理解仍停留在工具層面,而非單純技術落後。AI助手在辦公領域的競爭已從模型能力轉向生態整合與工作方式嵌入,單點能力突破已不足,需將AI變成工作方式本身。

3 小時前
量子位AI Agent

Claude開始接管物理世界!能用機械臂阻攔5000萬美元打款了

今天凌晨整了一個頗有《超體》意味的新發布—— 這一次,它開始把觸角真正伸進物理世界。 剛剛,Claude母公司Anthropic發佈了一套全新模型硬件標準(Model Hardware Standard),簡稱MHS。 簡單來說,MHS是一套面向硬件的驅動和設備描述標準,可以理解為物理世界的MCP。

4 小時前
鈦媒體AI Agent

700個Agent串聯起來,成立了一家“地下公司”

字母AI2026.08.28 12:09 · 來自北京全文4215字00:00 / 11:38拉群、派活兒、共享經驗,還一起闖進了Hugging Face。文 | 字母AI7月8日的夜晚,一個代號叫PHASEONE10841的OpenAI Agent,在公司內部的軟件倉庫裡留下一條消息。它碰上了一道幾乎做不出來的網絡安全測試題,想找別的Agent幫忙。幾個小時後,50多個Agent循著留言找了過來,發出上千條消息。

7 小時前