Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 1.63 KB

File metadata and controls

22 lines (16 loc) · 1.63 KB

webgpu-kt-template

A complete Android app example/template that uses androidx.webgpu library.

The repository serves as a starting point for Android developers who want to explore using WebGPU for high-performance graphics and computation within a familiar Kotlin/Android environment. WebGPU is designed to be the modern successor to older APIs like OpenGL ES.

This example uses the latest 1.0.0-alpha05 version. It renders a simple cube, a camera can be rotated around using touch gesture. It also demostrates how to work with:

  • WebGPU configuration + integration with Compose UI
  • Matrices calculation
  • Creating GPU buffers(vertex/index), both for uniform and vertices purposes
  • Simple diffuse lighting
  • A few tweaks around androidx.webgpu
  • Enabling multisampling(MSAA4x)
Screenshot_20260119_223639

I recommend to install a couple plugins for Android Studio :

P.S. Thanks to the article for the inspiration.

P.S.S. Compose Multiplatform + Rust WGPU template can be found here