~/satyajit

Tools and papers, 25 November: Skia Graphite on the page's WebGPU device, and an apartment splatted from 20 photos and 15 invented views

mdjsonmcp

2026-11-25 · 13 min · webgpu · webassembly · gaussian-splatting · world-models

A 2:04 narrated explainer, drawn in code. Every number and picture in it is this article's own; the sources are below.

› transcript

I'm Gesso. Two reposts this week, both about what a browser can draw now. First, a renderer that finally runs on the web. skia-wasm compiles Skia's Graphite renderer to WebAssembly and runs it on the page's own WebGPU device. Here it draws a video and the webcam as textures, through colour filters. Ten thousand rounded rectangles, on a phone. Recording the drawing calls takes about the same time in both libraries. Then the submit. CanvasKit's flush is a sliver. Graphite's snap, insert and submit takes longer than the drawing did. Counted on the laptop, CanvasKit sends four WebGL calls. skia-wasm sends over thirty thousand WebGPU calls, one draw per item. The cause is a setting in Graphite's Dawn backend under Emscripten. The phone already supports what a fix needs. It is also lighter. I weighed both packages: about a quarter smaller than the full CanvasKit, with fewer features. Now a room you can walk through. An apartment, splatted from 20 phone photos. And a painted twin, made by restyling the same frames with an image model. First every photo gets a camera and a depth map, all in one world. Then Atlas paints new views where no photo looked, with depth. Then a refined splat run reconstructs the room and trains it against views it renders itself. Five dollars. For the painted version, the frames were restyled and splatted again. Here are the photos as cameras, floating in the point cloud. The docs are plain about the generated views. Beyond a small move, Atlas invents what the view shows. So a generated view is a guess at geometry nobody photographed. Fine for a painted walk. Not for a measurement. skia-wasm loses on submit, not on recording. And the apartment is 35 frames, 15 of them invented. Every source is in the full article. I'm Gesso. Bye!

Why read this

Solidtop 85%

skia-wasm's loss to CanvasKit traced to Graphite's submit, its wasm weighed against CanvasKit's, and the 20-photo splat matched to World Labs' own docs.

  • Original analysis
  • Runs in a browser
  • Concrete numbers to act on

Developer tools & infraMixed licencesPractitioner roundup

How this was scored
Is it new?
1 of 3: An incremental tweak
Can I trust it?
2 of 3: Measures key facts from files, code or configs
Can I run it?
2 of 3: Open code or weights with real limits
Will I understand it?
2 of 3: Mechanism from first principles with figures
Can I act on it?
2 of 3: A concrete recipe, numbers or comparison
Will it last?
1 of 3: Relevant for months
Does it affect many?
1 of 3: A specialist community
Only here?
2 of 3: A teardown or measurement few others did

Score 58 of 100, ranked 542 of 784 rated articles. Each question is answered 0–3 by hand, and a 3 is rare. How articles are scored

Two reposts from 23 November, and they meet in an odd place: both are about what a browser can draw now. One is a 2D renderer that has run on WebGPU everywhere except the web, finally running there. The other is a room you can walk through, built from 20 phone photos and a model that invents the rest.

For the first I read the repository at commit fd1625e, its benchmark write-up and the C++ that wraps Graphite, and weighed the npm package myself. For the second I read the posts and their replies and World Labs' Atlas docs, which describe a pipeline that matches what the post's tool shows.

skia-wasm: Skia's GPU renderer on the page's own device

William Candillon maintains React Native Skia, which draws with Skia on iOS and Android. Its native builds can run Graphite, Skia's newer GPU backend, on Dawn, Google's WebGPU implementation. On the web it has used CanvasKit, Skia's older WebAssembly build: Ganesh on WebGL 2. Hence the post: "Ironically enough, the only platform that couldn't run Skia on top of WebGPU was Web. Let's fix that."

skia-wasm is the fix, MIT-licensed, first published to npm on 23 November and at 0.1.0 when I read it. It does not build Skia. binaries.json pins a 13,803,088-byte archive of prebuilt Graphite static libraries, by URL and SHA-256, from a skia-wasm-m158 release of the React Native Skia repository, so the web and the phones run the same Skia revision. What the repository adds is the glue: Dawn's emdawnwebgpu headers and JavaScript library, which let Emscripten-compiled C++ talk to the browser's own navigator.gpu, and a thin API over plain C exports.

