Skip to content

Redesign the video texture example - #9913

Merged
mvaligursky merged 1 commit into
mainfrom
mv-video-texture-example
Nov 2, 2026
Merged

mvaligursky merged 1 commit into
mainfrom
mv-video-texture-example

Conversation

@mvaligursky

Copy link
Copy Markdown
Contributor

Rebuilds the graphics/video-texture example, which showed a washed-out video on a swinging slab, as a dark scene where one video texture plays on two surfaces.

Changes:

  • A wall of 16×9 glowing tiles, each mapping its own part of the video through its texture coordinates. Waves of tiles flip and push forward every few seconds, each from a different point of the wall.
  • A rounded cube (RoundedBoxGeometry) tumbles in front of the wall, with the whole video on each face.
  • The video texture uses the sRGB format, so the video shows its real colors. The old RGBA8 texture was sampled as linear, which washed it out.
  • The texture has mipmaps, and is created at the size of the video once its first frame loads.
  • A new frame is uploaded only when the video has one (requestVideoFrameCallback), falling back to an upload every frame.
  • A rectangular area light in front of the wall takes the average color of each frame, read from the 1×1 smallest mip level with Texture#read, and lights the floor with it.
  • Bloom with neutral tone mapping, and orbit camera controls.
  • New controls: Playing, Sound, Tile Wave and Wall Light toggles.

Examples:

  • graphics/video-texture: redesigned, with new thumbnails

A kinetic wall of tiles and a rounded cube play the video, uploaded only on new frames, with an sRGB texture and an area light following the average color of the video.
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Build size report

This PR does not change the size of the minified bundles.

Bundle Minified Gzip Brotli
playcanvas.min.js 2799.9 KB — 727.4 KB — 563.6 KB —
playcanvas.min.mjs 2796.6 KB — 726.7 KB — 563.4 KB —

@mvaligursky
mvaligursky merged commit 0a2a689 into main Nov 2, 2026
11 checks passed
@mvaligursky
mvaligursky deleted the mv-video-texture-example branch November 2, 2026 16:55

This branch was successfully deployed

2 active deployments
Preview – engine — 7adc7f3a Deployed Nov 2, 2026 by vercel[bot]
Preview – engine-api-docs — 7adc7f3a Deployed Nov 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant