dorkhub

webgpu-compute-rasterizer

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

OmarShehata
JavaScript26510 forksMITupdated 3 years ago
git clone https://github.com/OmarShehata/webgpu-compute-rasterizer.gitOmarShehata/webgpu-compute-rasterizer

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.

more like this

urge

The Universal Ruby Game Engine (URGE) Project

C++50

WebGPU-Lab

Demos and experiments in WebGPU technology. Focus on compute shaders.

TypeScript50

search

search projects, people, and tags