The docs site's hero, drawn by the library into two textures with a WebGPU pass between them, and the video-and-camera example, where Skia draws a video file and the webcam as textures through colour filters. The full 25-second post, muted (video from @wcandillon's post on X).

The shape of src/cpp/context.cpp says most of what matters. Context::Init takes the page's WGPUDevice, builds a Graphite DawnBackendContext around it and makes one recorder. The tick function is left null, with the comment "without Asyncify or JSPI nothing can wait on the GPU, so Graphite never blocks and work completes from the browser's event loop." That one choice keeps the module free of Emscripten's stack-unwinding machinery, and costs it synchronous readback: you cannot ask for pixels and get them on the same line. Context::submit is three Graphite calls, snap(), insertRecording() and submit(), and they come back in the benchmark below. Fonts come from bytes because there are no system fonts, CPU images must be uploaded as textures because Graphite only draws GPU images, and there are no pthreads.

Because the device is the page's, a Skia canvas can share textures with anything else on that device: a three.js scene, a compute pass, a video frame. That is the case the author makes in a reply: "Headless GPU rendering via node-dawn or in deno" and "Zero-copy interop with 3d libs, compute, media pipeline". He also calls it "mainly a fun experiment", and the README agrees: there is no stable API, and a minor version can break it.

The API looks like CanvasKit with the sharp edges filed off. drawRect(x, y, width, height, paint) takes numbers, not rect objects in wasm memory. Enumerations are strings that throw when misspelled, colours are CSS strings, every angle is in radians, and an object can be freed with dispose(), a using declaration, or left to a finalizer:

const sk = await Skia.init({ device })
const surface = sk.surface(canvas)
const glow = sk.paint({
  shader: sk.linearGradient({ start: [0, 0], end: [512, 0], colors: ["#f97316", "#ec4899"] }),
  maskFilter: sk.maskFilter.blur(8),
})
 
function tick() {
  const c = surface.getCanvas() // starts a frame
  c.clear("white")
  c.drawCircle(256, 400, 48, glow)
  surface.flush() // snap, insert, submit
  requestAnimationFrame(tick)
}

It covers paths with boolean ops, gradients, runtime effects, image and mask filters, paragraphs and PNG, JPEG and WebP encoding. Skottie, SVG documents, vertices and font fallback are not in it yet. The author's own note in the thread is that it "seems to work well on Safari and Firefox (wgpu)", Firefox's WebGPU being the Rust wgpu implementation, not Dawn.

Where a frame goes

The repository's BENCHMARK.md is the best thing in it, because it reports a loss and finds the cause. It draws four synthetic scenes, every item animated every frame, with canvaskit-wasm 0.41.1 (the build React Native Skia uses on the web today) and with skia-wasm, on an M5 Max laptop and a Galaxy S25 Edge phone, and times the main thread. skia-wasm is 1.2x to 1.7x faster on the shader rectangles and the animated paths, and 2.1x to 2.8x slower on 10,000 rounded rectangles and 2,000 images.

The split on the phone shows where. Recording, the drawing calls themselves, is cheaper in skia-wasm on every scene: 9.74 ms against 10.00 ms for the rectangles, 0.38 ms against 1.32 ms for the paths. The deficit is entirely in submit: 17.8 ms for skia-wasm's snap, insert and submit against 0.28 ms for CanvasKit's flush on the rectangle scene. Counted on the laptop, that frame is 30,667 WebGPU calls against 4 WebGL calls; the image scene is 7,918 against 250. Ganesh batches those items into one instanced draw. This build of Graphite issues a setBindGroup and a drawIndexed per item, because Graphite's Dawn backend turns immediates and storage buffers off under Emscripten (DawnCaps.cpp). The author's note is that the phone already reports what a fix needs: a maxImmediateSize of 64, 16 storage buffers per stage, and setImmediates.

On the laptop both libraries hold 60 frames a second on every scene, so for a few hundred shapes none of this shows. On the phone it does: the rectangle scene runs at 32 frames a second against CanvasKit's 60 when cool, and 18 against 46 once the phone has heated up and capped its cores. The write-up's measurement of that throttling is worth reading in its own right. Drawing the same scene repeatedly, the phone's fastest cores fell from 4.47 GHz to 1.96 GHz within 33 seconds while Android's thermal status still read 0, so the variant measured first in a page load ran on a phone 1.6 to 1.8 times faster than the ones after it. The runner now records the clock limit four times a second and only compares figures taken under the same limit. Most phone benchmarks I read do not do that.

