16 lines
339 B
Plaintext
16 lines
339 B
Plaintext
|
const float GRID_PIXEL = 75.0;
|
||
|
// how many frames to ignore when computing next iteration of game of life.
|
||
|
// Frame-Rate = fps/FRAME_INTERLACE
|
||
|
const int FRAME_INTERLACE = 10;
|
||
|
|
||
|
// pixelize
|
||
|
float pixelize(in float x)
|
||
|
{
|
||
|
return floor(x * GRID_PIXEL)/GRID_PIXEL;
|
||
|
}
|
||
|
|
||
|
vec2 pixelize(in vec2 x)
|
||
|
{
|
||
|
return floor(x * GRID_PIXEL)/GRID_PIXEL;
|
||
|
}
|