“where vertexLocation is a ushort from the lookup table”
…and you say you used int. That’s fine. All of the bit operations will be done in int anyway.
…which is why you sometimes need to be careful when casting to byte to chop off any sign extension. It’s sometimes easier just to add an & 0xff before casting to byte rather than making sure you handle the sign extension everywhere.