skeeto / webgl-game-of-life Goto Github PK
View Code? Open in Web Editor NEWWebGL Game of Life
Home Page: http://skeeto.github.io/webgl-game-of-life/
License: The Unlicense
WebGL Game of Life
Home Page: http://skeeto.github.io/webgl-game-of-life/
License: The Unlicense
Igloo threw this error after shamelessly copying everything.
"Uncaught Error: ERROR: 0:2: '' : No precision specified for (float)"
Fixed by adding these lines to the start of each fragment shader
precision mediump float;
Hello. I am trying to convert an old cellular automata simulation I wrote in Processing to WebGL. Your example here was the first/best one that I could find that made use of swapping or pingponging of textures, which is necessary for CA simulations on the GPU. I am trying to just replace your frag shader with mine.
The problem I have is that my CA is complex and requires two separate textures to hold all the information about a cell's state. I am not able to figure out your Igloo API and I know nothing about WebGL. In fact I barely remember what I did in Processing years ago. I am hoping that only a few lines of code need to be changed. I think I will ultimately need two 'front' textures and two 'back' textures or maybe I just need two uniform's like state
and state2
?
All the guts of my old CA are written in GLSL and at the top I have uniform sampler2D src_tex_unit0, src_tex_unit1;
which is how the two textures are passed in. And I have out vec4 outState, outEnergy;
, which is the corresponding output values for the shader.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.