Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.12 KB

readme.md

File metadata and controls

36 lines (25 loc) · 1.12 KB

WebGPU

WebGPU is a GPU API that can use Vulkan, DirectX, or Metal as its backend, making it truly multi-platform. It uses the WGSL shading language.

Graphics Example

The directory graphics is a self-contained Rust program that uses the wgpu library to display simple graphics. It is based on the project https://github.com/sotrh/learn-wgpu, licensed under the MIT license.

To run the example, execute the following instructions:

cd graphics
cargo run

Compute Example

The directory compute is a self-contained Rust program that uses the wgpu library to run compute shaders. It is based on the project https://github.com/googlefonts/compute-shader-101, licensed under the MIT license. This current project sums the elements in an array with a compute shader. This code is not optimized! It should use sum reduction, but it uses fixed-length instead. Refer to the opengl compute example in this repository or the file https://developer.download.nvidia.com/assets/cuda/files/reduction.pdf to see how to program sum reduction.

To run the example, execute the following instructions:

cd compute
cargo run