Conway's Game of Life

The latest release of Shaderific includes a new shader for Conway's Game of Life.

 
 

The following parameters can be changed using custom uniforms:

  • Cell size
  • Enable / disable grid
  • Enable / disable shadow (when grid is visible)
  • Invert shadow (when grid is visible)

Three well-known start patterns (Volcano, Glider Gun, Big Glider) are included in the release. You can change the pattern by dragging another texture to the second position in the active textures (please be aware that the framebuffer texture always has to be in the first position).

After changing the start pattern the rendering of the Game of Life shader has to be restarted by resetting the built-in time uniform. This can either be done in the rendering settings or by tapping the stop-button in the tabbar at the bottom of the screen.

Importing Game of Life pattern files

To give you full flexibility in using other start patterns from the web or create your own patterns importing patterns is supported via Dropbox.

You can find a huge selection of patterns at A Brief Illustrated Glossary of Terms in Conway's Game of Life.

Below is shown the pattern for the Glider Gun as an example:

.........................*.......... ......................****....*..... .............*.......****.....*..... ............*.*......*..*.........** ...........*...**....****.........** **.........*...**.....****.......... **.........*...**........*.......... ............*.*..................... .............*......................

To be recognized by Shaderific as a Game of Life pattern file the content has to be well-formed and the file needs to have a specific file extension:

  • the file only contains dots and stars
  • the number of characters is the same in every row
  • the file extension is „.gol“

If you put the file in your Dropbox app folder for Shaderific it will appear in the texture import overview and can be imported like every other image.

When importing a pattern file you don’t need to specify any import settings. The pattern is automatically converted into a regular texture with the dimenions 128 x 128 pixels and is now ready to be used as a new start configuration for the shader.

 

Custom uniforms

To give you more flexibility in making real-time changes to your shaders the existing built-in uniforms are now extended by custom uniforms. It is possible to define up to 20 custom uniforms. You can find the respective menu item in the settings menu.

new_uniform.png

Custom uniforms can be of type boolean, integer and 2-, 3- or 4-component float vector. The name, type and respective value range can be chosen when creating a new uniform. Custom uniforms are bound automatically to the active shader program and changes to the uniforms are visible instantly.

The latest release of Shaderific includes a new shader for Conway's Game of Life that demonstrates the use of custom uniforms.

Shaderific version 4.1 is now available

Version 4.1 has just been released adding full support for iOS 10.

  • Support for custom uniforms
  • Proper handling of camera and photo library access
  • New shader for beautiful rendering of Conway's Game of Life
  • Import of Game of Life patterns as text files with automatic texture conversion