Learn WebGPU
Advanced: Lighting and shading

Advanced lighting techniques

Multiple lights and different light types.

Learning steps

Real scenes have many light sources.

How to handle multiple lights:

  • Store light data in arrays.
  • Sum each light's contribution.
  • Balance quality and performance.

Things to consider:

  • A maximum-light cap.
  • Distance attenuation.
  • Per-light enable/disable.

Task

Implement three point lights with different colors.

Progress 0 / 3 completed

WebGPUを初期化中...

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

Learn WebGPU — interactive tutorials for learning WebGPU

GitHub