Memory Allocation
Because WebGL handles 4 memory registers naturally (RGBA), we use those for (four?) memory locations. This also makes for a convenient colour coding for this debugger.
There are two phases that are run on the GPU: the comparison, and the
chain resolution. Each of them use the memory slightly differently.
Compare
- Comparison
- The score based on a direct comparison: x[0] == y[0], x[0] == y[1], ...
- Unused
- Unused
- Directionality
-
The direction we have to travel to find the best previous score in the chain
- 64 - Vertical
- 127 - Horizontal
- 191 - Diagonal
- Running Total
-
Following the directional indicators, the running total
Chaining
- Unique Identifier [x]
- ID generated for each cell.
- Unique Identifier [y]
- ID generated for each cell.
- Directionality
- Same as compare (above).
- Chain Score
- The final score of the chain.