Learn WebGPU
Basics: Buffers and uniforms

Using uniforms

Manage data shared across an entire draw call.

Learning steps

A uniform is data shared by all vertices and fragments.

Typical uses:

  • Transformation matrices (MVP).
  • Time.
  • Screen size.
  • Light positions.

Characteristics:

  • Read-only during a draw.
  • Same value across every shader invocation.

Task

Create a uniform buffer.

Progress 0 / 3 completed

WebGPUを初期化中...

コンソール
コンソール出力がここに表示されます

Learn WebGPU — interactive tutorials for learning WebGPU

GitHub