Feature Library

World screens: video on curved glass in a 3D scene, on the show clock (engine-free)

2.75 GPU · 0.29 CPU ms
A still of the World screens: video on curved glass in a 3D scene, on the show clock (engine-free) demo
Still
The live demo starts when it’s in view.Play or pause · the chapter buttons jump (preroll) · scrub the walkthrough · tap the glass to find a pixel · Light, curve and decode slots in the panel

The HaTac engine’s video screens and its screen recipe kind, lifted out whole on raw WebGPU with no engine.

The HaTac engine’s video screens and its screen recipe kind, lifted out whole on raw WebGPU with no engine: a screen is a small JSON recipe (the recording’s size, cadence and frame count, the glass’s width and curve, bezel, case and finish, chapters with a still each, captions, recorded clicks). The show clock owns the displayed frame: a preroll seeks to the middle of the wanted frame and resolves only when the decoded picture’s own timestamp matches, a hold keeps its picture, a scrub with no cached picture shows the chapter’s still, and the first frames are kept across the native loop so the wrap never flashes. Decoders are a budget with priorities (two by default, a revoked screen unloads its element and closes its pictures), and a waiting screen shows its chapter still. Frames are imported as external textures each draw (a copy path for stills and other devices), linearised once, lit to a white level that follows the room (full by day, 60% in the dark), finished with a view-dependent glass reflection capped over black, and the visible glass feeds bloom only above its own threshold. Captions go into a page element of yours, click rings land on the recorded clicks, and pick() turns a surface hit into the source pixel on the drawn chords. Added in the library: a standalone stage and host (group 0, a flat material set, HDR with bloom and the present), hit() for a pointer ray, reshape() for a live curve, and a screen light that lights any surface in the room from what each screen shows. The demo is a gallery corner with a walkthrough of a made-up app and two loops.

What it costs a frame

2.75 ms
0.29 ms
GPU
2.75 ms
CPU, median
0.29 ms
CPU, 95th pct
0.41 ms
Draw calls
0
Weight
Heavy

Measured 28 November 2026 on RTX 4060 Laptop, 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 158, 1920×1080 at 1×. 600 frames × 3 rounds, median kept (rounds ranged GPU 2.11–2.81, CPU 0.28–0.29 ms). What ran: The walkthrough screen alone: one curved panel (48 segments) drawing the decoded 1280 × 720 VP9 recording through an external texture each frame, square-on and filling most of the stage, with its glass threshold and the host’s bloom and present. The show clock plays from the start. Phones: tiers are being measured next.

How steadily it runs on RTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference

Typical frame ?
16.66 ms
1% low ?
51 fps
Varies by ?
±0.64 ms
All metricsRTX 4060 Laptop · 13th Gen Intel(R) Core(TM) i9-13900H · reference
p50p95p9916.02 ms18.54 ms +
How long each frame took. Most frames sit in the tall bars; a long tail to the right is hitching.

Frames run on a 60 Hz timer (a page demo), so most frames take about one tick, 16.7 ms: the spread around it is what matters.

Frames

Median (p50) ?
16.66 ms
p95 ?
17.65 ms
p99 ?
18.05 ms
Slowest ?
26.11 ms
Mean ?
16.73 ms
Standard deviation ?
0.64 ms
1% low ?
51 fps
0.1% low ?
38 fps
Hitches ?
0 of 600
Over budget ?
1 of 600

Main thread

Long tasks ?
0
Long frames ?
0
Event-loop delay ?
0.0 / 0.7 / 0.9 ms

Input

No input during this run.

Memory

JavaScript heap ?
31.6 → 31.3 MB
Growth ?
-0.29 MB

Browser

JavaScript a frame ?
0.37 ms
All tasks a frame ?
1.59 ms
Layout / style ?
0.25 / 0.13 ms
Main thread busy ?
10%

Garbage collection

Collections ?
12 (1 minor, 11 major)
Pauses ?
44.1 ms in all, longest 1.7

What it needs

