Skip to content

Yet another Convay's Game of Life implementation. Running on GPU.

Notifications You must be signed in to change notification settings

wg-romank/wasm-game-of-life

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convay's Game of Life in Rust/WASM/WebGL

Slightly tweaked version of original WASM tutorial. All compute is done on GPU (see compute.frag). Main idea of computing state transition on GPU is inspired by common technique of rendering scene to texture.

Texture data follows layout where r-byte is a marker of whether cell is alive or dead and gba-bytes are used to store a counter for how much time has passed since cell died. This counter only used for visualization in colored version.

This example uses glsmrs (https://github.com/wg-romank/glsmrs/) to simplify WebGL setup and make rendering to texture a bit easier.

To build wasm

make wasm

To bundle & start

make serve

About

Yet another Convay's Game of Life implementation. Running on GPU.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published