Step 1: Create the shaders.
The vertex shader is very simple.
The fragment shader you need to write. Pass into the fragment shader an unsigned int containing the
ID number for each piece. Convert that uint in to RGB-like values. Here's a hint:
Step 2: Make a method to do the pick.
Step 3: Call Pick() from HandleEvents.