Renders with
WebGPUNeeds WebGPU: current Chrome and Edge, Safari 26+, Firefox 141+ on Windows.
Your browser
Checking…Looking for WebGPU
Depends on
NothingNo other packages
With an agent
install("world-screens")Your coding agent reads its pitfalls and installs it through the library’s MCP server. Set it up

What it’s for

  1. A screen in a 3D room, a lobby or a stage set playing a product walkthrough or a trailer, frame-exact on the show’s own clock
  2. An exhibition or a live show where a wall of screens must hold, scrub and jump chapters in step with the rest of the scene
  3. A kiosk or a showroom scene whose screens run on a few decoders: the important one decodes, the others wait on a still
  4. An in-game monitor, billboard or cockpit display with captions in the page for screen readers and click rings from the recording
  5. A dark scene lit by what its screens show: blue from a blue sidebar, warm from a warm swatch, eased so a cut never flashes
  6. Clicking on a curved screen in a 3D scene and knowing exactly which pixel of the recording was under the pointer

Pitfalls, in brief

  1. The demo needs WebGPU: the screens draw decoded frames as external textures and the room, bloom and tone map are WebGPU passes, which WebGL 2 cannot run here.
  2. Serve the recordings and stills as files from your own origin.
  3. Use constant-frame-rate recordings and say their cadence and frame count in the recipe: the player picks a frame by index from the show clock.
  4. A seek’s completion is not the picture: the playhead can report the new time before the frame is presented. preroll() seeks to the middle of the frame and resolves only when the decoded picture’s own timestamp matches; await it before a cue that must open on that frame, and show the chapter’s still meanwhile (the stage does).
  5. Sync the show clock before you encode the frame, and keep the VideoFrame alive through submission: draw() imports it as an external texture, which expires at the end of the task, so import it again every frame you draw, even while held (the panel renderer does, and keeps the bind group while the handle is the same).
9 more in brief
  1. Pausing a video does not free its decoder.
  2. Keep the loop’s first pictures across the native wrap (video.loopFrames, 2 by default: about 3 MiB each at 1080p 4:2:0) and give a loop a continuous seam in the edit: the player wraps the whole file.
  3. Both media paths request sRGB and the shader linearises once, before the white level and the tone map.
  4. Draw opaque screens before what is behind them, with back faces culled: the screen hides the wall and depth rejects it.
  5. Captions are written into a page element you pass (caption), so the page’s type, zoom and screen readers work; don’t draw them into the scene.
  6. pick() and hit() test the drawn chords of the curve, not an ideal cylinder: a low tier’s twelve segments map a point to a slightly different pixel than forty-eight, and the chords are what the viewer sees.
  7. The engine’s spill (receivers, role 2) samples only the picture’s centre and lights only triangles the panel draws in its trim material: content with a dark centre and bright edges lights nothing.
  8. A source that times out (8 s by default) or errors stays in error until the next preroll: sync() alone does not retry.
  9. Muted, plays inline, no sound: a screen never starts audio.
14 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

From HaTac. Adapted from published work, named below.

Hannes Andersson: The HaTac engine’s video screens, screen recipes and their tests (built for his game and proven there); the library’s stage, host, screen light and demo.

Jorge Jimenez, Next-generation post-processing in Call of Duty: Advanced Warfare (SIGGRAPH 2014): The host’s bloom: the 13-tap downsample with a Karis average and the tent upsample, as the engine’s bloom has them.

Krzysztof Narkowicz, ACES filmic tone mapping curve (2015): The present’s tone map, the engine’s default.

WebGPU and WebCodecs (W3C): importExternalTexture over a VideoFrame, which the screen draws from, and requestVideoFrameCallback for the presented frame.

videovideo texturescreenmonitordisplaycurved screenworld-space uidiegeticin-world screenkioskwalkthroughtutorialproduct democaptionssubtitleschaptersclick ringsshow clocktimelinescrubseekprerollframe-accuratepresentation timestamp

Near it in the frame