1#version 450
2
3layout(location = 0) flat in int index;
4
5layout(location = 0) out float color;
6
7// lookup table
8const float table[16] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
9
10void main()
11{
12    color = table[index];
13}
14