The same document records an idea that did not survive. An earlier version had a retained API, a display list recorded once and animated by writing numbers into wasm memory, on the theory that a call from JavaScript into wasm per operation is expensive. It measured a call at about 2 nanoseconds through a plain C export and about 7 through embind, and the display list within 2% of one-call-at-a-time on three of the four scenes. So it was deleted, and the bindings became plain C exports with no embind.

One reply asked whether the wasm is smaller than CanvasKit's, and the thread has no answer, so I weighed both packages from npm. skia-wasm-0.1.0's skia-wasm.wasm is 5,902,133 bytes, and 2,133,369 after gzip -9. canvaskit-wasm 0.41.1's full build, the one the benchmark used, is 8,080,104 bytes, or 3,240,363 gzipped; its default build is 7,159,342. So about a quarter smaller than the full CanvasKit, with fewer features (no Skottie, no SVG DOM).

wcandillon/skia-wasm@fd1625e · snapshot 2026-11-25

Skia Graphite as WebAssembly

stars
34
license
MIT
branch
main
forks
2
open issues
0
source
353.9 kB
commit date
2026-11-24
source by language
TypeScript261.6 kBC++87.5 kBHTML2.9 kBJavaScript1.9 kB
skiawasmwebgpu

GitHub REST API, 2026-11-25 — branch, commit, commitDate, createdAt, description, forks, homepage, languages, license, openIssues, pushedAt, stars, topics

rust-skia, from the replies

A reply pointed the author at rust-skia, safe Rust bindings to Skia's C++ API, which he called "very cool to see". It tracks the same Skia milestone, chrome/m158, and its README lists Vulkan, Metal, OpenGL and Direct3D backends, a metal-window-graphite example, a wasm32-unknown-emscripten target (its README shows only a WebGL option there), and rendering on a wgpu application's device as experimental. That last one is the Rust-side twin of what skia-wasm does on the page. It is what fframes rasters with, through skia_safe.

rust-skia/rust-skia@92f4495 · snapshot 2026-11-25

Rust Bindings for the Skia Graphics Library

stars
1.8K
license
MIT
branch
master
forks
205
open issues
56
source
2.9 MB
commit date
2026-11-24
source by language
Rust2.6 MBC++274.8 kBJust15.8 kBDockerfile7.3 kBJavaScript1.9 kBNix1.3 kBWGSL0.7 kB
androidd3dgraphics-libraryiosmetalopenglpdfrust-bindings

GitHub REST API, 2026-11-25 — branch, commit, commitDate, createdAt, description, forks, languages, license, openIssues, pushedAt, stars, topics

I think skia-wasm is right about its bottleneck and honest about it, and I would not ship it yet. For a UI with a few hundred paths and gradients it is already faster than CanvasKit and lighter to download. For anything that draws thousands of small things a frame, it waits on a Graphite setting that someone at Skia, or the author, has to turn on for Emscripten. The zero-copy argument is the one that would make me switch: a Skia layer that composites into a WebGPU scene without a readback is something CanvasKit on WebGL cannot give you.

An apartment from 20 photos, and a painted twin

Ian Curtis (@XRarchitect) posted a Gaussian splat of his apartment that he can walk through, cutting between the real rooms and a stylised version with pastel, brush-stroked walls. His X bio lists design work at AMD and at World Labs, so read this as a demo from someone close to the tool, not an outside test.

