# Video to Texture

Drive a texture from a playing video with requestVideoFrameCallback, so a copy into the GPU happens once per decoded frame while the cube keeps spinning at the display refresh rate.

## Download

Download the complete verified example source:

```bash
npx vgpu examples pull video-to-texture --out ./video-to-texture
```

## Explore

- [Interactive example](https://vgpu.sh/examples/video-to-texture)
- [Fullscreen preview](https://vgpu.sh/preview/video-to-texture)
- [Complete source](https://vgpu.sh/examples/video-to-texture/source.md)

## Included files

- `index.tsx`
- `renderer.ts`
- `camera.ts`
- `video-source.ts`
- `scene.ts`
- `cube.wgsl`
- `provenance.md`
