Skip to content

A simple software rasterizer running on a WebGPU compute shader. Built for educational purposes.

License

Notifications You must be signed in to change notification settings

OmarShehata/webgpu-compute-rasterizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1228ad6 · Aug 29, 2022

History

31 Commits
Dec 13, 2021
Dec 5, 2021
Jul 3, 2022
Jul 3, 2022
Dec 5, 2021
Nov 28, 2021
Dec 18, 2021
Jul 3, 2022
Jul 3, 2022
Aug 29, 2022
Dec 5, 2021
Dec 3, 2021
Nov 29, 2021
Jul 3, 2022

Repository files navigation

WebGPU Compute Rasterizer

This is a basic implementation of a rasterizer running on WebGPU compute shaders. It currently supports loading a list of triangles from a (very basic) glTF model and rendering it, with shading based on each triangle's distance to the camera.

I built this to create a simple template for exploring compute-based rendering techniques. Initially inspired by Rendering Point Clouds with Compute Shaders and Vertex Order Optimization.

See:

Building locally

Run npm install and npm run dev. Then open localhost:3000.

You must use a browser that supports WebGPU. See the setup instructions in this article.

Rust port

There is a Rust port of this article here: https://github.com/pudnax/compaster. Created by @pudnax.

About

A simple software rasterizer running on a WebGPU compute shader. Built for educational purposes.

Topics

Resources

License

Stars

Watchers

Forks