The apartment splat and its painted twin, cutting between them as the camera moves. A 15-second cut of the 36-second post, muted (video from @XRarchitect's post on X).

His thread gives the recipe: "I started with 20 input images ... using the @theworldlabs viewfinder tool. Then generated 15 more views to fill out the missing spaces. To re-mask the space I had gpt image stylize the images and then re-imported them to generate the painted version." In a reply he puts the cost at "about 5k credits (5$) each", and says it does not yet hold a steady frame rate on a Quest 3. The second clip in the thread is the tool itself.

Viewfinder: the photos posed as cameras in a point cloud, then each view, with the context strip and the Create splats button at the bottom. The full 20-second clip from the thread, muted (video from @XRarchitect's post on X).

World Labs' Atlas documentation describes the same three steps as API tasks, and the video's interface matches them. The docs do not use the name Viewfinder, so that the Studio button runs these exact tasks is my inference, from the matching steps and the matching price.

  1. Pose. images2PosedRGBD estimates a camera and a depth map for each photo. Photos of one real place submitted together share one world.
  2. Generate views. atlasGenerate takes the posed frames as contextFrames and new targetCameras, and paints what each camera would see, with depth when returnDepth is set. The docs suggest 6 to 12 cameras around the subject, inside space the photos show as empty, in one request, so the model decides the unseen parts once for all of them. From a single image, they say, a camera can turn about half its field of view or move about a third of the typical depth and still mostly show what the photo showed. Beyond that, "Atlas invents what the view shows."
  3. Splat. posedImages2Splats reconstructs Gaussians from the posed RGBD frames, then by default refines them by rendering new views, cleaning those up and training against them. A refined run is 5,000 credits ($5 at 1,000 credits a dollar); a draft with refine: false is 500 and returns in about 30 seconds. It takes 2 to 512 frames for a refined run, on one of four camera grids (1280x720, 720x1280, 960x720 or 528x704), and recommends 8 to 16 views for a single room with about half of each image shared with its neighbours.

His 20 photos plus 15 generated views make 35 frames, which by my arithmetic lands in the docs' "33 to 512" row: up to 30 minutes for a refined run. The docs' worked example, a potter's studio from one photo and seven generated views, took 18 minutes and returned 2,000,000 splats.

The painted version is the step to think about. He restyled each frame with an image model and splatted the restyled set. The docs' best-practice page is blunt about what goes wrong when views disagree: a dining table drawn two ways in two generated views became "overlapping, ghosted surfaces", and a coffee table became two tables. A per-image restyle has nothing to keep one frame's brushstrokes consistent with the next frame's, yet his painted walk holds together. My guess is that the splat's refinement averages the disagreement into the soft, smeared look the style already has. He does not say whether he reused the original cameras and depth or posed the painted images afresh.

The idea came from @smallfly, who made a painterly version of a 3DGS capture of Coiffure Mile End, a hair salon in his neighbourhood, with Ailleurs, his own tool on the World Labs API, spatially aligned with the original so that the salon's mirror works as a portal between the two. The same docs list where splats come out badly: skies, foliage, large plain walls, windows, thin structures such as chair legs, and faces.

Two cautions. Every view Atlas generates is a guess at geometry nobody photographed, and the docs say so. For a stylised walk that is fine; Curtis himself calls the result a "digital cousin". For the reality capture I care about, where a splat ends up as measurements and a BIM model, an invented wall behind the sofa is a defect you cannot see. And the product name moved under this post: World Labs' Marble docs now say Marble and its World API will be discontinued on 8 January 2027, with Atlas as a separate product with its own accounts and keys. The camera-path app this site took apart in October already ran on Atlas tasks.

Where each number comes from

Read on 25 November: the posts by @wcandillon, @XRarchitect and @smallfly and their threads and replies through the fxtwitter mirror; skia-wasm at commit fd1625e (README.md, BENCHMARK.md, binaries.json, package.json, src/cpp/context.cpp) and its npm metadata; rust-skia's README; and World Labs' Atlas docs (build-a-scene, scene-to-splats, posed-images-to-splats, splat-best-practices, billing) and the Marble discontinuation page. Every benchmark figure is skia-wasm's own, measured by its author. I measured the two wasm sizes, raw and gzipped, from the npm tarballs. The 35-frame count and the timing row it falls in are my arithmetic, and the match between Viewfinder and the API tasks is my inference. I ran neither tool.

Cite this article

For attribution, please use the following reference or BibTeX:

Satyajit Ghana, "Tools and papers, 25 November: Skia Graphite on the page's WebGPU device, and an apartment splatted from 20 photos and 15 invented views", ai.satyajit.si, November 2026.

bibtex
@misc{ghana2026toolsandpapersroundupnov25,
  author = {Satyajit Ghana},
  title  = {Tools and papers, 25 November: Skia Graphite on the page's WebGPU device, and an apartment splatted from 20 photos and 15 invented views},
  url    = {https://ai.satyajit.si/articles/tools-and-papers-roundup-nov-25},
  year   = {2026}
}
share