Skip to content

WireWorld Cellular Automata Implementation On GPU

License

Notifications You must be signed in to change notification settings

hammanandre/WireWorldGPU

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WireWorld Cellular Automata GPU Implementation

Project Description:

This project is an implementation of the WireWorld Cellular Automata. For more information on what Cellular Automata is and why it's so cool, feel free to check out the WireWorld Repository Wiki written by Tim Hutton. It details various important pieces of information, namely the rules and how to use them. This project was put together with the use of Unity 3D and various existing assets/packages.

Project Motivation:

This exists as an example of how to run a Cellular Automata simulation on a grid, in Unity, using the GPU. Specifically, setting up with the use of a fragment shader and compute shader. The rules can be adjusted to match other types of existing Cellular Automata rules that currently exist.

Core Files:

Wireworldrules.compute: This Compute Shader file contains all the logic that establishes the rules for WireWorld to run on the grid.

WireworldConductor.cs : C# script that runs the WireWorld Automata on the grid.

WireworldInteraction.cs : C# script that allows the user to change the values of each cell on the grid.

BufferRender.shader: Shader file that generates a grid on which the WireWorld Cellular Automata will run from.

The Rules

  1. Empty Cells Stay Empty.
  2. Electron Heads always become Electron Tails.
  3. Electron Tail Becomes Wire.
  4. Wire stays Wire unless it has 2 or more neighbours that are Electron Heads. It becomes an Electron Head in that case.

Running The Project

Download the project and open it up in Unity Version 2020.1.17f1. In the Scenes folder, locate and open the "Demo" scene. Hit the Play button. Select the Plane in the object hierarchy and ensure that update is toggled. The WireWorld Cellular Automata should start running. Left click with the mouse to turn any cell into a wire(orange). Right click a cell to set it to empty(black).

About

WireWorld Cellular Automata Implementation On GPU

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 75.4%
  • ShaderLab 24.6%