getSplatIndex assumes that the first element of the mask contains the splat index